Back to vBulletin 3.8 Template Modifications

Add "LIKE" button and other Facebook plugins to threads.
Mod Version: 1.4, by Xtrigit

vB Version: 3.8.x Rating: (5 votes - 5.00 average) Installs: 55
Released: 26 May 2010 Last Update: 05 Jul 2010 Downloads: 329
Not Supported Template Edits  

UPDATED: 7/4/10

What's new?
Facebook Comment Box


I recently added the new facebook "Like" button to my forum and I want to share with everyone!

Yes, this is IE,Firefox, Opera, Safari compatible.
Yes, this will also show a "comment" box when hover over.

First thing's first:

1. Go to https://www.facebook.com/developers/createapp.php (Facebook account required)

2. Enter your site name in the "Application Name" field... "agree" - "Create new app"

3. Click the Website tab

4: Enter your site URL in the "Connect URL" field.

i.e. http://www.DOMAIN.com/ (Don't forget the SLASH).

5. Enter DOMAIN.com in the "Base Domain" field and save.

6. In the next page you will see an "Application ID" number. (you'll need it later... keep the window open for now)

Template Edits:

headinclude:
Under:
PHP Code:
<meta name="generator" content="vBulletin $vboptions[templateversion]/> 
Paste:
PHP Code:
<meta property="og:title" content="$threadinfo[title]"/>
<
meta property="og:site_name" content="$vboptions[bbtitle]"/>
<
meta property="og:type" content="website" />
<
meta property="og:image" content="IMAGEPATH"/>
<
meta property="fb:admins" content="YOUR PROFILE ID"/> 

* Replace IMAGEPATH with the actual path to the image you want to be displayed on people's facebook wall. (You can use your site logo)
*YOUR PROFILE ID = https://www.facebook.com/profile.php?id=randomnumbers

++++++++++++++++++++++++++++++++++++++++++++++++++++++++

SHOWTHREAD
Find:
PHP Code:
<html xmlns="http://www.w3.org/1999/xhtml" dir="$stylevar[textdirection]lang="$stylevar[languagecode]"
Replace with:
PHP Code:
<html xmlns="http://www.w3.org/1999/xhtml" dir="$stylevar[textdirection]xmlns:fb="http://www.facebook.com/2008/fbml" lang="$stylevar[languagecode]"
++++++++++++++++++++++++++++++++++++++++++++++++++++++++

under:
PHP Code:
<body onload="$onload"
Paste:
PHP Code:
<div id="fb-root"></div>
<
script src="/images/fb.js" type="text/javascript"></script
*Download and open the attached .js file, Replace "APP ID" with your actual app ID. (not to be confused with profile ID)
*Save and upload fb.js to root/images
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Find:
PHP Code:
<!-- / multiquote scripts -->
</if> 
Add below:
PHP Code:
<!-- Facebook Comment --> 
<
br /> 
<if 
condition="in_array($bbuserinfo[usergroupid],array(1))"><div align="center">
<
fb:comments numposts="3" width="800"></fb:comments>
</
div></if>
<!-- / 
Facebook Comment --> 
*This will place the Facebook Comment box below the last post, you may change the width to your liking.
*The comment box will only be shown to guests.
++++++++++++++++++++++++++++++++++++++

Now we need to place the "LIKE" button somewhere visible.

I use postbit_legacy so, this is what I did:
Find:
PHP Code:
<if condition="$post['title']"><strong>$post[title]</strong></if>
            </
div
Add below:
PHP Code:
<if condition="$post[postcount] == 1"><table style="background-color: #ff0000;">
<
tr style="background-color: yellow;">
<
td style="background-color: #fff;" align="right"><fb:like href="$vboptions[bburl]/showthread.php$session[sessionurl]?p=$post[postid]width="260"></fb:like></td>
</
tr>
</
table></if> 
* This will place the like button below the first post of every thread.
* you may change the table color to suit your needs.
---------------------------------------------------------------------------
Thanks to BirdOPrey5 for pointing out some mistakes.

Mark as Installed if you use this modification.


DONE! =]

Download

File Type: %1$s Facebook Files.zip (680 Bytes, 383 downloads)

Screenshots

Click image for larger version
Name:	1.png
Views:	1743
Size:	4.7 KB
ID:	119243   Click image for larger version
Name:	2.png
Views:	2000
Size:	7.0 KB
ID:	119244   Click image for larger version
Name:	3.png
Views:	2163
Size:	11.1 KB
ID:	119245   Click image for larger version
Name:	4.png
Views:	1966
Size:	15.6 KB
ID:	119246  

Click image for larger version
Name:	5.png
Views:	1715
Size:	16.6 KB
ID:	119247  

Similar Mods

Show Thread Enhancements Add New Facebook "Like" button to your threads vBulletin 4.x Template Modifications
Add-On Releases Add Facebook "Like" button to your threads [vB 3.8.x] vBulletin 3.8 Add-ons

vblts.ru supports vBulletin®, 2022-2024