The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Optimization of the facebook connect on Forumotion forums

View previous topic View next topic Go down

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
avatar
The Godfather
Administrator
Administrator

Posts : 2650
Reputation : 322

Back to top Go down

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 -->
avatar
The Godfather
Administrator
Administrator

Posts : 2650
Reputation : 322

Back to top Go down

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 -->
avatar
The Godfather
Administrator
Administrator

Posts : 2650
Reputation : 322

Back to top Go down

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 -->
avatar
The Godfather
Administrator
Administrator

Posts : 2650
Reputation : 322

Back to top Go down

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 -->
avatar
The Godfather
Administrator
Administrator

Posts : 2650
Reputation : 322

Back to top Go down

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 -->
avatar
The Godfather
Administrator
Administrator

Posts : 2650
Reputation : 322

Back to top Go down

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
avatar
SarkZKalie
Forumember

Male Posts : 574
Reputation : 87
Language : English

http://rotavn.nstars.org/

Back to top Go down

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:
avatar
YoshiGM
Forumember

Male Posts : 571
Reputation : 88
Language : Spanish [Native], English [69%], Italian [16%]
Location : Support Area ~

http://asistencia.foroactivo.com/u21373

Back to top Go down

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?....
avatar
Hagoromo Otsutsuki
Forumember

Male Posts : 573
Reputation : 23
Language : English
Location : Between Time and Space

http://fictionalomniverse.forumotion.com/

Back to top Go down

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
avatar
jucarese
Active Poster

Male Posts : 1130
Reputation : 19
Language : spanish
Location : Admin Spanish support

http://asistencia.foroactivo.com/u23082

Back to top Go down

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?...
avatar
Hagoromo Otsutsuki
Forumember

Male Posts : 573
Reputation : 23
Language : English
Location : Between Time and Space

http://fictionalomniverse.forumotion.com/

Back to top Go down

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
avatar
YoshiGM
Forumember

Male Posts : 571
Reputation : 88
Language : Spanish [Native], English [69%], Italian [16%]
Location : Support Area ~

http://asistencia.foroactivo.com/u21373

Back to top Go down

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.


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

avatar
SLGray
Administrator
Administrator

Male Posts : 39225
Reputation : 2629
Language : English
Location : United States

https://fmthemes.forumotion.com/

Back to top Go down

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?
avatar
BlackScorpion
Graphic Designer
Graphic Designer

Male Posts : 5052
Reputation : 726
Language : English
Location : USA

http://help.forumotion.com

Back to top Go down

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
avatar
Ange Tuteur
Forumaster

Male Posts : 13174
Reputation : 2871
Language : EN10, FR5
Location : Macungie, PA

http://fmdesign.forumotion.com

Back to top Go down

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.
avatar
BlackScorpion
Graphic Designer
Graphic Designer

Male Posts : 5052
Reputation : 726
Language : English
Location : USA

http://help.forumotion.com

Back to top Go down

View previous topic View next topic Back to top


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