How to add facebook like to an InVision forums template

Adding facebook like to an InVision forums template turned out to be very easy, but it did take me over an hour to work out how. As a result I thought it best to share this code sample to save others hours of google’ing for the answer or banging their head against the table for as long as I did.

Initially I thought it would be as easy to add a short block of PHP to a template file so I tried to use:

<iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo urlencode('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']) ?>&amp;layout=standard&amp;show_faces=false&amp;width=450&amp;action=like&amp;font=arial&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true"></iframe>

Continue reading How to add facebook like to an InVision forums template