Armchair General small spacer
Armchair General magazine masthead

Vbulletin 3 Facebook Like Button

By Brian King Admin |  Published: April 22, 2010 at 4:39 pm

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://www.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>

Subscribe Today

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!



Armchair General Spacer

Tags:

4 Responses to “Vbulletin 3 Facebook Like Button”


  1. 1

    [...] Facebook Like Button for Vbulletin [...]

  2. 2
    dao-alqamar says:

    Thanks alot

  3. 3
    yoda says:

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

  4. 4
    Moonlight says:

    Thanks……….
    http://dao-alqamar.net



Leave a Reply

Related Articles


Armchair General Spacer Armchair General Spacer
ARMCHAIR GENERAL POLL 

Q: Which of these was your favorite military history documentary series?

View Results | See previous polls

STAY CONNECTED WITH US 
RSS Feed Daily Email Updates

What is Armchair General?

Armchair General is the INTERACTIVE history magazine where YOU COMMAND and decide the course of action!

Armchair General (ACG) and ACG online feature a unique, interactive editorial approach that invites the reader to decide the course of action in challenging historical scenarios, to step into the shoes of a battlefield commander. Leading historians and contributors lend integrity and credibility to this fresh presentation of historical and contemporary events.

Armchair General's Feedburner Link Get our RSS!
Weider History Group Newsletter Newsletter Signup

What We Write About
Our Other Magazines

Weider History Network:  Armchair General | HistoryNet | Achtung Panzer!
Historic Site Reviews | Today in History | Picture of the Day | Daily History Quiz | Military History Forums

Copyright © 2004-2011 Armchair General L.L.C., All rights reserved. Reproduction in whole or in part without permission is prohibited.
Contact Us | Advertise With Us | Subscription Help