Pages Menu

Categories Menu

Posted on Apr 22, 2010 in Admin

Vbulletin 3 Facebook Like Button

Editorial Staff

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]&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>
<!– / Facebook Like –>
<br clear=all>
</td>
</tr>
</table>
</div>
</if>

{default}

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!

3 Comments

  1. Thanks alot

  2. Thanks! I owe u a beer if i ever meet you.

Trackbacks/Pingbacks

  1. Facebook Like Button for Vbulletin « Brian King’s Blog - [...] Facebook Like Button for Vbulletin [...]