Put a check on hook_footer to only load add fb script where any other fb plugin requires it.

CommentFileSizeAuthor
fb_social_footer_js.patch5.71 KBchia

Comments

ju.ri’s picture

I just tested this patch with 6.x-1.0-beta5 and it seems to work. Thanks a lot! The loading of the facebook script on every page made my site very slow. This solves the problem.

YK85’s picture

subscribing - performance improvements would be great!

mr.j’s picture

I was just about to post this as a new issue, then I found yours.

The facebook javascript is added with hook_footer indiscriminately.
It is 108K in size and by far the largest script on our site.

I don't want it:
- on non-node pages where there is no like button
- on any page that doesn't have a facebook block on it
- on any of my admin pages

Not sure why its writing it directly in hook_footer instead of using drupal_add_js either.

jmuessig’s picture

Thanks for the patch!!

This helps me with fb_social breaking my SSL / securepages security by loading the insecure script on every page (even secure ones).

ferdi’s picture

Status: Needs review » Closed (fixed)
doublejosh’s picture

Looks like the commit happened at 23:00 and the 1.0-beta6 release was done at 17:00 :(

Am I wrong? Is this in beta 6?

Bruno-2M’s picture

Status: Closed (fixed) » Active

It works well, except on a page with a view with a field fb social like button where the js doesn't load anymore. I downgrade to 6.x-1.0-beta5 and like button appear again.

ferdi’s picture

ferdi’s picture

Status: Active » Closed (fixed)
venusrising’s picture

Status: Closed (fixed) » Active

wondering what version this is a patch against. Beta 6 Social kills the Connect Button. Not sure if this is a patch for 5 or 6 or if it is for a dev release. willing to give the patch a shot

vlooivlerke’s picture

if this is in 6 it is not working. Any ideas

ferdi’s picture

Status: Active » Closed (fixed)
tribsel’s picture

Status: Closed (fixed) » Active

Hi,

i have problem with this. How can I now show fb social plugins on pages generated by views? or at pages like user profile page?
Imagine you have fb like box in footer. Isnt it strange that it disappears on some of your pages?

dasjo’s picture

Status: Active » Closed (fixed)

i think #13 should go into a separate follow up issue

blogers’s picture

Facebook connect dont show more the button on drupal 6 module 6.x-2.0-beta1 what hapend dont interest on edit this module very importnat for pymes webs increible