![]() |
Add New Facebook "Like" button to your threads
1 Attachment(s)
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 --> 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} Code:
<vb:if condition="(THIS_SCRIPT == showthread) AND ($post[postcount] == '1')" ================================================= 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} Code:
{vb:raw picturecomment_commentarea} |
1 Attachment(s)
Fix with me ! Demo : http://s2facebook.com/forum/showthread.php?854
Open Postbit temp search Code:
{vb:raw ad_location.thread_first_post_content} Code:
<!-- Facebook Like --> |
I also get "error"
The page at http://mysitehere.net/showthread.php?t could not be reached. Also it seems not to work with VBSeo |
Would be great to have a dislike button as well.
Can it also be tagged to each post in a thread or can it only deal with first post? |
Quote:
|
I changed the width to =50 so that it didnt push the content around
|
Suggestion: Can you create a hack like this so users can like members profiles?
|
To anyone getting a submit error, be sure your URL is correct. Also, I have not tested with vbseo and it will most likely need to be re-worked for that.
@trackpads I will look into that, I'm sure the parameters will have to be modified for that page. |
looks like sweet addon thanks :D
|
Can this also be used with 3.8.X?
|
Very cool little add-on, but will need to re-work it to work with vbSEO
installed+rating good job :) |
i get an error =
Quote:
|
Quote:
|
Quote:
|
Quote:
|
Quote:
Quote:
Code:
{vb:link thread, {vb:raw thread}, {vb:raw pageinfo_post}}#post{vb:raw post.postid} |
If someone could supply the variable names to make this work on 3.8.X I'd really appreciate it.
|
Even taking the stock "share" IFRAME from facebook, is giving me an error right now. Perhaps their system is overloaded?
|
Using the code from the 2nd post mine looks like this with VBSEO installed. and I think it's a pretty cool mod.
Obviously I'm using Adsense so it makes more sence to have the like button beneath the title, but I've found no problems with VBSEO. https://vborg.vbsupport.ru/ One question, I have though is there a conditional, I can use to exclude certain forums? |
Quote:
|
Quote:
Obviously the error is there to prevent people from having what they like link back to the wrong thing, but it's a tad annoying that it doesn't work with the way vbseo does it. Does it work with the vB4 SEO options? |
Quote:
|
Quote:
Great effect! How you have done? Can you give me the code please? |
Yes it's in the 2nd post of this thread.
https://vborg.vbsupport.ru/showpost....32&postcount=2 Maybe the VBSEO problem is to do with the type of url rewrite you use, I use 002 - Hierarchic directory type URLs with content relevant threads (used at www.vBSEO.com) for my forumURL's, but obviously if your using a different type of URL rewrite it's not something you want to change. Also not wanting to be a pest but can anybody answear this? Is there a conditional, I can use to exclude certain forums? The reason being we have a few private forums which I would prefer not to be displayed on Facebook, and although I can tell the members who have access to said forums not to click the Like button in the said sections, you will always get one or two, who will. |
Nice mod. Will install it soon. I was waiting for this since the news of Facebook discontinuing the Facebook Connect soon.
|
On multi-page threads, it will put up the like text/icons at the top of every page.
Less than ideal, I'd like to see it only on page 1/post 1 of a thread... Quote:
|
Quote:
|
Cool glad it's worked for you, but I take no credit for any of the work, I just used what was available to me.
|
Quote:
In Postbit (or legacy) find: Code:
{vb:raw ad_location.thread_first_post_content} Code:
<vb:if condition="(THIS_SCRIPT == showthread) AND ($post[postcount] == '1')" |
Excellent, eric. Thank you SO much. I'll just add an additional conditional to exclude some forums and we should be all set!
|
Quote:
Code:
<vb:if condition="in_array($forum['forumid'], array(1,2,3))">Show this to forum 1, 2 and 3</vb:if> |
Quote:
Working perfectly! |
Very cool! I've done in like it post 29 and edited it so that the height=30 instead of 75 and it looks really good.
Would you put that forum conditional right underneath the code from post 29? |
|
Any luck with vbseo, none work for me:
I get errors like: Code:
htp://forum.kitecrowd.com/%7Bvb:link%20thread,%20%7Bvb:raw%20thread%7D%7D could not be reached. |
Quote:
|
Works a treat thanks Eric
|
Shouldnt :
<vb:if condition="(THIS_SCRIPT == showthread) AND ($post[postcount] == '1')" be <vb:if condition="(THIS_SCRIPT == showthread) AND ($post[postcount] == '1')"> |
Quote:
Quote:
|
No he forgot closing bracket ">"
|
All times are GMT. The time now is 03:18 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|