HTML- НИЗ
Код:
<script>
function addSpoiler(str,from,internal){
var pos=0,pos2=0,newpos=0
if((pos=str.indexOf("[music]",from))==-1) return str;
if((pos2=str.indexOf("[/music]"),pos+7)==-1) return str;
newpos=str.indexOf("[music]",pos+7)
if(newpos<pos2 && newpos!=-1) str=addSpoiler(str,pos+7,true)
if((pos2=str.indexOf("[/music]",pos+7))==-1) return str;
str=str.substring(0,pos)+makeSpoiler(str.substring(pos+7,pos2))+str.substring(pos2+8,str.length)
if( str.indexOf("[music]")!=-1 && internal==false) str=addSpoiler(str,0,false)
return str}
function makeSpoiler(txt){
txt="<br/><embed src=\"http://www.filehoster.ru/fhplayer.php\" FlashVars=\"dataurl="+txt+"\" quality=\"high\" bgcolor=\"#ffffff\" width=\"350\" height=\"50\" name=\"urlvariables\" align=\"middle\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" /><br/>"
return txt}
if(document.URL.indexOf("viewtopic.php")!=-1){
elm=document.getElementById("pun-main").getElementsByTagName("div")
for(x in elm) if(elm[x].className=="post-content"){
var post=elm[x]
post.innerHTML=addSpoiler(post.innerHTML,0,false)}}
</script>ФОРМА ОТВЕТА
Код:
<style>
#button-music {background-image:url(Адрес картинки); padding:0; line-height:0; background-position:center; background-repeat:no-repeat; height:26px; width:100%}
</style>
<script type="text/javascript">
if(form=document.getElementById("form-buttons"))
form.getElementsByTagName("tr")[0].insertCell(18).innerHTML="<img src='/i/blank.gif' id='button-music' onclick=\"bbcode('[music]', '[/music]');\"/>"
</script>Заходи на сайт
http://www.filehoster.ru/
Там находим нужную песню,копируем её код
Вставляем выделенный красным код между тегов
[music][/music]
будет выглядеть вот так:
[music]df3301[/music]











