Optimization of the facebook connect on Forumotion forums

Go down

Optimization of the facebook connect on Forumotion forums Empty Optimization of the facebook connect on Forumotion forums

Post by The Godfather on March 10th 2017, 3:11 pm

Hello,

I am pleased to announce that we have made an optimization of the Forumotion Facebook Connect code. A consolidation of the codes for a better performance and an ease of reading and updating was also carried out. Very Happy

This optimization is natively included in the basic templates of all Forumotion forums regardless of the version of the forum. Administrators who have not customized the templates of their forums before the date of publication of this announcement are therefore not affected by the changes that will follow.

For administrators who have customized one of the templates listed below before before March 9, 2017, they must make the following changes manually to the templates listed in order to be able to correctly use the Facebook Connect button on their forums .

Note that this optimization also concerns the improvement of the quick login display on the phpBB2 forums.

Regards,
The Forumactif Team king
The Godfather
The Godfather
Administrator
Administrator

Posts : 3316
Reputation : 578

Back to top Go down

Optimization of the facebook connect on Forumotion forums Empty Re: Optimization of the facebook connect on Forumotion forums

Post by The Godfather on March 10th 2017, 3:39 pm

phpBB3 Version :


Note: When we refer to a block XXX this means all the block contents starting from opening tag <!-- BEGIN XXX --> to the closing tag <!-- END XXX -->


  • Inindex_body

    Remove:

    All blocks switch_fb_connect

    Remove:

    The block switch_fb_index_login

    After:

    Each of these occurrences (there are 2 in the page) of
    Code:

    {S_HIDDEN_FIELDS}<input class="mainoption button1" type="submit" name="login" value="{L_LOGIN}" />
    Add the code:

    Code:

        <!-- BEGIN switch_social_login -->
        <div class="social_btn">
            <!-- BEGIN fb_connect -->
            <div class="fb-login-button"></div>
            <!-- END fb_connect -->
            &nbsp;
        </div>
        <!-- END switch_social_login -->

  • In overall_footer_end

    Replace:

    The content of the bloc switch_facebook_login
    With:

    Code:

    <div id="fb-root"></div>
    <script type="text/javascript">
        $(document).ready( function() {
            $('div.fb-login-button, span.fb-login-button').attr({
                "data-scope": "{switch_facebook_login.FB_SCOPE}",
                "data-max-rows": "{switch_facebook_login.FB_MAX_ROWS}",
                "data-size": "{switch_facebook_login.FB_BUTTON_SIZE}",
                "data-show-faces": "{switch_facebook_login.FB_SHOW_FACES}",
                "data-auto-logout-link": "{switch_facebook_login.FB_AUTO_LOGOUT}"
            });

            $('div.fb-login-button, span.fb-login-button').each(function() {
                if(typeof $(this).attr('onlogin') == typeof undefined || $(this).attr('onlogin') === false) {
                    $(this).attr('onlogin', '{switch_facebook_login.FB_ONLOGIN}');
                }
                if($(this).html() == '') {
                    $(this).html('{switch_facebook_login.FB_LABEL}');
                }
            });


            FB.init({
                appId  : "{switch_facebook_login.FB_APP_ID}",
                cookie  : {switch_facebook_login.FB_COOKIE},
                xfbml  : {switch_facebook_login.FB_XFBML},
                oauth  : {switch_facebook_login.FB_OAUTH},
                version : '{switch_facebook_login.FB_VERSION}'
            });

            (function(d, s, id){
                var js, fjs = d.getElementsByTagName(s)[0];
                if (d.getElementById(id)) {return;}
                js = d.createElement(s); js.id = id;
                js.src = "//connect.facebook.net/{switch_facebook_login.FB_LOCAL}/sdk.js";
                fjs.parentNode.insertBefore(js, fjs);
            }(document, 'script', 'facebook-jssdk'));

        });
        function onLoginFB() {
            window.location.replace('{switch_facebook_login.FB_ONLOGIN_URL}')
        }
    </script>

    Remove:

    The block switch_facebook_logout_TMP

  • In profile_add_body

    Replace:

    The block switch_fb_account_not_linked
    With:

    Code:

            <!-- BEGIN switch_fb_account_not_linked -->
            <div class="fb-login-button" onlogin="facebook_link">{switch_preferences_menu.switch_fb_connect.switch_fb_account_not_linked.L_FB_LOGIN_BUTTON}</div>
            <!-- END switch_fb_account_not_linked -->

    Remove:

    The block switch_fb_connect

    Remove:

    The block switch_preferences_menu

  • In Portal > mod_login

    Remove:

    The blocks (there are 2) switch_fb_connect_login

    Remove:

    The block switch_fb_widget_login

    After:

    Code:

                <dd><input type="submit" name="login" tabindex="6" value="{L_LOGIN}" class="button1" /></dd>
            </dl>
    Add:

    Code:

            <!-- BEGIN switch_social_login -->
            <dl>
                <dt>&nbsp;</dt>
                <dd><div class="fb_or_widget left">{switch_login.switch_social_login.L_OR}</div></dd>
            </dl>
            <dl>
                <dt>&nbsp;</dt>
                <dd>
                    <div class="social_btn left">
                        <!-- BEGIN fb_connect -->
                        <div class="fb-login-button"></div>
                        <!-- END fb_connect -->
                    </div>
                </dd>
            </dl>
            <!-- END switch_social_login -->

    After:

    Code:

            <p align="center"><input type="submit" name="login" tabindex="6" value="{L_LOGIN}" class="button1" /></p>
    Add:

    Code:

            <!-- BEGIN switch_social_login -->
            <div class="mt10 center">
                <div class="social_btn">
                    <div class="fb_or">{switch_login_small.switch_social_login.L_OR}</div><br />
                    <!-- BEGIN fb_connect -->
                    <div class="fb-login-button"></div>
                    <!-- END fb_connect -->
                </div>
            </div>
            <!-- END switch_social_login -->
The Godfather
The Godfather
Administrator
Administrator

Posts : 3316
Reputation : 578

Back to top Go down

Optimization of the facebook connect on Forumotion forums Empty Re: Optimization of the facebook connect on Forumotion forums

Post by The Godfather on March 10th 2017, 3:44 pm

inVision Version :


Note: When we refer to a block XXX this means all the block contents starting from opening tag <!-- BEGIN XXX --> to the closing tag <!-- END XXX -->



  • In index_body

    Delate:

    All blocs switch_fb_connect

    Delate:

    The bloc switch_fb_index_login

    After:

    Each of these occurrences (there are 2 in the page)
    Code:

    {S_HIDDEN_FIELDS}<input class="mainoption" type="submit" name="login" value="{L_LOGIN}" />
    Add:

    Code:

                <!-- BEGIN switch_social_login -->
                <div class="mt10">
                    <div class="social_btn">
                        <!-- BEGIN fb_connect -->
                        <div class="fb-login-button"></div>
                        <!-- END fb_connect -->
                    </div>
                </div>
                <!-- END switch_social_login -->

  • In overall_footer_end

    Replace:

    The content of the bloc switch_facebook_login
    By:

    Code:

    <div id="fb-root"></div>
    <script type="text/javascript">
        $(document).ready( function() {
            $('div.fb-login-button, span.fb-login-button').attr({
                "data-scope": "{switch_facebook_login.FB_SCOPE}",
                "data-max-rows": "{switch_facebook_login.FB_MAX_ROWS}",
                "data-size": "{switch_facebook_login.FB_BUTTON_SIZE}",
                "data-show-faces": "{switch_facebook_login.FB_SHOW_FACES}",
                "data-auto-logout-link": "{switch_facebook_login.FB_AUTO_LOGOUT}"
            });

            $('div.fb-login-button, span.fb-login-button').each(function() {
                if(typeof $(this).attr('onlogin') == typeof undefined || $(this).attr('onlogin') === false) {
                    $(this).attr('onlogin', '{switch_facebook_login.FB_ONLOGIN}');
                }
                if($(this).html() == '') {
                    $(this).html('{switch_facebook_login.FB_LABEL}');
                }
            });


            FB.init({
                appId  : "{switch_facebook_login.FB_APP_ID}",
                cookie  : {switch_facebook_login.FB_COOKIE},
                xfbml  : {switch_facebook_login.FB_XFBML},
                oauth  : {switch_facebook_login.FB_OAUTH},
                version : '{switch_facebook_login.FB_VERSION}'
            });

            (function(d, s, id){
                var js, fjs = d.getElementsByTagName(s)[0];
                if (d.getElementById(id)) {return;}
                js = d.createElement(s); js.id = id;
                js.src = "//connect.facebook.net/{switch_facebook_login.FB_LOCAL}/sdk.js";
                fjs.parentNode.insertBefore(js, fjs);
            }(document, 'script', 'facebook-jssdk'));

        });
        function onLoginFB() {
            window.location.replace('{switch_facebook_login.FB_ONLOGIN_URL}')
        }
    </script>

  • In profile_add_body

    Replace:

    The bloc switch_fb_account_not_linked
    By:

    Code:

            <!-- BEGIN switch_fb_account_not_linked -->
            <div class="fb-login-button" onlogin="facebook_link">{switch_preferences_menu.switch_fb_connect.switch_fb_account_not_linked.L_FB_LOGIN_BUTTON}</div>
            <!-- END switch_fb_account_not_linked -->

    Delate:

    The bloc switch_fb_connect

    Delate:

    The bloc switch_preferences_menu

  • In Portal > mod_login,

    Delate:

    All blocs (There are 2) switch_fb_connect_login

    Delate:

    The bloc switch_fb_widget_login

    After:

    Code:

                <dd><input type="submit" name="login" tabindex="6" value="{L_LOGIN}" class="button" /></dd>
            </dl>
    Add:

    Code:

                    <!-- BEGIN switch_social_login -->
                    <dl>
                        <dd class="center">
                            <div class="social_btn">
                                <div class="fb_or">{switch_login.switch_social_login.L_OR}</div>
                                <br />
                                <!-- BEGIN fb_connect -->
                                <div class="fb-login-button"></div>
                                <!-- END fb_connect -->
                                <br />
                            </div>
                        </dd>
                    </dl>
                    <!-- END switch_social_login -->

    After:

    Code:

            <p align="center"><input type="submit" name="login" tabindex="6" value="{L_LOGIN}" class="button" /></p>
    Add:

    Code:

                <!-- BEGIN switch_social_login -->
                <div class="mt10 center">
                    <div class="social_btn">
                        <div class="fb_or">{switch_login_small.switch_social_login.L_OR}</div>
                        <br />
                        <!-- BEGIN fb_connect -->
                        <div class="fb-login-button"></div>
                        <!-- END fb_connect -->
                        <br />
                    </div>
                </div>
                <!-- END switch_social_login -->
The Godfather
The Godfather
Administrator
Administrator

Posts : 3316
Reputation : 578

Back to top Go down

Optimization of the facebook connect on Forumotion forums Empty Re: Optimization of the facebook connect on Forumotion forums

Post by The Godfather on March 10th 2017, 3:51 pm

phpBB2 Version :


Note: When we refer to a block XXX this means all the block contents starting from opening tag <!-- BEGIN XXX --> to the closing tag <!-- END XXX -->


  • In index_body,

    Delate:

    Les blocs switch_fb_connect_no

    Delate:

    The bloc switch_fb_connect

    Delate:

    The bloc switch_fb_index_login

    After:

    Code:

    <!-- BEGIN switch_user_login_form_header -->
    <form action="{S_LOGIN_ACTION}" method="post" name="form_login">
    Add:

    Code:

        <table width="100%" border="0" cellspacing="0" cellpadding="0" class="user_login_form forumline">
            <tr>
                <td width="50%" valign="top" align="{switch_user_login_form_header.V_ALIGN}" class="row1">

                    <table>
                        <tr>
                            <td><span class="genmed">{L_USERNAME}:</span>&nbsp;</td>
                            <td><input class="post" type="text" size="10" name="username"/>&nbsp;</td>
                            <td>
                                <input class="radio" type="checkbox" name="autologin" {AUTOLOGIN_CHECKED} />
                                <span class="gensmall">{L_AUTO_LOGIN}</span>&nbsp;
                            </td>
                        </tr>

                        <tr>
                            <td><span class="genmed">{L_PASSWORD}:</span>&nbsp;</td>
                            <td><input class="post" type="password" size="10" name="password"/>&nbsp;</td>
                            <td>{S_HIDDEN_FIELDS}<input class="mainoption" type="submit" name="login" value="{L_LOGIN}" /></td>
                        </tr>
                    </table>
                </td>

                <!-- BEGIN switch_social_login -->
              <td width="10%" align="center" valign="middle" class="row1">
                    <span class="genmed fb_or">{switch_user_login_form_header.switch_social_login.L_OR}</span>
                </td>
                <td width="40%" class="align_gauche row1">
                    <div class="social_btn">
                        <!-- BEGIN fb_connect -->
                        <div class="fb-login-button"></div>
                        <!-- END fb_connect -->
                    </div>
                </td>
                <!-- END switch_social_login -->

            </tr>
        </table>

    After:

    Code:

    <!-- BEGIN switch_user_login_form_footer -->
    <form action="{S_LOGIN_ACTION}" method="post" name="form_login">
    Add:

    Code:

        <table width="100%" border="0" cellspacing="0" cellpadding="0" class="user_login_form forumline">
            <tr>
                <td width="50%" valign="top" align="right" class="row1">

                    <table>
                        <tr>
                            <td><span class="genmed">{L_USERNAME}:</span>&nbsp;</td>
                            <td><input class="post" type="text" size="10" name="username"/>&nbsp;</td>
                            <td>
                                <input class="radio" type="checkbox" name="autologin" {AUTOLOGIN_CHECKED} />
                                <span class="gensmall">{L_AUTO_LOGIN}</span>&nbsp;
                            </td>
                        </tr>

                        <tr>
                            <td><span class="genmed">{L_PASSWORD}:</span>&nbsp;</td>
                            <td><input class="post" type="password" size="10" name="password"/>&nbsp;</td>
                            <td>{S_HIDDEN_FIELDS}<input class="mainoption" type="submit" name="login" value="{L_LOGIN}" /></td>
                        </tr>
                    </table>
                </td>

                <!-- BEGIN switch_social_login -->
                <td width="10%" align="center" valign="middle" class="row1">
                    <span class="genmed fb_or">{switch_user_login_form_footer.switch_social_login.L_OR}</span>
                </td>
                <td width="40%" class="align_gauche row1">
                    <div class="social_btn">
                        <!-- BEGIN fb_connect -->
                        <div class="fb-login-button"></div>
                        <!-- END fb_connect -->
                    </div>
                </td>
                <!-- END switch_social_login -->

            </tr>
        </table>

  • In overall_footer_end

    Replace:

    The content of the bloc switch_facebook_login
    By:

    Code:

    <div id="fb-root"></div>
    <script type="text/javascript">
        $(document).ready( function() {
            $('div.fb-login-button, span.fb-login-button').attr({
                "data-scope": "{switch_facebook_login.FB_SCOPE}",
                "data-max-rows": "{switch_facebook_login.FB_MAX_ROWS}",
                "data-size": "{switch_facebook_login.FB_BUTTON_SIZE}",
                "data-show-faces": "{switch_facebook_login.FB_SHOW_FACES}",
                "data-auto-logout-link": "{switch_facebook_login.FB_AUTO_LOGOUT}"
            });

            $('div.fb-login-button, span.fb-login-button').each(function() {
                if(typeof $(this).attr('onlogin') == typeof undefined || $(this).attr('onlogin') === false) {
                    $(this).attr('onlogin', '{switch_facebook_login.FB_ONLOGIN}');
                }
                if($(this).html() == '') {
                    $(this).html('{switch_facebook_login.FB_LABEL}');
                }
            });


            FB.init({
                appId  : "{switch_facebook_login.FB_APP_ID}",
                cookie  : {switch_facebook_login.FB_COOKIE},
                xfbml  : {switch_facebook_login.FB_XFBML},
                oauth  : {switch_facebook_login.FB_OAUTH},
                version : '{switch_facebook_login.FB_VERSION}'
            });

            (function(d, s, id){
                var js, fjs = d.getElementsByTagName(s)[0];
                if (d.getElementById(id)) {return;}
                js = d.createElement(s); js.id = id;
                js.src = "//connect.facebook.net/{switch_facebook_login.FB_LOCAL}/sdk.js";
                fjs.parentNode.insertBefore(js, fjs);
            }(document, 'script', 'facebook-jssdk'));

        });
        function onLoginFB() {
            window.location.replace('{switch_facebook_login.FB_ONLOGIN_URL}')
        }
    </script>

  • In profile_add_body

    Replace:

    The bloc switch_fb_account_not_linked
    With:

    Code:

                <!-- BEGIN switch_fb_account_not_linked -->
                <div class="fb-login-button" onlogin="facebook_link">{switch_preferences_menu.switch_fb_connect.switch_fb_account_not_linked.L_FB_LOGIN_BUTTON}</div>
                <!-- END switch_fb_account_not_linked -->

    Delate:

    The bloc switch_fb_connect

    Delate:

    The bloc switch_preferences_menu

  • In Portal > mod_login

    Delate:

    The 2 blocs switch_fb_connect_login

    Delate:

    The bloc switch_fb_widget_login

    After:

    Code:

                        <tr align="center">
                            <td colspan="2">
                                <span class="gensmall"><a class="gensmall" href="{U_SEND_PASSWORD}" rel="nofollow">::&nbsp;{L_SEND_PASSWORD}</a></span>
                            </td>
                        </tr>
    Add:

    Code:

                        <!-- BEGIN switch_social_login -->
                        <tr align="center">
                            <td colspan="2">
                                <div class="social_btn">
                                    <div class="fb_or_widget">{switch_login.switch_social_login.L_OR}</div> <br />
                                    <!-- BEGIN fb_connect -->
                                    <div class="fb-login-button"></div>
                                    <!-- END fb_connect -->
                                </div>
                            </td>
                        </tr>
                        <!-- END switch_social_login -->

    After:

    Code:

                        <tr align="center">
                            <td><span class="gensmall"><a class="gensmall" href="{U_SEND_PASSWORD}" rel="nofollow">::&nbsp;{L_SEND_PASSWORD}</a></span></td>
                        </tr>
    Add:

    Code:

                        <!-- BEGIN switch_social_login -->
                        <tr align="center">
                            <td colspan="2">
                                <div class="social_btn">
                                    <div class="fb_or">{switch_login_small.switch_social_login.L_OR}</div> <br />
                                    <!-- BEGIN fb_connect -->
                                    <div class="fb-login-button"></div>
                                    <!-- END fb_connect -->
                                </div>
                            </td>
                        </tr>
                        <!-- END switch_social_login -->
The Godfather
The Godfather
Administrator
Administrator

Posts : 3316
Reputation : 578

Back to top Go down

Optimization of the facebook connect on Forumotion forums Empty Re: Optimization of the facebook connect on Forumotion forums

Post by The Godfather on March 10th 2017, 3:58 pm

punBB Version :


Note: When we refer to a block XXX this means all the block contents starting from opening tag <!-- BEGIN XXX --> to the closing tag <!-- END XXX -->



  • In index_body

    Replace:

    All blocs switch_fb_connect
    with:

    Code:

            <!-- BEGIN switch_social_login -->
            <div class="mt10">
                <div class="social_btn">
                    <!-- BEGIN fb_connect -->
                    <div class="fb-login-button"></div>
                    <!-- END fb_connect -->
                    &nbsp;
                </div>
            </div>
            <!-- END switch_social_login -->

    Delate:

    The block switch_fb_index_login


  • In overall_footer_end

    Replace:

    The content of the bloc switch_facebook_login
    by:

    Code:

    <div id="fb-root"></div>
    <script type="text/javascript">
        $(document).ready( function() {
            $('div.fb-login-button, span.fb-login-button').attr({
                "data-scope": "{switch_facebook_login.FB_SCOPE}",
                "data-max-rows": "{switch_facebook_login.FB_MAX_ROWS}",
                "data-size": "{switch_facebook_login.FB_BUTTON_SIZE}",
                "data-show-faces": "{switch_facebook_login.FB_SHOW_FACES}",
                "data-auto-logout-link": "{switch_facebook_login.FB_AUTO_LOGOUT}"
            });
            $('div.fb-login-button, span.fb-login-button').each(function() {
                if(typeof $(this).attr('onlogin') == typeof undefined || $(this).attr('onlogin') === false) {
                    $(this).attr('onlogin', '{switch_facebook_login.FB_ONLOGIN}');
                }
                if($(this).html() == '') {
                    $(this).html('{switch_facebook_login.FB_LABEL}');
                }
            });
           
            FB.init({
                appId  : "{switch_facebook_login.FB_APP_ID}",
                cookie  : {switch_facebook_login.FB_COOKIE},
                xfbml  : {switch_facebook_login.FB_XFBML},
                oauth  : {switch_facebook_login.FB_OAUTH},
                version : '{switch_facebook_login.FB_VERSION}'
            });
           
            (function(d, s, id){
                var js, fjs = d.getElementsByTagName(s)[0];
                if (d.getElementById(id)) {return;}
                    js = d.createElement(s); js.id = id;
                js.src = "//connect.facebook.net/{switch_facebook_login.FB_LOCAL}/sdk.js";
                fjs.byentNode.insertBefore(js, fjs);
            }(document, 'script', 'facebook-jssdk'));
        });
        function onLoginFB() {
            window.location.replace('{switch_facebook_login.FB_ONLOGIN_URL}')
        }
    </script>

    Delate:

    The block switch_facebook_logout_TMP

  • In profile_add_body

    Delate:

    The block switch_fb_connect

    Delate:

    The block switch_preferences_menu

  • In Portail > mod_login

    Delate:

    The 2 blocs switch_fb_connect_login

    Delate:

    The block switch_fb_widget_login

    After :

    Code:

     <dl>
     <dd style="text-align:center;"><input type="submit" name="login" tabindex="6" value="{L_LOGIN}" class="button1" /></dd>
     </dl>
    Add :

    Code:

            <!-- BEGIN switch_social_login -->
            <dl>
                <dd class="center">
                    <div class="social_btn">
                        <div class="fb_or">{switch_login.switch_social_login.L_OR}</div> <br />
                        <!-- BEGIN fb_connect -->
                        <div class="fb-login-button"></div>
                        <!-- END fb_connect -->
                        <br />
                    </div>
                </dd>
            </dl>
            <!-- END switch_social_login -->

    After :

    Code:

            <p align="center"><input type="submit" name="login" tabindex="6" value="{L_LOGIN}" class="button1" /></p>
    Add :

    Code:

            <!-- BEGIN switch_social_login -->
            <div class="mt10 center">
                <div class="social_btn">
                    <div class="fb_or">{switch_login_small.switch_social_login.L_OR}</div> <br />
                    <!-- BEGIN fb_connect -->
                    <div class="fb-login-button"></div>
                    <!-- END fb_connect -->
                    <br />
                </div>
            </div>
            <!-- END switch_social_login -->
The Godfather
The Godfather
Administrator
Administrator

Posts : 3316
Reputation : 578

Back to top Go down

Optimization of the facebook connect on Forumotion forums Empty Re: Optimization of the facebook connect on Forumotion forums

Post by The Godfather on March 10th 2017, 4:02 pm

Classic mobile version :


Note: When we refer to a block XXX this means all the block contents starting from opening tag <!-- BEGIN XXX --> to the closing tag <!-- END XXX -->


  • In overall_footer

    After:

    Code:

     {PROTECT_FOOTER}
     <div class="application_footer_spacer"></div>
     </div>
     </div>
    </div>
    Add :

    Code:

    <!-- BEGIN switch_facebook_login -->
    <div id="fb-root"></div>
    <script type="text/javascript">
        $(document).ready( function() {
            $('div.fb-login-button, span.fb-login-button').attr({
                "data-scope": "{switch_facebook_login.FB_SCOPE}",
                "data-max-rows": "{switch_facebook_login.FB_MAX_ROWS}",
                "data-size": "{switch_facebook_login.FB_BUTTON_SIZE}",
                "data-show-faces": "{switch_facebook_login.FB_SHOW_FACES}",
                "data-auto-logout-link": "{switch_facebook_login.FB_AUTO_LOGOUT}"
            });
            $('div.fb-login-button, span.fb-login-button').each(function() {
                if(typeof $(this).attr('onlogin') == typeof undefined || $(this).attr('onlogin') === false) {
                    $(this).attr('onlogin', '{switch_facebook_login.FB_ONLOGIN}');
                }
                if($(this).html() == '') {
                    $(this).html('{switch_facebook_login.FB_LABEL}');
                }
            });

            FB.init({
                appId  : "{switch_facebook_login.FB_APP_ID}",
                cookie  : {switch_facebook_login.FB_COOKIE},
                xfbml  : {switch_facebook_login.FB_XFBML},
                oauth  : {switch_facebook_login.FB_OAUTH},
                version : '{switch_facebook_login.FB_VERSION}'
            });

            (function(d, s, id){
                var js, fjs = d.getElementsByTagName(s)[0];
                if (d.getElementById(id)) {return;}
                    js = d.createElement(s); js.id = id;
                js.src = "//connect.facebook.net/{switch_facebook_login.FB_LOCAL}/sdk.js";
                fjs.parentNode.insertBefore(js, fjs);
            }(document, 'script', 'facebook-jssdk'));
        });
        function onLoginFB() {
            window.location.replace('{switch_facebook_login.FB_ONLOGIN_URL}')
        }
    </script>
    <!-- END switch_facebook_login -->

  • In overall_header

    Before :

    Code:

     {HOSTING_JS}
    </head>
    Add :

    Code:

        <!-- BEGIN switch_fb_login -->
        <script src="https://connect.facebook.net/{switch_fb_login.FB_LOCAL}/all.js" type="text/javascript"></script>
        <script src="{switch_fb_login.JS_FB_LOGIN}" type="text/javascript"></script>
        <!-- END switch_fb_login -->


Modern mobile version :



  • In overall_footer

    Before :

    Code:

    </body>
    Add :

    Code:

        <!-- BEGIN switch_facebook_login -->
        <div id="fb-root"></div>
        <script type="text/javascript">
            $(document).ready( function() {
                $('div.fb-login-button, span.fb-login-button').attr({
                    "data-scope": "{switch_facebook_login.FB_SCOPE}",
                    "data-max-rows": "{switch_facebook_login.FB_MAX_ROWS}",
                    "data-size": "{switch_facebook_login.FB_BUTTON_SIZE}",
                    "data-show-faces": "{switch_facebook_login.FB_SHOW_FACES}",
                    "data-auto-logout-link": "{switch_facebook_login.FB_AUTO_LOGOUT}"
                });
                $('div.fb-login-button, span.fb-login-button').each(function() {
                    if(typeof $(this).attr('onlogin') == typeof undefined || $(this).attr('onlogin') === false) {
                        $(this).attr('onlogin', '{switch_facebook_login.FB_ONLOGIN}');
                    }
                    if($(this).html() == '') {
                        $(this).html('{switch_facebook_login.FB_LABEL}');
                    }
                });

                FB.init({
                    appId  : "{switch_facebook_login.FB_APP_ID}",
                    cookie  : {switch_facebook_login.FB_COOKIE},
                    xfbml  : {switch_facebook_login.FB_XFBML},
                    oauth  : {switch_facebook_login.FB_OAUTH},
                    version : '{switch_facebook_login.FB_VERSION}'
                });

                (function(d, s, id){
                    var js, fjs = d.getElementsByTagName(s)[0];
                    if (d.getElementById(id)) {return;}
                        js = d.createElement(s); js.id = id;
                    js.src = "//connect.facebook.net/{switch_facebook_login.FB_LOCAL}/sdk.js";
                    fjs.parentNode.insertBefore(js, fjs);
                }(document, 'script', 'facebook-jssdk'));
            });
            function onLoginFB() {
                window.location.replace('{switch_facebook_login.FB_ONLOGIN_URL}')
            }
        </script>
        <!-- END switch_facebook_login -->

  • In overall_header

    Before :

    Code:

     {HOSTING_JS}
    </head>
    Add :

    Code:

        <!-- BEGIN switch_fb_login -->
        <script src="https://connect.facebook.net/{switch_fb_login.FB_LOCAL}/all.js" type="text/javascript"></script>
        <script src="{switch_fb_login.JS_FB_LOGIN}" type="text/javascript"></script>
        <!-- END switch_fb_login -->
The Godfather
The Godfather
Administrator
Administrator

Posts : 3316
Reputation : 578

Back to top Go down

Optimization of the facebook connect on Forumotion forums Empty Re: Optimization of the facebook connect on Forumotion forums

Post by SarkZKalie on March 10th 2017, 7:26 pm

Sorry, I don't get it. What does 'Delate' means? Do the same, right? Very Happy


Optimization of the facebook connect on Forumotion forums Sarkzk10
SarkZKalie
SarkZKalie
Support Moderator
Support Moderator

Male Posts : 1079
Reputation : 178
Language : English

https://www.rotavn.xyz/

Back to top Go down

Optimization of the facebook connect on Forumotion forums Empty Re: Optimization of the facebook connect on Forumotion forums

Post by YoshiGM on March 10th 2017, 7:36 pm

@SarkZKalie wrote:Sorry, I don't get it. What does 'Delate' means? Do the same, right? Very Happy
TheGodFather had a typing error.. The correction is Delete Wink



Thanks for this update!
I really appreciate all work to upgrade our forums: verygood:
YoshiGM
YoshiGM
Forumember

Male Posts : 834
Reputation : 115
Language : Spanish & English
Location : Mexico

http://asistencia.foroactivo.com/u21373

Back to top Go down

Optimization of the facebook connect on Forumotion forums Empty Re: Optimization of the facebook connect on Forumotion forums

Post by Hagoromo Otsutsuki on March 14th 2017, 12:48 pm

So I would have to manually put this all in for what?....
Hagoromo Otsutsuki
Hagoromo Otsutsuki
Forumember

Male Posts : 623
Reputation : 25
Language : English
Location : Between Time and Space

http://fictionalomniverse.forumotion.com/

Back to top Go down

Optimization of the facebook connect on Forumotion forums Empty Re: Optimization of the facebook connect on Forumotion forums

Post by jucarese on March 14th 2017, 1:15 pm

If you have not modified templetes before March 9, 2017 do not do anything
jucarese
jucarese
Active Poster

Male Posts : 1530
Reputation : 56
Language : spanish
Location : SSF Admin

http://asistencia.foroactivo.com/u23082

Back to top Go down

Optimization of the facebook connect on Forumotion forums Empty Re: Optimization of the facebook connect on Forumotion forums

Post by Hagoromo Otsutsuki on March 15th 2017, 12:00 pm

@jucarese wrote: If you have not modified templetes before March 9, 2017 do not do anything
Im still confused is this for members logging in with FB?...
Hagoromo Otsutsuki
Hagoromo Otsutsuki
Forumember

Male Posts : 623
Reputation : 25
Language : English
Location : Between Time and Space

http://fictionalomniverse.forumotion.com/

Back to top Go down

Optimization of the facebook connect on Forumotion forums Empty Re: Optimization of the facebook connect on Forumotion forums

Post by YoshiGM on March 15th 2017, 5:22 pm

@Hagoromo Otsutsuki wrote:
@jucarese wrote: If you have not modified templetes before March 9, 2017 do not do anything
Im still confused is this for members logging in with FB?...

Only for founders that edited the templates in their forums before that date
YoshiGM
YoshiGM
Forumember

Male Posts : 834
Reputation : 115
Language : Spanish & English
Location : Mexico

http://asistencia.foroactivo.com/u21373

Back to top Go down

Optimization of the facebook connect on Forumotion forums Empty Re: Optimization of the facebook connect on Forumotion forums

Post by SLGray on March 15th 2017, 10:01 pm

@Hagoromo Otsutsuki wrote:
@jucarese wrote:  If you have not modified templetes  before March 9, 2017 do not do anything
Im still confused is this for members logging in with FB?...
It is for Facebook Connect.  The codes have been merged for better performance and to make it easier to read and update.

If you had not modified your templates before the date of this announcement, you do not have to do anything.


Optimization of the facebook connect on Forumotion forums Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 46310
Reputation : 3257
Language : English
Location : United States

https://help.forumotion.com/

Back to top Go down

Optimization of the facebook connect on Forumotion forums Empty Re: Optimization of the facebook connect on Forumotion forums

Post by BlackScorpion on June 15th 2017, 10:34 pm

If i'm using Ange's theme , do i need to do anything with the codes?
BlackScorpion
BlackScorpion
Graphic Designer
Graphic Designer

Male Posts : 6265
Reputation : 862
Language : English
Location : USA

https://help.forumotion.com

Back to top Go down

Optimization of the facebook connect on Forumotion forums Empty Re: Optimization of the facebook connect on Forumotion forums

Post by Ange Tuteur on June 15th 2017, 11:08 pm

@BlackScorpion wrote:If i'm using Ange's theme , do i need to do anything with the codes?
As long as you're at version 1.2.0 or above you're a-okay ! rock
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13223
Reputation : 2960
Language : EN, JA, FR
Location : Macungie, PA

https://github.com/SethClydesdale

Back to top Go down

Optimization of the facebook connect on Forumotion forums Empty Re: Optimization of the facebook connect on Forumotion forums

Post by BlackScorpion on June 16th 2017, 3:22 am

@Ange Tuteur wrote:
@BlackScorpion wrote:If i'm using Ange's theme , do i need to do anything with the codes?
As long as you're at version 1.2.0 or above you're a-okay ! rock

Great! I do believe i'm at version 1.2.5 on all. Thanks for responding.
BlackScorpion
BlackScorpion
Graphic Designer
Graphic Designer

Male Posts : 6265
Reputation : 862
Language : English
Location : USA

https://help.forumotion.com

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum