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:	8463
Size:	89.7 KB
ID:	116172   Click image for larger version

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

Name:	fb_like3.JPG
Views:	8305
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.
  #61  
Old 23 Apr 2010, 09:11
TimberFloorAu's Avatar
TimberFloorAu TimberFloorAu is offline
 
Join Date: May 2008
Real name: Blue
Originally Posted by AURFSCAN View Post
confusing..the display and hide are both the same?


how do you combine these conditions?

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

with

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


thx
Quite easily.


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

__________________

My Hacks [ click ] | Steve ~ Administrator for British Expats AustraliaBound.org/forum | Test our forum - user; don pass; pass123
Sports Tipping Mod - coming February 2010 ~ Show your Interest !
Reply With Quote
  #62  
Old 23 Apr 2010, 09:50
Bellinis's Avatar
Bellinis Bellinis is offline
 
Join Date: Aug 2005
One thing I don't understand yet: will this button also show up for users not using facebook/facebook connect?
For people not using FB, this like-button has no use, has it?
Reply With Quote
  #63  
Old 23 Apr 2010, 12:37
Ranger375 Ranger375 is offline
 
Join Date: Jun 2007
Is there a way to use option 2, but have it so that it doesnt show the names of the people who like the post?
Reply With Quote
  #64  
Old 23 Apr 2010, 12:42
worried worried is offline
 
Join Date: Jan 2009
Originally Posted by TimberFloorAu View Post
Quite easily.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.
TimberFloorAu, could you do me a favor and test your script on your forum. It's not working for me.
Reply With Quote
  #65  
Old 23 Apr 2010, 14:18
ericgtr's Avatar
ericgtr ericgtr is offline
 
Join Date: Apr 2003
Originally Posted by Bellinis View Post
One thing I don't understand yet: will this button also show up for users not using facebook/facebook connect?
For people not using FB, this like-button has no use, has it?
Correct, but with 400 million people using FB most who visit forums will probably already have it.
Reply With Quote
  #66  
Old 23 Apr 2010, 15:16
Lizard King's Avatar
Lizard King Lizard King is offline
 
Join Date: Jan 2005
Real name: Mert
vBSEO owners can use the following fix http://www.vbseo.com/f2/facebook-lik...95/#post265997 to get this mode compatible with vBSEO
__________________
Mert G÷kšeimam / Crawlability Inc.

DepKaš | vBSEO 3.3.0 - vBulletin Search Engine Optimisation
Reply With Quote
  #67  
Old 23 Apr 2010, 15:25
War.Frog's Avatar
War.Frog War.Frog is offline
 
Join Date: Aug 2009
I'm not really concerned with the private forums - when I create a Like link in one of those, it just says I like my domain (XXX likes www.domain.com). Not an overly bad thing IMO!
Reply With Quote
  #68  
Old 23 Apr 2010, 15:30
ericgtr's Avatar
ericgtr ericgtr is offline
 
Join Date: Apr 2003
Originally Posted by Lizard King View Post
vBSEO owners can use the following fix http://www.vbseo.com/f2/facebook-lik...95/#post265997 to get this mode compatible with vBSEO
Thanks! Updated the first post with this.
Reply With Quote
  #69  
Old 23 Apr 2010, 15:31
dirtycrow dirtycrow is offline
 
Join Date: Apr 2004
OK, so i don't have VBseo installed, i've tried with both "basic Friendly URLs" and "advanced Friendly URLs" in my Server Settings and Optimization Options panel in the admin cp and on my facebook wall it displayed "likes (the forum name)" as opposed to "like (thread title) on (forum name).

is this how its supposed to work? it there something i'm missing to get the title of the thread to display? please advise.
Reply With Quote
  #70  
Old 23 Apr 2010, 15:33
dirtycrow dirtycrow is offline
 
Join Date: Apr 2004
i run a private forum, is that why my thread title are not being shown? my forum is set up so you have to have an account before you see any content.
Reply With Quote
  #71  
Old 23 Apr 2010, 15:54
ericgtr's Avatar
ericgtr ericgtr is offline
 
Join Date: Apr 2003
Originally Posted by dirtycrow View Post
OK, so i don't have VBseo installed, i've tried with both "basic Friendly URLs" and "advanced Friendly URLs" in my Server Settings and Optimization Options panel in the admin cp and on my facebook wall it displayed "likes (the forum name)" as opposed to "like (thread title) on (forum name).

is this how its supposed to work? it there something i'm missing to get the title of the thread to display? please advise.
To be clear, this modification is setup to work with out of the box VB without VBSEO, that takes a separate plugin to work. As for it now showing the titles properly I would make sure that you don't have any other SEO mods/plugins running.
Reply With Quote
  #72  
Old 23 Apr 2010, 15:56
ericgtr's Avatar
ericgtr ericgtr is offline
 
Join Date: Apr 2003
Originally Posted by dirtycrow View Post
i run a private forum, is that why my thread title are not being shown? my forum is set up so you have to have an account before you see any content.
That will do it, remember that FB has to be able to read the thread as a guest in order to display its title.
Reply With Quote
  #73  
Old 23 Apr 2010, 16:01
dirtycrow dirtycrow is offline
 
Join Date: Apr 2004
Originally Posted by ericgtr View Post
That will do it, remember that FB has to be able to read the thread as a guest in order to display its title.
damn. no work around huh?
Reply With Quote
  #74  
Old 23 Apr 2010, 16:05
NFLfbJunkie NFLfbJunkie is offline
 
Join Date: Sep 2006
I inserted the code so that the FB Like will only show in certain forums, but it continues to show in all forums. I have seen this code in two different ways in this thread. Is either one correct.

<vb:if condition="in_array($forum['forumid'], array(2,14))">Show this to forum 2 and 14</vb:if>

<vb:if condition="in_array($forum['forumid'],array(2,14))">

This is what I have and it doesn't just show these two forums:


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

Reply With Quote
  #75  
Old 23 Apr 2010, 18:27
hiker's Avatar
hiker hiker is offline
 
Join Date: Sep 2009
Originally Posted by Bellinis View Post
One thing I don't understand yet: will this button also show up for users not using facebook/facebook connect?
For people not using FB, this like-button has no use, has it?
Maybe my screenshots will help. If you're not logged into facebook, you'll see this:



And when you are logged into facebook, you'll see this:



Obviously, the above examples are using Option 2.

Option 1 would look like this, and I didn't like the way it was wrapping the text.



And here's option 2 on the same thread:

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 08:29.

Layout Options | Width: Wide Color: