MyBB Community Forums

Full Version: Twitter and Facebbok Share buttons on forum display
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
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/)
[attachment=22873][attachment=22874]

Final result:
[Image: Share.PNG]
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">
Some thing similar has been posted before, but your's has some good points. Nice job.
(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 ;\
(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?
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.
Awesome Tutorial Will try this.
i want add this button in postbit how to?
nice tutorial
How to add google+ there?
Pages: 1 2