Twitter Button fro SMF 2.0

in Tutorials on 07 Dec 2010



Twitter Button fro SMF 2.0

Add Twitter button with tweet count into your topics.

Open:
Themes/default/Index.template.php

Find:
// Here comes the JavaScript bits!
echo '


Add after:
        <script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>



Open:
Themes/default/Display.template.php

Find:
// Maybe they want to report this post to the moderator(s)?

Add after:
        if ($message['id'] == $context['topic_first_message'])
echo'           
<br/>
       <span style="float:left;">
<a href="http://twitter.com/share" class="twitter-share-button" data-count="vertical">Tweet</a></span>';


That's it!  Have fun!  ;)



PixelfyStudio Team
Mick is an American theme designer for Simple Machines Forum software currently living in South Florida, USA. He runs PixelfyStudio.com and started tinkering with SMF in 2006 where he created several SMF forums of his own before he founded PixelfyStudio in 2009 to which he is dedicated full time.

PixelfyStudio.com | SimpleMachines.org




0 Comments


Find the right theme for you. Browse through our gallery of expertly-crafted free SMF themes to find the perfect one for your needs.