В HTML низ:

Код:
<!-- Социальные кнопки -->
<script type="text/javascript">
function load_script() {
 var script; 
 script = document.createElement("script");
 script.src = "//yandex.st/share/share.js";
 script.charset = "utf-8";
 document.getElementsByTagName("head")[0].appendChild(script);
}

if (document.URL.indexOf("viewtopic") != -1) {
 document.getElementById("pun-main").innerHTML = "<div class=\"yashare-auto-init\" data-yashareL10n=\"ru\" data-yashareType=\"button\" data-yashareQuickServices=\"yaru,vkontakte,facebook,twitter,odnoklassniki,moimir,lj,friendfeed,gplus\" style=\" float: right;margin-top: -5px;\"></div>" + document.getElementById("pun-main").innerHTML;
 load_script();
}
</script>