MyBB Community Forums
Twitter and Facebbok Share buttons on forum display - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Resources (https://community.mybb.com/forum-8.html)
+--- Forum: Tutorials (https://community.mybb.com/forum-38.html)
+--- Thread: Twitter and Facebbok Share buttons on forum display (/thread-95043.html)

Pages: 1 2


Twitter and Facebbok Share buttons on forum display - WbDev - 2011-05-24

Step 1:
Go to Admin CP > Templates & Style > Templates > YOUR THEME Templates > Forum Display Templates > forumdisplay_thread and find:
{$rating}
Add above {$rating} this code:
<td align="center" class="{$bgcolor}{$thread_type_class}"><a href="http://twitter.com/?status=Check+Out {$mybb->settings['bburl']}/{$thread['threadlink']}" target="_blank" title=""><img src="images/tw.png" alt="" style="vertical-align: middle;" /></a>&nbsp;<a href="http://www.facebook.com/share.php?u={$mybb->settings['bburl']}/{$thread['threadlink']}&t={$thread['subject']}" target="_blank" title=""><img src="images/fb.png" alt="" style="vertical-align: middle;" /></a></td>
Note: You can change Check Out with your own text.

Step 2:
Go to Admin CP > Templates & Style > Templates > YOUR THEME Templates > Forum Display Templates > forumdisplay_threadlist and find:
{$ratingcol}
Add above {$ratingcol} this code:
<td class="tcat" align="center" width="7%"><span class="smalltext"><strong>Share</strong></span></td>

Step 3:
Go to Admin CP > Templates & Style > Templates > YOUR THEME Templates > Forum Display Templates > forumdisplay_announcements_announcement and find:
<td align="center" class="{$bgcolor}">-</td>
<- there are 2 of lines of this code, add one more.

Images: (Add those images to images/)
       

Final result:
[Image: Share.PNG]


RE: Twitter and Facebbok Share buttons on forum display - raoul - 2011-06-08

Nice, but can you tell me how to remove the Rating column ?
And next to twitter and facebook icon to add a Yahoo Messenger icon with the script to send on yahoo messenger (mass message) with the title of the subject and link, and with rel nofollow.

Something like this :

<a target="_blank" title="Send Mass Message to Yahoo Messenger" href="ymsgr:im?msg=I recommend this subject : TItle of the thread , http://site  ....... [Forward this message to you friends too, Thanks !]" rel="nofollow">



RE: Twitter and Facebbok Share buttons on forum display - Yaldaram - 2011-06-08

Some thing similar has been posted before, but your's has some good points. Nice job.


RE: Twitter and Facebbok Share buttons on forum display - WbDev - 2011-06-08

(2011-06-08, 11:33 AM)Yaldaram Wrote: Some thing similar has been posted before, but your's has some good points. Nice job.

I never saw that post ;\


RE: Twitter and Facebbok Share buttons on forum display - raoul - 2011-06-08

(2011-06-08, 10:26 AM)raoul Wrote: Nice, but can you tell me how to remove the Rating column ?

And next to twitter and facebook icon to add a Yahoo Messenger icon with the script to send on yahoo messenger (mass message) with the title of the subject and link, and with rel nofollow.

The code from the Yahoo is something like this :

<a target="_blank" title="Send Mass Message to Yahoo Messenger" href="ymsgr:im?msg=I recommend this subject : TItle of the thread , http://site  ....... [Forward this message to you friends too, Thanks !]" rel="nofollow">

Any answer?


RE: Twitter and Facebbok Share buttons on forum display - lucasbytegenius - 2011-06-24

I'm not sure why you would want to share the thread from the forum display in the first place. I think any share buttons should be near the content.


RE: Twitter and Facebbok Share buttons on forum display - Mr.Kewl - 2011-06-24

Awesome Tutorial Will try this.


RE: Twitter and Facebbok Share buttons on forum display - caygri - 2011-07-27

i want add this button in postbit how to?


RE: Twitter and Facebbok Share buttons on forum display - brilly - 2011-10-01

nice tutorial


RE: Twitter and Facebbok Share buttons on forum display - KingCupid - 2012-10-28

How to add google+ there?