Почему перестал работать модераторский тег? Он не отображается в панели быстрого ответа...
Код:
<script>
function addMod(str,from,internal){
var pos=0,pos2=0,newpos=0
if((pos=str.indexOf("[mod]",from))==-1) return str;
if((pos2=str.indexOf("[/mod]"),pos+5)==-1) return str;
newpos=str.indexOf("[mod]",pos+5)
if(newpos<pos2 && newpos!=-1) str=addMod(str,pos+5,true)
if((pos2=str.indexOf("[/mod]",pos+5))==-1) return str;
str=str.substring(0,pos)+makeMod(str.substring(pos+5,pos2))+str.substring(pos2+6,str.length)
if( str.indexOf("[mod]")!=-1 && internal==false) str=addMod(str,0,false)
return str}
function makeMod(txt){
txt="<br><div style=\"margin: 0px; padding: 0px; background-color:#F1F1FD; border-left: 0px solid #6060FF; border-top: 0px dotted #000; border-right: 1px dotted #000; border-bottom: 1px dotted #000;\"><TABLE class=Mod cellpadding='0' cellspacing='0'><TD align='middle' bgColor='#6060ff' vAlign='center' width='8%'><FONT color='#ffffff' size='+3' style='FONT-FAMILY: Times' title='Модераторский тег'><B> i </B></FONT></TD></TD><TD vAlign='middle'>"+txt+"</TD></TABLE></div><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=addMod(post.innerHTML,0,false)}}
</script>p.s. в форме ответа тоже не работает.
Отредактировано Baby Policeman (Вт, 4 Дек 2012 00:21:35)
