Мой сайт

Главная » 2012 » Январь » 20 » Форма добавления комментариев (Сборка от Apocalypse) для uCoz
20:55
Форма добавления комментариев (Сборка от Apocalypse) для uCoz


Примочки:
1) Антифлуд
2) Дополнительные ВВ коды
3) Удобная форма редактирования текста (Цвет, Размер, стиль)
4) Предпросмотр
5) Апплоадер Depositfiles для возможности быстрого прикрепления файлов

Установка:
В форме добавления комментариев замените весь код на:

<center>  
<script language="javascript">  
var down,cmin2,csec2;  

function Minutes(data) {  
for(var i=0;i<data.length;i++)  
if(data.substring(i,i+1)==':')  
break;  
return(data.substring(0,i));  
}  
function Seconds(data) {  
for(var i=0;i<data.length;i++)  
if(data.substring(i,i+1)==':')  
break;  
return(data.substring(i+1,data.length));  
}  
function Display(min,sec) {  
var disp;  
if(min<=9) disp=' 0';  
else disp=' ';  
disp+=min+':';  
if(sec<=9) disp+='0'+sec;  
else disp+=sec;  
return(disp);  
}  
function Down() {  
document.all.addcBut.style.display = 'none'; //Прячем кнопку  
cmin2='0'; //Минуты  
csec2='15'; //секунды  
DownRepeat(); //Запускаем таймер  
}  
function DownRepeat() {  
csec2--;  
if(csec2==-1) {  
csec2=59; cmin2--;  
}  
document.all.timeNumer.innerHTML='<h1>'+Display(cmin2,csec2)+'</h1><font color="red">Анти-Флуд защита</font>'; //Показывает сколько осталось  
if((cmin2==0)&&(csec2==0))  
{  
document.all.addcBut.style.display = 'block'; //Показываем кнопку снова  
document.all.timeNumer.innerHTML='<font color="green">Вы можете добавлять сообщения</font>'; //Выводим сообщения по окончанию  
}  
else down=setTimeout('DownRepeat()',1000);  
}  
</script>  

<table border="0" width="100%" cellspacing="1" cellpadding="2" class="commTable">  
<tr><td class="commTd2" colspan="2">$ERROR$</td></tr>  
<?if(!$USER_LOGGED_IN$)?>  
<tr><td width="15%" class="commTd1" nowrap>Имя *:</td><td class="commTd2"><input class="commFl" type="text" name="name" value="$NAME$" size="30" maxlength="60"></td></tr>  
<tr><td class="commTd1">Email:</td><td class="commTd2"><input class="commFl" type="text" name="email" value="$EMAIL$" size="30" maxlength="60"></td></tr>  
<?endif?>  

<tr><td class="commTd2" colspan="2"><div style="padding-bottom:2px" align="center">  

<script type='text/javascript' src='http://s15.ucoz.net/src/bbcodes.js'></script>


[img]/bbcodes/code.gif[/img]


[img]/bbcodes/mp3.gif[/img]

[img]/bbcodes/mp.gif[/img]


[img]/bbcodes/quote.gif[/img]



  
<br>  

