PDA

View Full Version : Add Facebook "Like" button to your threads [vB 3.8.x]



KingSky
11-02-14, 09:44 AM
Installation:

There is two kind of "Like" button:

- With a smallest counter at his side:


<iframe src="<b><font color=red>[Chỉ có thành viên mới xem link được. <a href="register.php"> Nhấp đây để đăng ký thành viên......</a>]</font></b>$session[sessionurl]?p=$post[postid]&amp;layout=button_count&amp;show_faces=true&amp;width=&amp;action =like&amp;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):


<iframe src="<b><font color=red>[Chỉ có thành viên mới xem link được. <a href="register.php"> Nhấp đây để đăng ký thành viên......</a>]</font></b>$session[sessionurl]?p=$post[postid]&amp;show_faces=false&amp
scrolling="no" frameborder="0"
style="border:none; width:450px; height:25px"></iframe>

*Change show_faces=false for true if you want to see faces :)

Go to your Postbit/Postbit Legacy template and search for:

<!-- controls -->

And add below the code that you previously selected according your favorite button style.

If you want that the button only appears in first post of a thread, add this code at the beginning and end of the code that you previously selected:


<if condition="!$GLOBALS['FIRSTPOSTID']">YOUR CODE</if>