Facebook problem

GK User
Fri Dec 30, 2011 8:50 pm
Hi! I have recently updated the template and now i am using Joomla 1.7. I am using an outside component for Facebook logins etc., but it does not work, because something in the template is bothering it. It is visible in the source code of the DEMO TEMPLATE of this template for Joomla 1.7:

Code: Select all
<div id="fb-root"></div>
<script type="text/javascript">
    //<![CDATA[
    FB.init({appId: '24242342', status: true, cookie: true, xfbml: true});
    $gkFBLoginClicked = false;
    window.addEvent('load', function(){
       (function(){
          if($$('.fb_button.fb_button_medium')[0]){
             $$('.fb_button.fb_button_medium')[0].addEvent('click', function(){
                if($('login-form')){
                   FB.getLoginStatus(function(response) {
                      if (response.session) {
                         $('modlgn-username').set('value','Facebook');
                         $('modlgn-passwd').set('value','Facebook');
                         $('login-form').submit();
                      }
                   });
                } else if($('com-login-form')) {
                   FB.getLoginStatus(function(response) {
                      if (response.session) {
                         $('username').set('value','Facebook');
                         $('password').set('value','Facebook');
                         $('com-login-form').submit();
                      }
                   });
                }
                
                $gkFBLoginClicked = true;
             });
          }
       }).delay(1000);
    });
   
    FB.Event.subscribe('auth.sessionChange', function(response) {
       if (response.session && $gkFBLoginClicked) {
          if($('login-form')){
             $('modlgn-username').set('value','Facebook');
             $('modlgn-passwd').set('value','Facebook');
             $('login-form').submit();
          }
       }
    });
    //]]>
</script>



How can i remove this from template?
User avatar
Fresh Boarder

teitbite
Fri Dec 30, 2011 9:07 pm
Hi

Please disable facebook connect plugin and disable facebook connect in template settings.
User avatar
Moderator

GK User
Fri Dec 30, 2011 9:49 pm
I have disabled Facebook login in Template Parameters and disabled Authentication - Facebook and GK Open Graph plugins and I still have this code:

<div id="fb-root"></div>
<script type="text/javascript">
//<![CDATA[
window.fbAsyncInit = function(){
FB.init({appId: '', status: true, cookie: true, xfbml: true});
// IE fix
FB.UIServer.setLoadedNode = function (a, b) {
FB.UIServer._loadedNodes[a.id] = b;
};
};

window.addEvent('load', function(){
(function(){
var e = document.createElement('script');
e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
e.async = true;
document.getElementById('fb-root').appendChild(e);
}());
});
//]]>
</script>
User avatar
Fresh Boarder

teitbite
Mon Jan 02, 2012 7:48 am
Hi

That's odd. Please show me Your site.
User avatar
Moderator


cron