I think it would be very useful an option to provide a configurable "site-wide-universal LIKE block", like the module http://drupal.org/project/fblikebutton already does:

Along with a like button appearing for each node, there is an optional block that can be set to appear on each page whose linkage doesn't change (kind of like a universal, site-wide, Like-our-site-on-Facebook type of option to go alongside each individual node's Like-this-page-on-Facebook option)

Thank you very much for your work and for considering this.


MrGeek’s picture

i second this - but it has to look nice..
I've restored to hacking my own universal "like" into my theme.

MXT’s picture

Maybe we can simply add an option to provide a fixed "data-href" (that in most cases, will be the website URL) within the Fb plugin attributes in the LIKE button preset.

If this option is filled, the module will print the fixed entry as value in the "data-href" attribute, and not the current complete url where the user is navigating.

What do you think?

janton’s picture

Yes.. this is what i was looking for, can't we provide the "URL to Like"
simular to the normal facebook like creator: http://developers.facebook.com/docs/reference/plugins/like/

For example if i want the users to Like my Facebook Page i need to fill in my Facebook page:

unfortunally this it not done yet? i believe this is "data-href" yes..

janton’s picture

I just did a small hack in like.inc (*i have drupal 6 development version)

add this line below line 41

  $form['href'] = array(
    '#type' => 'textfield',
    '#title' => t('URL to Like'),
    '#description' => t('If you like you can specify a special URL')

Now i could specify a link :)

janton’s picture

Status:Active» Needs review

I tested it, it works if you don't fill in any url (then is just used the url as before) and if you type a URL it will use that one.

Perhaps this can be patched in the d7 and d6 version? Needs review!

parvell’s picture

I need this feature too. Subscribe

andershal’s picture

new531 bytes

Here is a patch for 7.x-2.x

ellen.davis’s picture

Patch worked for me.

faizan_abid’s picture

Summit’s picture

Status:Needs review» Reviewed & tested by the community

Greetings, Martijn

dbassendine’s picture

new8.82 KB

Allowing the existing Like block to reference a fixed URL will be useful. However this approach doesn't really fit my use case or the one described in the issue - that is, to have a like button for each page and one in the header that references the site's main URL or FB page. I'd argue this is the most common use case.

To this end, I've cloned the existing Like module and stripped it down to the very basics to provide a secondary Like button that can be used alongside the existing page-by-page one (fb_social_like_sitewide module, admin: admin/settings/fb/social/likesitewide). The client project this is for was using 6.x-1.x so this is a bit behind the times but hopefully a similar approach could be used in 6.x-2.x and 7.x-2.x.

Hope this helps - David

loparr’s picture

patch from #works. Thank you

@dbassendine I think that patch from #7 is enough for you. In your case, you can create 2 plugins using like button - one with empty field for url - that would be for liking every specific page and second plugin would be with your fb fan page. Each plugin can create blocks so you can position it anywhere.