You should be editing your SHOWTHREAD template via the Admin CP -> Styles & Templates -> Style Manager.
There is no php code involved.
Look at my Tweet Button mod:
https://vborg.vbsupport.ru/showthread.php?t=248568
But replace this line:
Code:
<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="YOUR_TWITTER_USERNAME">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
With the code addthis gave you.