Приветствую Вас, Гость
Главная » Статьи » Скрипты » все [ Добавить статью ]

Красивые рамки для форума


Вставляем в общий вид страницы форума :

<script type="text/javascript">  
// Красная таблица  
e=document.getElementsByTagName("TD");  
for(k=15; k<e.length;k++) {  
if(e[k].className=='posttdMessage') {  
s=e[k].innerHTML;  
while (s.indexOf('[admin]') != -1){  
s=s.replace('[admin]','<table width="100%" border="0" cellspacing="0" cellpadding="5" style="background-color:#cccccc; border-top:1px dotted #ff0000; border-right:1px dotted #ff0000; border-bottom:1px dotted #ff0000; border-left:1px dotted #ff0000;"><tr><td style="width:50px; height:50px; background-image: url(http://many-soft.pp.ua/img/bbcode/2.png); background-repeat:no-repeat; background-position:5px 3px;"> </td><td><font style="font-size: 11px; font-family: Verdana; color: #ff0000;">'); s=s.replace('[/admin]','</font></td></tr></table>');  
e[k].innerHTML=s;  
}  
} }  
</script>  

<script type="text/javascript">  
// Синяя таблица  
e=document.getElementsByTagName("TD");  
for(k=15; k<e.length;k++) {  
if(e[k].className=='posttdMessage') {  
s=e[k].innerHTML;  
while (s.indexOf('[pro]') != -1){  
s=s.replace('[pro]','<table width="100%" border="0" cellspacing="0" cellpadding="5" style="background-color:#cccccc; border-top:1px dotted #1e90ff; border-right:1px dotted #1e90ff; border-bottom:1px dotted #1e90ff; border-left:1px dotted #1e90ff;"><tr><td style="width:50px; height:50px; background-image: url(http://many-soft.pp.ua/img/bbcode/5.png); background-repeat:no-repeat; background-position:5px 3px;"> </td><td><font style="font-size: 11px; font-family: Verdana; color: #1e90ff;">'); s=s.replace('[/pro]','</font></td></tr></table>');  
e[k].innerHTML=s;  
}  
} }  
</script>  

<script type="text/javascript">  
// Зеленая таблица  
e=document.getElementsByTagName("TD");  
for(k=15; k<e.length;k++) {  
if(e[k].className=='posttdMessage') {  
s=e[k].innerHTML;  
while (s.indexOf('[moder2]') != -1){  
s=s.replace('[moder2]','<table width="100%" border="0" cellspacing="0" cellpadding="5" style="background-color:#cccccc; border-top:1px dotted #a5de1e; border-right:1px dotted #a5de1e; border-bottom:1px dotted #a5de1e; border-left:1px dotted #a5de1e;"><tr><td style="width:50px; height:50px; background-image: url(http://many-soft.pp.ua/img/bbcode/3.png); background-repeat:no-repeat; background-position:5px 3px;"> </td><td><font style="font-size: 11px; font-family: Verdana; color: #168613">'); s=s.replace('[/moder]','</font></td></tr></table>');  
e[k].innerHTML=s;  
}  
} }  

</script>  

<script type="text/javascript">  
// Жёлтая таблица  
e=document.getElementsByTagName("TD");  
for(k=15; k<e.length;k++) {  
if(e[k].className=='posttdMessage') {  
s=e[k].innerHTML;  
while (s.indexOf('[vip]') != -1){  
s=s.replace('[vip]','<table width="100%" border="0" cellspacing="0" cellpadding="5" style="background-color:#cccccc; border-top:1px dotted #bc9621; border-right:1px dotted #ffb400; border-bottom:1px dotted #ffb400; border-left:1px dotted #ffb400;"><tr><td style="width:50px; height:50px; background-image: url(http://many-soft.pp.ua/img/bbcode/1.png); background-repeat:no-repeat; background-position:5px 3px;"> </td><td><font style="font-size: 11px; font-family: Verdana; color: #db9f0f">'); s=s.replace('[/vip]','</font></td></tr></table>');  
e[k].innerHTML=s;  
}  
} }  
</script>  

<script type="text/javascript">  
// Чёрная таблица  
e=document.getElementsByTagName("TD");  
for(k=15; k<e.length;k++) {  
if(e[k].className=='posttdMessage') {  
s=e[k].innerHTML;  
while (s.indexOf('[usr]') != -1){  
s=s.replace('[usr]','<table width="100%" border="0" cellspacing="0" cellpadding="5" style="background-color:#cccccc; border-top:1px dotted #898989; border-right:1px dotted #898989; border-bottom:1px dotted #898989; border-left:1px dotted #898989;"><tr><td style="width:50px; height:50px; background-image: url(http://many-soft.pp.ua/img/bbcode/4.png); background-repeat:no-repeat; background-position:5px 3px;"> </td><td><font style="font-size: 11px; font-family: Verdana; color: #898989">'); s=s.replace('[/usr]','</font></td></tr></table>');  
e[k].innerHTML=s;  
}  
} }  
</script>

 После $BBCODES$ в форма добавления сообщений: 

<input type="button" value="Красная рамка" onclick="simpletag('admin','','','message',''); return false;" class="codeButtons" title="Вставить красную рамку" name="admin" /> <input type="button" value="Синяя рамка" onclick="simpletag('pro','','','message',''); return false;" class="codeButtons" title="Вставить синюю рамку" name="pro" /> <input type="button" value="Зеленая рамка" onclick="simpletag('moder','','','message',''); return false;" class="codeButtons" title="Вставить зеленую рамку" name="moder" /> <input type="button" value="Желтая рамка" onclick="simpletag('vip','','','message',''); return false;" class="codeButtons" title="Вставить желтую рамку" name="vip" /> <input type="button" value="Серая рамка" onclick="simpletag('usr','','','message',''); return false;" class="codeButtons" title="Вставить серую рамку" name="usr" />  
<input type="button" value="Зеленая рамка" onclick="simpletag('moder2','','','message',''); return false;" class="codeButtons" title="Вставить зеленую рамку" name="moder" />   
<input type="button" value="Синяя рамка" onclick="simpletag('pro','','','message',''); return false;" class="codeButtons" title="Вставить синюю рамку" name="pro" /> <input type="button" value="Зеленая рамка" onclick="simpletag('moder','','','message',''); return false;" class="codeButtons" title="Вставить зеленую рамку" name="moder" /> <input type="button" value="Желтая рамка" onclick="simpletag('vip','','','message',''); return false;" class="codeButtons" title="Вставить желтую рамку" name="vip" /> <input type="button" value="Серая рамка" onclick="simpletag('usr','','','message',''); return false;" class="codeButtons" title="Вставить серую рамку" name="usr" />  
<input type="button" value="Синяя рамка" onclick="simpletag('pro','','','message',''); return false;" class="codeButtons" title="Вставить синюю рамку" name="pro" />  
<input type="button" value="Синяя рамка" onclick="simpletag('pro','','','message',''); return false;" class="codeButtons" title="Вставить синюю рамку" name="pro" />  
<input type="button" value="Желтая рамка" onclick="simpletag('vip','','','message',''); return false;" class="codeButtons" title="Вставить желтую рамку" name="vip" />


Источник: http://uCodes.Ru
Категория: все | Добавил: AlFiles=A= (14.02.2011)
Просмотров: 1716 | Рейтинг: 0.0/0
Всего комментариев: 0
Добавлять комментарии могут только зарегистрированные пользователи.
[ Регистрация | Вход ]