[Template] Social Network Share Buttons At Top Of Thread
Jul 8, 2013 9:31:55 GMT -8
SailorEffinMoon likes this
Post by Tim Camara on Jul 8, 2013 9:31:55 GMT -8
A note for anyone else who runs across this, do not use the above code. Unless your forum already looks like Tunescool's forum, it will break your thread view. Instead, do the following:
1. Find your Thread template
2. Starting on about line 10, you should see this div:
3. Make that div look like this (basically add the social media buttons code in right before the action_menu variable):
4. Profit!
1. Find your Thread template
2. Starting on about line 10, you should see this div:
<div class="controls">
$[action_menu]
</div>
3. Make that div look like this (basically add the social media buttons code in right before the action_menu variable):
<div class="controls">
<div style="float: left;">
<div class="g-plusone" data-size="medium"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
<a href="https://twitter.com/share" class="twitter-share-button" data-text="M3L" data-related="m3leagues">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
<script>
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
<fb:like send="false" layout="button_count" width="10" show_faces="false"></fb:like>
</div>
$[action_menu]
</div>
(The spacing is kinda messed up here, but you can just copy/paste it into your template and it should look alright)4. Profit!