Back to vBulletin 4.x Template Modifications

Add New Facebook "Like" button to your threads
Mod Version: 1.2, by ericgtr

vB Version: 4.0.2 Rating: (32 votes - 4.84 average) Installs: 326
Released: 22 Apr 2010 Last Update: 23 Apr 2010 Downloads: 1046
Not Supported Re-usable Code  

Please remember to click Mark as Installed if you use this modification.

Facebook has just launched their latest "Like" button to developers to use on any site. What this does is utilizes the Advertising module to add the "Like" button to the first post of each thread. Please see screenshots to get an idea.

In your Admin CP go to Advertising > New Ad > Choose "Thread" from the dropdown and then select the first thread box. Give it a title (I called mine FB Like) leave "First Post Content" at default and paste in this code:
HTML Code:
<!-- Facebook Like -->
<iframe src="http://www.facebook.com/plugins/like.php?href=http://www.YOURSITE.com/{vb:link thread, {vb:raw thread}, {vb:raw pageinfo_post}}#post{vb:raw post.postid}&amp;layout=button_count&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:px"></iframe>
<!-- / Facebook Like -->
Be sure to change YOURSITE.com to your URL including your forum.

The VBSEO team has instructions on how to make this work for their product here http://www.vbseo.com/f2/facebook-like-button-vbulletin-42695/#post265997

===========================================
Option 2 (different from above, do not use together) will show at top, see screenshot #3

In Postbit (or legacy) find:
Code:
{vb:raw ad_location.thread_first_post_content}
Add this after:
Code:
<vb:if condition="(THIS_SCRIPT == showthread) AND ($post[postcount] == '1')"
<!-- Facebook Like -->
<iframe src="http://www.facebook.com/plugins/like.php?href=http://www.YOURSITE.com/{vb:link thread, {vb:raw thread}}&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;font=tahoma&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:75px"></iframe>
<!-- / Facebook Like -->
</vb:if>
For additional information on this button and different parameters please visit https://developers.facebook.com/docs/reference/plugins/like

=================================================

For those who have asked, here is the modification adds both the "Like" button and comments to a users profile Add Facebook comments to user profile

=================================================
Additional locations to place this code:

For CMS, in vbcms_content_article_page add the code below this:
Code:
{vb:raw comment_block}
For pictures, in template album_pictureview add the code below this:
Code:
{vb:raw picturecomment_commentarea}
For Blog, in template blog_show_entry add at the very top.

Download

File Type: %1$s fb_like.txt (946 Bytes, 1068 downloads)

Addons

Screenshots

Click image for larger version
Name:	fb_like.JPG
Views:	8505
Size:	89.7 KB
ID:	116172   Click image for larger version
Name:	fb_like2.JPG
Views:	4392
Size:	11.7 KB
ID:	116173   Click image for larger version
Name:	fb_like3.JPG
Views:	8341
Size:	41.0 KB
ID:	116182  


vblts.ru supports vBulletin®, 2022-2024