vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Miscellaneous Hacks - Facebook Like button (https://vborg.vbsupport.ru/showthread.php?t=266043)

gakz 06-29-2011 10:00 PM

Facebook Like button
 
1 Attachment(s)
There are a few facebook like buttons floating around... This is the one that I can say 100% works on my 4.1.4 board.

What it will do:
-Add your facebook like to the thread in the first post only
-Display your name and thumbnail for your profile picture
-It will post the thread, with the thread title on your news feed/wall



Preview:

https://vborg.vbsupport.ru/external/2011/06/6.png



I placed the code after:
PHP Code:

{vb:raw ad_location.thread_first_post_content

in the postbit_legacy



Facebook Like button Code:

PHP Code:

<!-- Facebook Like -->
<
iframe src="http://www.facebook.com/plugins/like.php?href=http://www.YOURURL.com/forum/{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:75px"></iframe>
<!-- / 
Facebook Like --> 

The width and height are adjustable... If you get a lot of likes and notice some profile thumbnails cut off you can adjust to fit them all... or you can adjust to remove thumbnails completely.


Replace:
PHP Code:

http://www.YOURURL.com/forum/ 


With the URL and installed folder of your domain. For example... I use:
PHP Code:

http://www.properimage.net/forum/ 


Because my Forum is installed in:
PHP Code:

http://www.properimage.net/forum/forum.php 










Credit goes to Facebook for giving the tools to make the code.

This code may NOT work properly with certain MODS or vbSEO features... It should work with all mods and vbSEO stuff though

gakz 06-30-2011 11:59 AM

Please mark as installed if used! Thank you!


All times are GMT. The time now is 11:45 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01022 seconds
  • Memory Usage 1,722KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete