The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Add Facebook "Like" button to your threads [vB 3.8.x] Details »» | |||||||||||||||||||||||||||||||||||||||
Add Facebook "Like" button to your threads [vB 3.8.x]
Developer Last Online: Jun 2013
This mod is based on this, but working on vB 3.8.x.
As was said there: 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. DEMO IFrame Method There is two kind of "Like" button (IFrame Method): - With a smallest counter at his side * Code:
<iframe src="http://www.facebook.com/plugins/like.php?href=http://www.YOURSITE.com/showthread.php$session[sessionurl]?p=$post[postid]&layout=button_count&show_faces=true&width=&action=like&colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:100px; height:20px"></iframe> - With a largest counter (and names of people who have clicked) * Code:
<iframe src="http://www.facebook.com/widgets/like.php?href=http://www.YOURSITE.com/showthread.php$session[sessionurl]?p=$post[postid]&show_faces=false& scrolling="no" frameborder="0" style="border:none; width:450px; height:25px"></iframe> Installation: Go to your Postbit/Postbit Legacy template and search for: Code:
<!-- controls --> If you want that the button only appears in first post of a thread, add this variables at the beginning and end of the code that you previously selected: Code:
<if condition="$post[postcount] == 1">YOUR CODE</if> XFBML Method (recommended) This is a richer way to send the contents of your board to Facebook, because it gives to users the possibility to add more information and also an image of your site is displayed on their FB wall (see the screenshots below). Installation: (provided by cdoyle, thanks mate :up You'll need to register your app here: http://developers.facebook.com/setup/, and get an ID to place into the code below. Code:
<if condition="$post[postcount] == 1 AND !in_array($GLOBALS[forumid], array(40, 39))"> <p><fb:like></fb:like></p> <div id="fb-root"></div> <script> window.fbAsyncInit = function() { FB.init({appId: 'yourappID', status: true, cookie: true, xfbml: true}); }; (function() { var e = document.createElement('script'); e.type = 'text/javascript'; e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js'; e.async = true; document.getElementById('fb-root').appendChild(e); }()); </script> </if> Internet Explorer browser fix: https://vborg.vbsupport.ru/showpost....5&postcount=70 ----------------------------------------------------------------------------------------------------- For additional information on this button and different parameters please visit http://developers.facebook.com/docs/...e/plugins/like Remember to click Mark as Installed if you use this modification :up: Download Now
Screenshots
Show Your Support
|
3 благодарности(ей) от: | ||
Drhago, TheLegendB, yasser4101 |
Comments |
#112
|
|||
|
|||
Ah yes, I got it, it may be that... tnx 4 the reply!
|
#113
|
|||
|
|||
Thank you hubie. I added like button next to Post Reply button in each thread. I like it this way instead of placing the like button after first post. Like button is more prominent if you place it in the top of thread -- just my thought.
I modfied showthread template. Find Code:
<td class="smallfont"><a href="newreply.php?$session[sessionurl]do=newreply&noquote=1&p=$FIRSTPOSTID" rel="nofollow"> To see how it looks, see http://www.digitalbhoomi.in/forums/. Complete code: Code:
<table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin-bottom:3px"> <tr valign="bottom"> <if condition="$show['largereplybutton']"> <td width="120px;" valign="top" class="smallfont"><a href="newreply.php?$session[sessionurl]do=newreply&noquote=1&p=$FIRSTPOSTID" rel="nofollow"><if condition="$show['closethread']"><img src="$stylevar[imgdir_button]/reply.gif" alt="$vbphrase[reply]" border="0" /><else /><img src="$stylevar[imgdir_button]/threadclosed.gif" alt="$vbphrase[closed_thread]" border="0" /></if></a> </td> <td> <iframe scrolling="no" frameborder="0" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.digitalbhoomi.in/forums/showthread.php?t=$thread[threadid]&layout=standard&show_faces=false&width=450&action=like&font=verdana&colorscheme=light&height=30" style="border: medium none; overflow: hidden; width: 450px; height: 30px;" allowtransparency="true"></iframe> </td> <else /> |
#114
|
|||
|
|||
Anybody knows how this will work with vbSEO? How would you change standard URL format to SEO urls?
ex. http://www.mysite.com/forum-name/topic-name.html ? Thank you |
#115
|
|||
|
|||
Quote:
|
#116
|
|||
|
|||
Quote:
I need to know how I can code http://www.YOURSITE.com/showthread.php$session[sessionurl]?p=$post[postid]&show_faces=false& To be an SEO’d URL |
#117
|
||||
|
||||
Quote:
@soundbarrierpro: There is a thread at vbseo.com that deals with this, just search for Facebook over there. |
#118
|
|||
|
|||
Hi, excellent mod, but I have 2 issues, I have already read every post here but nothing worked.
First: im using FF 3.5.10 and when I hit the like button, the pop up loops between like and unlike and wont stop. Second: When you use it in IE, it works fine, but when you go to your FB wall the link redirects to a page not found, because is not including the post number. Im using the IFrame code and vB 3.8.6PL1 Any tips? |
#119
|
|||
|
|||
my second issue above has been already fixed.
Now i wonder, is there any way I can locate the like button just aside the twitter as in this mod https://vborg.vbsupport.ru/showthread.php?t=248568 Any help will be appreciated. |
#120
|
|||
|
|||
Quote:
|
#121
|
|||
|
|||
I have vbSEO installed, so does this work with the facebook like? o_O
And, I'm english spoken, I see another language in your ScreenCaps. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|