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 |
#182
|
|||
|
|||
So for the XFBML Method do I paste the code in the Postbit/Postbit Legacy template?
|
#183
|
|||
|
|||
Quote:
|
#184
|
|||
|
|||
Quote:
Quote:
|
#185
|
||||
|
||||
You could try $thread[forumid] if you're in SHOWTHREAD template, or $post[forumid] in postbit template.
|
#186
|
||||
|
||||
has anyone got this working properly.
I had it working, but I hate the fact that it SHOWS names. I think people prefer to see the count go up, but not have their names displayed. |
#187
|
|||
|
|||
Is there a way the user can select which image to show in their facebook? Or to add the image within the vbulletin thread content part?
|
#188
|
|||
|
|||
can this fb like be on every post of a thread? meaning user can click on like button on a thread on 3rd post but does not include the 1st post?
|
#189
|
||||
|
||||
Quote:
To switch from English (LIKE) to Spanish (Me Gusta) Search in the code: connect.facebook.net/en_US/all.js'; and replace by: connect.facebook.net/es_LA/all.js'; Very Simple |
#190
|
||||
|
||||
I have a problem with this mod that is not how to fix yet, read the 13 pages of answers that are here and not find a solution.
I have installed the version XFBML. But the problem button "like" is that sometimes appears and sometimes doesn?t appear, not even reloading the page immediately appears. Any solution? www.motofanaticos.com My code Code:
<if condition="THIS_SCRIPT =='showthread'"> <div id="fb-root"></div> <script> window.fbAsyncInit = function() { FB.init({ appId : '103900849703235', status : true, // check login status cookie : true, // enable cookies to allow the server to access the session xfbml : true // parse XFBML }); }; (function() { var e = document.createElement('script'); e.src = document.location.protocol + '//connect.facebook.net/es_LA/all.js'; e.async = true; document.getElementById('fb-root').appendChild(e); }()); </script> <fb:like layout="standard" show_faces="true" width="338" action="like" colorscheme="light" /> </if> <br> |
#191
|
|||
|
|||
will this mod work for vB 4?
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|