<select name="fsize" onchange="alterfont(this.options[this.selectedIndex].value,'size','message','');this.selectedIndex=0; " style="background-color: rgb(240, 240, 240); width: 150px; font-weight:bold;height:20px;"><option value="0" style="font-weight:bold;">Размер</option><option value="8" style="font-weight:bold;font-size:8pt;">8</option><option value="9" style="font-weight:bold;font-size:9pt;">9</option><option value="10" style="font-weight:bold;font-size:10pt;">10</option><option value="11" style="font-weight:bold;font-size:11pt;">11</option><option value="12" style="font-weight:bold;font-size:12pt;">12</option><option value="13" style="font-weight:bold;font-size:13pt;">13</option><option value="14" style="font-weight:bold;font-size:14pt;">14</option><option value="15" style="font-weight:bold;font-size:15pt;">15</option><option value="16" style="font-weight:bold;font-size:16pt;">16</option><option value="17" style="font-weight:bold;font-size:17pt;">17</option><option value="18" style="font-weight:bold;font-size:18pt;">18</option></select><select name="fcolor" onchange="alterfont(this.options[this.selectedIndex].value, 'color','message','');this.selectedIndex=0;" style="background-color: rgb(240, 240, 240); width: 150px; font-weight:bold;height:20px;"><option value="0" style="font-weight:bold;">Цвет</option><option value="blue" style="color: blue;font-weight:bold;">Синий</option><option value="red" style="color: red;font-weight:bold;">Красный</option><option value="purple" style="color: purple;font-weight:bold;">Фиолетовый</option><option value="orange" style="color: orange;font-weight:bold;">Оранжевый</option><option value="yellow" style="color: yellow;font-weight:bold;">Желтый</option><option value="gray" style="color: gray;font-weight:bold;">Серый</option><option value="green" style="color: green;font-weight:bold;">Зелёный</option></select><select name="ffont" onchange="alterfont(this.options[this.selectedIndex].value,'font','message','');this.selectedIndex=0; "style="background-color: rgb(240, 240, 240); width: 150px; font-weight:bold;height:20px;"><option value="0" style="font-weight:bold;">Шрифт</option><option value="Arial" style="font-weight:bold;font-family:Arial;">Arial</option><option value="Times" style="font-weight:bold;font-family:Times;">Times</option><option value="Courier" style="font-weight:bold;font-family:Courier;">Courier</option><option value="Impact" style="font-weight:bold;font-family:Impact;>Impact</option><option value="Geneva" style="font-weight:bold;font-family:Geneva;">Geneva</option><option value="Optima" style="font-weight:bold;font-family:Optima;">Optima</option></select>  
<br>  

<script type="text/javascript" src="/keypadreverser.js"></script><textarea class="commFl" style="height:135px;" rows="8" name="message" id="message" cols="50">$MESSAGE$  
</textarea><br>  

<center>  
<a title="Прикрепить файл или картинку" href="javascript:openLayerA('obsv','http://hosting.ucoz.kz','Профиль','800','600','auto');">
</a>  
<br>  
</center>  
<input type="button" value="Показать смайлы" onclick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].style.display = '';this.innerText = ''; this.value = 'Скрыть смайлы'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].style.display = 'none'; this.innerText = ''; this.value = 'Показать смайлы'; }"><div style="display: none;">  

<center>  
<a href="javascript://" rel="nofollow" onclick="emoticon('

','message');return false;">
</a>  
<a href="javascript://" rel="nofollow" onclick="emoticon('

','message');return false;">
</a>  
<a href="javascript://" rel="nofollow" onclick="emoticon('

','message');return false;">
</a>  
<a href="javascript://" rel="nofollow" onclick="emoticon('

','message');return false;">
</a>  
<a href="javascript://" rel="nofollow" onclick="emoticon('

','message');return false;">
</a>  
<a href="javascript://" rel="nofollow" onclick="emoticon('>(','message');return false;"></a>  
<a href="javascript://" rel="nofollow" onclick="emoticon('

','message');return false;">
</a>  
<a href="javascript://" rel="nofollow" onclick="emoticon('

','message');return false;">
</a>  
<a href="javascript://" rel="nofollow" onclick="emoticon('

','message');return false;">
</a>  
<a href="javascript://" rel="nofollow" onclick="emoticon('

','message');return false;">
</a>  
<a href="javascript://" rel="nofollow" onclick="emoticon('

','message');return false;">
</a>  
<a href="javascript://" rel="nofollow" onclick="emoticon('

','message');return false;">
</a>  
<a href="javascript://" rel="nofollow" onclick="emoticon('

','message');return false;">
</a>  
<a href="javascript://" rel="nofollow" onclick="emoticon('

','message');return false;">
</a>  
<a href="javascript://" rel="nofollow" onclick="emoticon('

','message');return false;">
</a>  
<a href="javascript://" rel="nofollow" onclick="emoticon('

','message');return false;">
</a>  
<a href="javascript://" rel="nofollow" onclick="emoticon('

','message');return false;">
</a>  
<a href="javascript://" rel="nofollow" onclick="emoticon('

','message');return false;">
</a>  
<a href="javascript://" rel="nofollow" onclick="emoticon('

','message');return false;">
</a>  
<a href="javascript://" rel="nofollow" onclick="emoticon('

','message');return false;">
</a>  
<a href="javascript://" rel="nofollow" onclick="emoticon('

','message');return false;">
</a>  
<a href="javascript://" rel="nofollow" onclick="emoticon('

','message');return false;">
</a>  
<a href="javascript://" rel="nofollow" onclick="emoticon('

','message');return false;">
</a>  
<a href="javascript://" rel="nofollow" onclick="emoticon('

','message');return false;">
</a>  
<a href="javascript://" rel="nofollow" onclick="emoticon(' ','message');return false;"></a>  
<a href="javascript://" rel="nofollow" onclick="emoticon(' ','message');return false;"></a>  
<a href="javascript://" rel="nofollow" onclick="emoticon(' ','message');return false;"></a>  
<a href="javascript://" rel="nofollow" onclick="emoticon(' $IMAGE6$ ','message');return false;">$IMAGE6$</a>  
<a href="javascript://" rel="nofollow" onclick="emoticon(' $IMAGE7$ ','message');return false;">$IMAGE7$</a>  
<a href="javascript://" rel="nofollow" onclick="emoticon(' $IMAGE8$ ','message');return false;">$IMAGE8$</a>  
<a href="javascript://" rel="nofollow" onclick="emoticon(' $IMAGE9$ ','message');return false;">$IMAGE9$</a>  
<a href="javascript://" rel="nofollow" onclick="emoticon(' $IMAGE10$ ','message');return false;">$IMAGE10$</a>  
<a href="javascript://" rel="nofollow" onclick="emoticon(' $IMAGE11$ ','message');return false;">$IMAGE11$</a>  
<a href="javascript://" rel="nofollow" onclick="emoticon(' $IMAGE12$ ','message');return false;">$IMAGE12$</a>  
<a href="javascript://" rel="nofollow" onclick="emoticon(' $IMAGE13$ ','message');return false;">$IMAGE13$</a>  
<a href="javascript://" rel="nofollow" onclick="emoticon(' $IMAGE14$ ','message');return false;">$IMAGE14$</a>  
</center>  
</div>  

<script type="text/javascript">function emoticon(code,nm){if (code != ""){var txtarea=document.getElementById(nm);code = ' ' + code + ' ';if (document.selection) {txtarea.focus();var txtContent = txtarea.value;var str = document.selection.createRange();if (str.text == ""){str.text = code;} else if (txtContent.indexOf(str.text) != -1){str.text = code + str.text;} else {txtarea.value = txtContent + code;}}else{txtarea.value = txtarea.value + code;}}}</script>  

<tr><td class="commTd2" colspan="2" align="center">  

<input type="button" value=" Предпросмотр" onclick="precomment()" />  
<script type="text/javascript">  
function precomment(){  
document.preform.message.value=$('#message').val();  
<?if($SMILES$)?>document.preform.sm.value='1';<?endif?>  
window.open('','commprev','scrollbars=1,width=600,height=250,left=0,top=0');  
document.preform.submit();}  
</script><br><hr><div id="timeNumer"></div>  
<?if($SUBSCRIBE$)?><center>Подписка:<br>$SUBSCRIBE$</center><?endif?>  
<?if($SECURITY_CODE$)?>  
<center>  

<b>[Код безопасности]</b><br>[img]/secure/?k=1027723495;s=load;tm=[/img]
<br><b>--> <input class="securityCode" type="text" name="code" size="5" maxlength="4" border="1"/><input type="hidden" name="seckey" value="1027723495" border="1" /> <--</b>  
</center>  
<?endif?>  

<center><font color="ff0000" size="4"><b>Запрещается</b></font><br>  
  
<input type="submit" onclick="Down()" class="commSbmFl" id="addcBut" name="submit" value="- Добавить комментарий -">  

</td></tr></table></center>

Далее залейте из прикреплённого архива папку в корень сайта и наслаждайтесь работой скрипта
Категория: Скрипты для uCoz | Просмотров: 374 | Добавил: Admin_4e | Рейтинг: 0.0/0
Всего комментариев: 0
Имя *:
Email *:
Код *: