Forum is closed

Howto suppress generating this Javascript code?

Howto suppress generating this Javascript code?


We're using JFBConnect and each page of our site no matter if an article, a menu of what ever kind of Joomla component has the following code embedded. Is there any chance to avoid that JFB software inserts this code fragment into every page? We do have a special Joomla menu page where I do not want that this code gets embedded. I do not mind to patch if you can tell me where this code snippet gets generated and is finally inserted. Within this php file it should be possible to check the url of this given page and ignore insertion of this code?!


<body><div id="fb-root"></div>

<script type="text/javascript">
window.fbAsyncInit = function() {
FB.init({appId: 'MY_APP_ID', status: false, cookie: true, xfbml: true, oauth: true, channelUrl: ''});
     var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
     js = d.createElement('script'); = id; js.async = true;
     js.src = "//";

Thanks for your support

Administrator has disabled public posting. Please login or register in order to proceed.

Re: Howto suppress generating this Javascript code?

That code is in the /plugins/system/jfbcsystem.php file. You can remove it if you really know what you're doing, however, I wouldn't recommend it. That code is required for any of the following features:
* Facebook Login
* Automatic login of users
* Any social widgets (Like, Comment, Fan module, etc)
* Facebook Requests/Invites
* Page Tab / Canvas support

Basically, if you're using any of JFBConnect's features on the page you want to remove it from, those features will no longer work. Additionally, the Facebook Javascript file is something that gets cached in the user's browser. While it is executed on each page (which may take 50milli-seconds or so), it should not be re-downloaded on each page, which is where most of the delay would be introduced.

I hope that helps,

If you use our extensions, please consider leaving a rating and review at the Joomla! Extension Directory:
JFBConnect | SCLogin

24236 Posts
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.
There are 0 guests also viewing this topic
There are 0 users also viewing this topic

Board Info

Board Stats
Total Topics:
Total Polls:
Total Posts:
Posts today:
User Info
Total Users:
Newest User:
Members Online:
Guests Online:

There are no members online
Social Stream
Refer and Earn

Like our extensions? You're not alone! That's why they're used on tens of thousands of websites. Now you can earn 20% of any sale you refer to

We provide excellent documentation, well laid out sales pages and great support. All you need to do is spread the word and we'll take care of the rest.

Learn About Our Affiliate Program