Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Facebook Like Button


Go to End


3 Posts   2798 Views

Avatar
karlevid

Community Member, 10 Posts

23 April 2010 at 10:34pm

The just launch Like Button for Facebook.

http://developers.facebook.com/docs/reference/plugins/like

But with this code your site will be liked no every single page. So it a need for a dynamic url. Something with "$page_url" I guess...

I found this for WordPress

<iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo urlencode(get_permalink($post->ID)); ?>&amp;layout=standard&amp;show-faces=true&amp;width=500&amp;action=like&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:500px; height:60px"></iframe>

Attached Files
Avatar
bummzack

Community Member, 904 Posts

23 April 2010 at 10:39pm

Use $AbsoluteLink ?

Eg. put something like this in the template:

<iframe src="http://www.facebook.com/plugins/like.php?href=$AbsoluteLink&amp;layout=standard&amp;show-faces=true&amp;width=500&amp;action=like&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:500px; height:60px"></iframe>

Avatar
karlevid

Community Member, 10 Posts

23 April 2010 at 11:02pm

Perfect! Banal you are the man!

Live: http://novainteractive.at/projects/