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']) ?>&layout=standard&show_faces=false&width=450&action=like&font=arial&colorscheme=light&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