• Страница 1 из 1
  • 1
Желтая, синяя и зеленая таблицы
Пятница, 28.01.2011, 19:58 | Сообщение # 1
ololo :D
Сообщений:
189
Награды:

[Table]1. Желтая[/Table]

В общий вид страницы после $BODY$

Code
<script type="text/javascript">        
        e=document.getElementsByTagName("TD");        
        for(k=0;k<e.length;k++) {        
        if(e[k].className=='posttdMessage') {        
        s=e[k].innerHTML;        
        while (s.indexOf('[yellow]') != -1) {        
        s=s.replace('[yellow]','<table width="100%" border="0" cellspacing="0" cellpadding="5" style="border-top:1px dotted #ffff00; border-right:1px dotted #ffff00; border-bottom:1px dotted #ffff00; border-left:1px dotted #ffff00;"><tr><td style="width:40px; height:40px; background-image: url(/img/yellow.png); background-repeat:no-repeat; background-position:5px 3px;"> </td><td><font style="font-size: 11px; font-family: Verdana; color: #cfcfcf;">'); s=s.replace('[/yellow]','</font></td></tr></table>');        
        e[k].innerHTML=s;}}}        
        </script>

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

Code
<input type="button" value="Желтое" onclick="simpletag('yellow','','','message',''); return false;" class="codeButtons" title="Желтая таблица" name="yellow"/>

[Table]2. Синяя[/Table]

В общий вид страницы после $BODY$

Code
<script type="text/javascript">        
        e=document.getElementsByTagName("TD");        
        for(k=0;k<e.length;k++) {        
        if(e[k].className=='posttdMessage') {        
        s=e[k].innerHTML;        
        while (s.indexOf('[blue]') != -1) {        
        s=s.replace('[blue]','<table width="100%" border="0" cellspacing="0" cellpadding="5" style="border-top:1px dotted #0000ff; border-right:1px dotted #0000ff; border-bottom:1px dotted #0000ff; border-left:1px dotted #0000ff;"><tr><td style="width:40px; height:40px; background-image: url(/img/blue.png); background-repeat:no-repeat; background-position:5px 3px;"> </td><td><font style="font-size: 11px; font-family: Verdana; color: #cfcfcf;">'); s=s.replace('[/blue]','</font></td></tr></table>');        
        e[k].innerHTML=s;}}}        
        </script

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

Code
<input type="button" value="Синее" onclick="simpletag('blue','','','message',''); return false;" class="codeButtons" title="Синяя таблица" name="blue"/>

[Table]3. Зеленая[/Table]

В общий вид страницы после $BODY$

Code
<script type="text/javascript">        
        e=document.getElementsByTagName("TD");        
        for(k=0;k<e.length;k++) {        
        if(e[k].className=='posttdMessage') {        
        s=e[k].innerHTML;        
        while (s.indexOf('[green]') != -1) {        
        s=s.replace('[green]','<table width="100%" border="0" cellspacing="0" cellpadding="5" style="border-top:1px dotted #00FF00; border-right:1px dotted #00FF00; border-bottom:1px dotted #00FF00; border-left:1px dotted #00FF00;"><tr><td style="width:40px; height:40px; background-image: url(/img/green.png); background-repeat:no-repeat; background-position:5px 3px;"> </td><td><font style="font-size: 11px; font-family: Verdana; color: #cfcfcf;">'); s=s.replace('[/green]','</font></td></tr></table>');        
        e[k].innerHTML=s;}}}        
        </script>

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

Code
<input type="button" value="Зеленое" onclick="simpletag('green','','','message',''); return false;" class="codeButtons" title="Зеленая таблица" name="green"/>

Фон прозрачный, значит подойдет для всех дизайнов

Скачиваем картинки Здесь

Если желаете фон то после кода

Code
<table width="100%" border="0" cellspacing="0" cellpadding="5" style="

Из кода для общего вида материаллов форума, ставим

Code
background-color:ffffff;
  • Страница 1 из 1
  • 1
Поиск: