Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Add New Facebook "Like" button to your threads Details »»
Add New Facebook "Like" button to your threads
Version: 1.2, by ericgtr ericgtr is offline
Developer Last Online: Feb 2022 Show Printable Version Email this Page

Category: Show Thread Enhancements - Version: 4.0.2 Rating:
Released: 04-21-2010 Last Update: 04-21-2010 Installs: 326
Re-useable Code  
No support by the author.

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-lik...95/#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 http://developers.facebook.com/docs/...e/plugins/like

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

For those who have asked, here is the modification adds both the "Like" button and comments to a users profile https://vborg.vbsupport.ru/showthread.php?t=239424

=================================================
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 Now

File Type: txt fb_like.txt (946 Bytes, 1066 views)

Screenshots

File Type: jpg fb_like.JPG (89.7 KB, 0 views)
File Type: jpg fb_like2.JPG (11.7 KB, 0 views)
File Type: jpg fb_like3.JPG (41.0 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #252  
Old 09-15-2014, 11:38 PM
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Location: USA
Posts: 10,929
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by afterburn25 View Post
this mod is crap I installed it quickly realized wasn't what i wanted deleted the line out of postbit and guess what it wont get rid of the like i tried everything it wont get rid of it now I would replace the postbit file but I dont know where to find it also have a feeling it but it somewhere else so i cant get rid of it
If you follow the install instructions, in the reverse order, it should get rid of everything you did.
Reply With Quote
  #253  
Old 09-16-2014, 02:09 AM
afterburn25 afterburn25 is offline
 
Join Date: Apr 2013
Posts: 52
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ozzy47 View Post
If you follow the install instructions, in the reverse order, it should get rid of everything you did.
didnt you hear i did all i did was add that snipit to postbit template i took it out yet its still there ive even cleared cache on browser and forums and yet its still there
Reply With Quote
  #254  
Old 09-16-2014, 02:30 AM
tbworld tbworld is offline
 
Join Date: Oct 2008
Posts: 2,126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If the master style is not modified, then generate a new style parent. Does the modification still exist when using this new parent style? If yes, then you accidentally modified the master style. In this case use "tools.php" and reload the master style.

Always make a backup copy of your board before implementing any modification.

Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:10 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04865 seconds
  • Memory Usage 2,276KB
  • Queries Executed 19 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_code
  • (1)bbcode_html
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (3)postbit
  • (4)postbit_attachment
  • (4)postbit_onlinestatus
  • (4)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete