Add "LIKE" button and other Facebook plugins to threads.
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]" />
PHP Code:
<meta property="og:title" content="$threadinfo[title]"/>
* 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]">
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">
PHP Code:
<div id="fb-root"></div>
*Save and upload fb.js to root/images +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Find: PHP Code:
<!-- / multiquote scripts -->
PHP Code:
<!-- Facebook Comment -->
*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>
PHP Code:
<if condition="$post[postcount] == 1"><table style="background-color: #ff0000;">
* 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
Facebook Files.zip (680 Bytes, 383 downloads) Screenshots |
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 |