Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Add New Facebook "Like" button to your threads Details »
Add New Facebook "Like" button to your threads
Mod Version: 1.2, by ericgtr (Coder/Designer) ericgtr is offline
Developer Last Online: Jun 2016 I like it Show Printable Version Email this Page

vB Version: 4.0.2 Rating: (32 votes - 4.84 average) Installs: 326
Released: 22 Apr 2010 Last Update: 22 Apr 2010 Downloads: 1039
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:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

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:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Add this after:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

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 http://www.vbulletin.org/forum/showthread.php?t=239424

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

For CMS, in vbcms_content_article_page add the code below this:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

For pictures, in template album_pictureview add the code below this:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

For Blog, in template blog_show_entry add at the very top.

Download Now

Only licensed members can download files, Click Here for more information.

Addons

Screenshots

Click image for larger version

Name:	fb_like.JPG
Views:	8472
Size:	89.7 KB
ID:	116172   Click image for larger version

Name:	fb_like2.JPG
Views:	4371
Size:	11.7 KB
ID:	116173   Click image for larger version

Name:	fb_like3.JPG
Views:	8314
Size:	41.0 KB
ID:	116182  

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • If you like this modification support the author by donating.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
  #106  
Old 01 May 2010, 08:10
ijob ijob is offline
 
Join Date: Sep 2005
have installed this. cheers.

how do you include tweets like in my attached image?
Attached Images
File Type: jpg Untitled-2.jpg (327.0 KB, 54 views)
Reply With Quote
  #107  
Old 01 May 2010, 08:59
wIrEs wIrEs is offline
 
Join Date: Dec 2006
any way to display "Be the first of your friends to like this." in a different language ? like spanish or french. What i am trying to say is when a user changes the Forum Language from the bottom of the page, the phrase "Be the first of your friends to like this." should change accordingly.
(installed) thanks!
Reply With Quote
  #108  
Old 01 May 2010, 20:28
RockstarNetwork's Avatar
RockstarNetwork RockstarNetwork is offline
 
Join Date: Feb 2010
Originally Posted by ericgtr View Post
Here's some suggestions.

For CMS, in vbcms_content_article_page add the code below this:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

For pictures, in template album_pictureview add the code below this:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

This gives you the idea, I haven't added it to the blog yet but it's just a matter of locating the right template.
This doesn't seem to work for me. No like button appears in the CMS article. I tried changing "THIS_SCRIPT == showthread" to "THIS_SCRIPT == content" with no luck either.

Any tips?
__________________
Rockstar Network - We keep an eye on Rockstar Games so you don't have to!
Reply With Quote
  #109  
Old 01 May 2010, 21:28
unfv unfv is offline
 
Join Date: Apr 2008
It worked for me, I have VB 4.0.3
__________________
UNFV
Reply With Quote
  #110  
Old 02 May 2010, 00:38
RockstarNetwork's Avatar
RockstarNetwork RockstarNetwork is offline
 
Join Date: Feb 2010
Okay I got it to work by removing the first and last lines containing the "<vb:if..." and "</vb:if>" code. Now to reposition it somewhere that's a bit more appealing...

Also, I'm having the same issue as on the previous page where it links to the forum thread for the article instead of the article itself. Any ideas on how to change that?

Edit: Resolved the above with this code in the cms article template:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

__________________
Rockstar Network - We keep an eye on Rockstar Games so you don't have to!

Last edited by RockstarNetwork; 02 May 2010 at 00:58.
Reply With Quote
  #111  
Old 02 May 2010, 15:27
salvador21 salvador21 is offline
 
Join Date: Mar 2009
Originally Posted by ericgtr View Post
Here's some suggestions.

For CMS, in vbcms_content_article_page add the code below this:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.
This didn't work for me, it's fine on forum threads though (in the postbit legacy template)

EDIT: and rockstarnetworks code isn't working either.

Also, any idea how to get it working in blogs?

Last edited by salvador21; 02 May 2010 at 15:34.
Reply With Quote
  #112  
Old 03 May 2010, 13:51
asus78's Avatar
asus78 asus78 is offline
 
Join Date: Feb 2010
How do i get this for my articles and user blogs (cms)

that makes even more sense than just in the forum...
Reply With Quote
  #113  
Old 03 May 2010, 15:27
ericgtr's Avatar
ericgtr ericgtr is offline
 
Join Date: Apr 2003
Originally Posted by salvador21 View Post
This didn't work for me, it's fine on forum threads though (in the postbit legacy template)

EDIT: and rockstarnetworks code isn't working either.

Also, any idea how to get it working in blogs?
Originally Posted by asus78 View Post
How do i get this for my articles and user blogs (cms)

that makes even more sense than just in the forum...
I've updated the first post to give the locations frequently asked here, these include photo albums, blogs and vbcms.
Reply With Quote
  #114  
Old 04 May 2010, 18:19
maipoman maipoman is offline
 
Join Date: Dec 2002
But when you add this to a vbcms article, the link that is posted on Facebook is the one to vBCms Comments forum, not the article itself. Is there a way to fix this?
Reply With Quote
  #115  
Old 05 May 2010, 00:35
RockstarNetwork's Avatar
RockstarNetwork RockstarNetwork is offline
 
Join Date: Feb 2010
Originally Posted by maipoman View Post
But when you add this to a vbcms article, the link that is posted on Facebook is the one to vBCms Comments forum, not the article itself. Is there a way to fix this?
See my post #110 above to fix this.
__________________
Rockstar Network - We keep an eye on Rockstar Games so you don't have to!
Reply With Quote
  #116  
Old 05 May 2010, 07:02
maipoman maipoman is offline
 
Join Date: Dec 2002
Originally Posted by RockstarNetwork View Post
See my post #110 above to fix this.
Thank you, that worked like a charm!
Reply With Quote
  #117  
Old 05 May 2010, 08:32
Jabong82 Jabong82 is offline
 
Join Date: Feb 2010
Hey great Mod. I want to use this on my blog, but I think I need to modify the code?

I tried to use the post bit legacy version and did this:


<!-- Facebook Like -->
<iframe src="http://www.facebook.com/plugins/like.php?href=http://www.YOURSITE.com/{vb:link blog, {vb:raw blog}}&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;fon t=tahoma&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:75px"></iframe>
<!-- / Facebook Like -->



Using this code it posts to facebook however the title is wrong, and it doesn't go to the specific blog, but rather all of the users blogs.


Is there a way to use the PostBit Legacy version you posted of the mod but make it work for blogs in the exact same way? (ie. posts blog title on FB and connects to the right blog?).

I know your other mod where you add the FB comment box has a "like" button that accomplishes this. I would like that basically without the cumbersome comment box (only like button).

Thanks in advance.
Reply With Quote
  #118  
Old 05 May 2010, 13:08
gyaronn's Avatar
gyaronn gyaronn is offline
 
Join Date: Dec 2009
How can i add this to my CMS 2 ?
__________________
http://s3.amazonaws.com/ember/3QZPu7C2j62bYc44PpHqtznsowfSxznK_m.png

WWW.FMSAS.ORG
Reply With Quote
  #119  
Old 05 May 2010, 14:34
ericgtr's Avatar
ericgtr ericgtr is offline
 
Join Date: Apr 2003
Originally Posted by gyaronn View Post
How can i add this to my CMS 2 ?
This code can be used pretty much anywhere, so it's just a matter of finding a location in your template for it. Not sure about CMS2 but what I normally do is find the template then look for keywords on the page that correspond to that template for placement ideas.
Reply With Quote
  #120  
Old 05 May 2010, 20:45
gyaronn's Avatar
gyaronn gyaronn is offline
 
Join Date: Dec 2009
ok and another question i am traying to make a Like Box from facebook as a widget at my web site (www.fmsas.org) by using this code :
<iframe src="http://www.facebook.com/plugins/likebox.php?profile_id=189546965717&amp;width=226& amp;height=295&amp;connections=6&amp;stream=false& amp;header=false" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:226px; height:295px;" allowTransparency="true"></iframe>
but for some reason it does not work can any one help me?
__________________
http://s3.amazonaws.com/ember/3QZPu7C2j62bYc44PpHqtznsowfSxznK_m.png

WWW.FMSAS.ORG
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

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


New To Site? Need Help?

All times are GMT. The time now is 20:50.

Layout Options | Width: Wide Color: