The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Add New Facebook "Like" button to your threads Details »» | |||||||||||||||||||||||||||||||||||
Add New Facebook "Like" button to your threads
Developer Last Online: Feb 2022
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}&layout=button_count&show_faces=true&width=450&action=like&colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:px"></iframe> <!-- / 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')" <!-- Facebook Like --> <iframe src="http://www.facebook.com/plugins/like.php?href=http://www.YOURSITE.com/{vb:link thread, {vb:raw thread}}&layout=standard&show_faces=true&width=450&action=like&font=tahoma&colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:75px"></iframe> <!-- / Facebook Like --> </vb:if> ================================================= 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} Download Now
Screenshots
Show Your Support
|
Comments |
#202
|
||||
|
||||
Quote:
|
#203
|
|||
|
|||
Here's the fix that seems to have worked for me.
In the SHOWTHREAD template, edit the following line: From this: <link rel="canonical" href="{vb:raw thread_url}" /> To this: <link rel="canonical" href="http://www.domain.com/forums/{vb:raw thread_url}" /> Even though you pass a url to facebook, they still scrape the page to get the url apparently. This fixes it. |
#204
|
|||
|
|||
Quote:
|
#205
|
|||
|
|||
Hello,
i notice that it doesnt work when your forum is on sub directory of your host like test.com/forum1 it only takes test.com/showthread..etc.. any advice? Thanks |
#206
|
|||
|
|||
When I "like" something on our site it just appears on facebook as "...likes yourdomain.com at yourdomain.com" rather than the specific title such as "...likes apples thread at yourdomain.com" - is this a permissions issue? The links are correct if you click them but the titles in facebook are all the main site title rather than the thread title?
|
#207
|
|||
|
|||
Thank you :up:
|
#208
|
|||
|
|||
Created the ad. Changed the url to our site and forum as in http://site.com/Forum
Left as First Post. Left all display buttons off. Tried changing the size to 50 also. Like button doesn't appear anywhere in any posts. |
#209
|
|||
|
|||
I tried editing the showthread template as described but for the life of me I can not get this to work. I viewed the source and the source code clearly shows the correct URL but it still strips my directory out of the URL... Great idea, just wish it worked!
|
#210
|
|||
|
|||
having the same problem with my forum being in a sub directory off /forum and facebook can not direct to the actual thread.
****Edit**** Here is my error ///////////////// The page at http://www.wwehq.com/forumshowthread...evin-Nash& could not be reached. //////////////// For some reason it is missing the / before showthread.php. Tried editing the SHOWTHREAD but no luck. |
#211
|
|||
|
|||
To all ppl, this works like a charm https://vborg.vbsupport.ru/showpost....32&postcount=2
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|