Vbulletin 3 Facebook Like Button
I’ve added the Facebook Like button to our Vbulletin 3.x in the postbit template (controls the layout of threads) so that users now have the ability to tap the like button for each thread on our site. This should make it easier to share information between the Armchair General forums and our Facebook users and fans.
Here is the code I used to put it into Vbulletin. It should be inserted in the postbit template, in my case at the very end.
<if condition="$post[postcount]==1"> //this tells the system to place the like button after the first post
<div style="padding:6px 0px 0px 0px">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="thead" align="left">Connect With Facebook to "Like" This Thread</td> //this is what shows up in the header of the post itself.
</tr>
<tr>
<td class="alt1" align="left">
<!– Facebook Like –> //the below code is stock from Facebook with the exception of the URL of course.
<iframe src="http://www.facebook.com/plugins/like.php?href=http://armchairgeneral.com/forums/showthread.php?t=$thread[threadid]&layout=standard&show-faces=true&width=500&action=like&colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:500px; height:60px"></iframe>
<!– / Facebook Like –>
<br clear=all>
</td>
</tr>
</table>
</div>
</if>
I found a really nice explanation of the raw Facebook Like code here.
The end result looks like this on the forums:
And on Facebook it looks like this;
Pick any thread in our forums to see it in action!
Thanks alot
Thanks! I owe u a beer if i ever meet you.
Thanks……….
http://dao-alqamar.net