MyBB Community Forums

Full Version: Updated How to add social sharing buttons to threads
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Go to your ACP --> Theme You want to edits templates -->Show Thread Templates -->showthread_ratethread

and add the following to the bottom:

<div style="margin-top: 6px; padding-right: 10px;" class="float_left">

<strong style="float: left; padding-right: 10px;">Share Post:</strong>
	
<a title="Facebook" href="http://www.facebook.com/share.php?u={$mybb->settings['bburl']}/showthread.php?tid={$thread['tid']}" target="_blank"><img src="images/TechnologxShop/facebook.png" alt="Facebook" /></a>

<a title="Twitter" href="http://twitter.com/home?status={$thread['subject']} - {$mybb->settings['bburl']}/showthread.php?tid={$thread['tid']}" target="_blank"><img src="images/TechnologxShop/twitter.png" alt="Twitter" /></a>
	
<a href="https://plus.google.com/share?url={$mybb->settings['bburl']}/showthread.php?tid={$thread['tid']}&title={$thread['subject']}" alt="Google+" count-layout="horizontal">
    <img border="0" src="images/TechnologxShop/google+.png" alt="Pinterest" />
</a>	

<a title="Digg" href="http://digg.com/submit?url={$mybb->settings['bburl']}/showthread.php?tid={$thread['tid']}" target="_blank"><img src="images/TechnologxShop/digg.png" alt="Digg" /></a>

<a title="Delicious" href="http://del.icio.us/post?url={$mybb->settings['bburl']}/showthread.php?tid={$thread['tid']}&title={$thread['subject']}" target="_blank"><img src="images/TechnologxShop/delicious.png" alt="Delicious" /></a>

<a title="Reddit" href="http://reddit.com/submit?url={$mybb->settings['bburl']}/showthread.php?tid={$thread['tid']}&title={$thread['subject']}" target="_blank"><img src="images/TechnologxShop/reddit.png" alt="Reddit" /></a>

<a title="StumbleUpon" href="http://www.stumbleupon.com/submit?url={$mybb->settings['bburl']}/showthread.php?tid={$thread['tid']}" target="_blank"><img src="images/TechnologxShop/stumbleupon.png" alt="StumbleUpon" /></a>
	
<a href="http://pinterest.com/pin/create/button/?url={$mybb->settings['bburl']}/showthread.php?tid={$thread['tid']}&title={$thread['subject']}" class="pin-it-button" count-layout="horizontal">
    <img border="0" src="images/TechnologxShop/pinterest.png" alt="Pinterest" />
</a>
	
<a href="mailto:?subject={$thread['subject']}&amp;body=Check out this post {$mybb->settings['bburl']}/showthread.php?tid={$thread['tid']}&title={$thread['subject']}"
   title="Share by Email">
  <img src="images/TechnologxShop/email.png">
</a>
	
<a href="javascript:window.print()">
	<img src="images/TechnologxShop/print.png" alt="Print Me!"  />
	</a>

</div>

Download Icon Pack

Demo there you can see them in live action.

If you know anymore social networks that can be added let me know in a reply not a PM the PM's I'll just delete.

If you find this helpful please hit the thumbs up button!

Enjoy!
Nice, there is also a good plugin for such task http://community.mybb.com/mods.php?action=view&pid=327
i guess your tutorial won't work properly as in your tutorial all the images as redirected to images/TechnologxShop/ not in any static link.
Please provide images download link too,

Regards.
Yea I can do that but you can get your own at http://iconfinder.com

(2016-04-23, 08:10 AM)Donald_Duck Wrote: [ -> ]Nice, there is also a good plugin for such task http://community.mybb.com/mods.php?action=view&pid=327

This is for threads only not just for all over the forum.
(2016-04-23, 04:39 PM)Technologx Wrote: [ -> ]Yea I can do that but you can get your own at http://iconfinder.com

(2016-04-23, 08:10 AM)Donald_Duck Wrote: [ -> ]Nice, there is also a good plugin for such task http://community.mybb.com/mods.php?action=view&pid=327

This is for threads only not just for all over the forum.

very helpful tutorial sir! Smile

Morevoer, is there any way to show the total share count?
I mean the summation of share through all social media we provided in our forum
There is but it clumps the social icons up and they look bad like that.
You can also use addthis which can do this easily with tracking of stats.
(2016-04-29, 03:29 PM)WallBB Wrote: [ -> ]You can also use addthis which can do this easily with tracking of stats.

That is true but this is for those coding freaks or the ones who like to learn.
(2016-04-29, 07:39 PM)Technologx Wrote: [ -> ]
(2016-04-29, 03:29 PM)WallBB Wrote: [ -> ]You can also use addthis which can do this easily with tracking of stats.

That is true but this is for those coding freaks or the ones who like to learn.

Yes but with you can't get exact stats which really helps in SMO.
how can i change it to my own
Pages: 1 2