Новый мини чaт для Ucoz с отчиской и с запретом матов

Новый мини чaт для Ucoz с отчиской и с запретом матов
1.Заходим в Управление сайта , Мини-чaт в
Вит материалов и залеваем это
body {background: #f5f5f5;font:11px tahoma;}
</style>
<link type="text/css" rel="StyleSheet" href="/new_shab/css/main.css" />
<div style="background:#edf2f6;border:1px solid #adbccb;">
<div style="background:#6d8eb2;border-top:1px solid #3e6797;border-bottom:1px solid #3e6797;">
<table width="100%" cellpadding="0" cellspacing="0" >
<tr>
<td align="left" valign="top">
<a href="javascript:void('Apply to')" onclick="parent.window.document.getElementById('mchatMsgF').focus();parent.window.document.getElementById('mchatMsgF').value+='[i]$NAME$[/i], ';return false;" style="text-decoration:none;"><div style="border-top:1px solid #7d9abb;padding:6px;color:#f3f6f9;text-shadow: 0.1em 0.1em 0.05em #666667;">$NAME$</div></a>
</td>
<td width="25%" align="right" valign="top">
<div style="padding:6px;color:#FFF;">$DATE$</div>
</td>
</tr>
</table>
</div>
<div style="border-top:1px solid #ffffff;padding:10px;">$MESSAGE$</div>
</div><br>
<div style="border-bottom:1px solid #ccc; background:#f5f5f5; padding:1px; display:none;" id="rulesChat"><br><b>Запрещены</b> ссылки на сайты!<br/> <b>Запрещены</b> оскорбления и маты! <br></div><br>
</style>
<link type="text/css" rel="StyleSheet" href="/new_shab/css/main.css" />
<div style="background:#edf2f6;border:1px solid #adbccb;">
<div style="background:#6d8eb2;border-top:1px solid #3e6797;border-bottom:1px solid #3e6797;">
<table width="100%" cellpadding="0" cellspacing="0" >
<tr>
<td align="left" valign="top">
<a href="javascript:void('Apply to')" onclick="parent.window.document.getElementById('mchatMsgF').focus();parent.window.document.getElementById('mchatMsgF').value+='[i]$NAME$[/i], ';return false;" style="text-decoration:none;"><div style="border-top:1px solid #7d9abb;padding:6px;color:#f3f6f9;text-shadow: 0.1em 0.1em 0.05em #666667;">$NAME$</div></a>
</td>
<td width="25%" align="right" valign="top">
<div style="padding:6px;color:#FFF;">$DATE$</div>
</td>
</tr>
</table>
</div>
<div style="border-top:1px solid #ffffff;padding:10px;">$MESSAGE$</div>
</div><br>
<div style="border-bottom:1px solid #ccc; background:#f5f5f5; padding:1px; display:none;" id="rulesChat"><br><b>Запрещены</b> ссылки на сайты!<br/> <b>Запрещены</b> оскорбления и маты! <br></div><br>
2.Потом заходим в Форма добовления сообщений и залеваем это
<link type="text/css" rel="StyleSheet" href="/new_shab/css/buttonsystems/usocialButton.css">
<br>
<textarea name="mcmessage" class="mchat" id="mchatMsgF" title="Сообщение" onkeyup="countMessLength();" onfocus="countMessLength();" style="height: 40px; width: 100%;"></textarea>
<br><br>
<div class="button_blue"><input value="Отправить" onclick="$('#mchatBtn').click();" type="button"></div>
<div class="button_gray"><input value="Обновить" onclick="document.getElementById('mchatIfm2').src='/mchat/?'+Math.random();return false;" type="button"></div>
<a href="$MSGCTRL_URI$"><div class="button_gray"><input value="История" onclick="$('#mchatBtn').click();" type="button"></div></a>
<hr>
<a href="javascript:void('mchatMsgF')" onclick="parent.window.document.getElementById('mchatMsgF').focus();parent.window.document.getElementById('mchatMsgF').value+=' :cowboy:';return false;" style="margin-top:2px;"><img src="http://usocial-o.at.ua/img/gifts/cowboy.gif"></a><a href="javascript:void('mchatMsgF')" onclick="parent.window.document.getElementById('mchatMsgF').focus();parent.window.document.getElementById('mchatMsgF').value+=' :wink:';return false;" style="margin-top:2px;"><img src="http://usocial-o.at.ua/img/gifts/wink.gif"></a><a href="javascript:void('mchatMsgF')" onclick="parent.window.document.getElementById('mchatMsgF').focus();parent.window.document.getElementById('mchatMsgF').value+=' :cyclops:';return false;" style="margin-top:2px;"><img src="http://usocial-o.at.ua/img/gifts/cyclops.gif"></a><a href="javascript:void('mchatMsgF')" onclick="parent.window.document.getElementById('mchatMsgF').focus();parent.window.document.getElementById('mchatMsgF').value+=' :xd:';return false;" style="margin-top:2px;"><img src="http://usocial-o.at.ua/img/gifts/smile-big.gif"></a><a href="javascript:void('mchatMsgF')" onclick="parent.window.document.getElementById('mchatMsgF').focus();parent.window.document.getElementById('mchatMsgF').value+=' :poop:';return false;" style="margin-top:2px;"><img src="http://usocial-o.at.ua/img/gifts/poop.gif"></a><a href="javascript:void('mchatMsgF')" onclick="parent.window.document.getElementById('mchatMsgF').focus();parent.window.document.getElementById('mchatMsgF').value+=' :cigarette:';return false;" style="margin-top:2px;"><img src="http://usocial-o.at.ua/img/gifts/cigarette.gif"></a><a href="javascript:void('mchatMsgF')" onclick="parent.window.document.getElementById('mchatMsgF').focus();parent.window.document.getElementById('mchatMsgF').value+=' :love:';return false;" style="margin-top:2px;"><img src="http://usocial-o.at.ua/img/gifts/love.gif"></a><a href="javascript:void('mchatMsgF')" onclick="parent.window.document.getElementById('mchatMsgF').focus();parent.window.document.getElementById('mchatMsgF').value+=' :cow:';return false;" style="margin-top:2px;"><img src="http://usocial-o.at.ua/img/gifts/cow.gif"></a><a href="javascript:void('mchatMsgF')" onclick="parent.window.document.getElementById('mchatMsgF').focus();parent.window.document.getElementById('mchatMsgF').value+=' :kiss:';return false;" style="margin-top:2px;"><img src="http://usocial-o.at.ua/img/gifts/kiss.gif"></a><a href="javascript:void('mchatMsgF')" onclick="parent.window.document.getElementById('mchatMsgF').focus();parent.window.document.getElementById('mchatMsgF').value+=' :cake:';return false;" style="margin-top:2px;"><img src="http://usocial-o.at.ua/img/gifts/cake.gif"></a><a href="javascript:void('mchatMsgF')" onclick="parent.window.document.getElementById('mchatMsgF').focus();parent.window.document.getElementById('mchatMsgF').value+=' :pill:';return false;" style="margin-top:2px;"><img src="http://usocial-o.at.ua/img/gifts/pill.gif"></a><a href="javascript:void('mchatMsgF')" onclick="parent.window.document.getElementById('mchatMsgF').focus();parent.window.document.getElementById('mchatMsgF').value+=' :rose: ';return false;" style="margin-top:2px;"><img src="http://usocial-o.at.ua/img/gifts/rose.gif"></a><a href="javascript:void('mchatMsgF')" onclick="parent.window.document.getElementById('mchatMsgF').focus();parent.window.document.getElementById('mchatMsgF').value+=' :coffee:';return false;" style="margin-top:2px;"><img src="http://usocial.ru/img/gifts/coffee.gif"></a><a href="javascript:void('mchatMsgF')" onclick="parent.window.document.getElementById('mchatMsgF').focus();parent.window.document.getElementById('mchatMsgF').value+=' :dog:';return false;" style="margin-top:2px;"><img src="http://usocial-o.at.ua/img/gifts/dog.gif"></a><br><hr>
<div style="display:none;"><input value="OK" class="mchat" id="mchatBtn" style="width: 30px;" type="submit"></div><img alt="" style="display: none;" id="mchatAjax" src="/img/upload.gif" border="0">
<img alt="" src="http://web-masters.3dn.ru/js/st2/delete_ochictka_mini_chata_v15.png" onclick="delete_chat()" title="Очистка чата" align="absmiddle" border="0">
<script type="text/javascript" src="http://web-masters.3dn.ru/js/st2/trane73.del2_ochictka_mini_chata_v15.js"></script>
<style type="text/css">
.del_chat {width:300px;height:15px;border:1px solid #666;background:#f2f2f2;margin:10px 0;} /* сам прогресс-бар, цвет рамки и фона */
.delete_chat {height:15px;float:left;} /* выравнивание заполнения прогресс-бара */
.delete_chats {background:#c0c0c0;height:13px;width:1px;float:left;padding:1px;} /* стиль полоски прогресс-бара (главное цвет) */
.del_proc {margin-top:-25px;margin-bottom:15px;} /* процент удалённых сообщений */
#del_enter, #del_ok, #del_error, .del_c {margin:10px auto !important;overflow:none;} /* отступы для кнопки и сообщение об успехе/ошибке */
#del_ok, #del_error {font-size:15px;} /* размер текста для сообщений об успехе/ошибке */
#del_ok, #del_error, .del_c {text-align:center;display:none;} /* выравниание текста сообщений об успехе/ошибке */
.del_num {text-align:left;margin-left:14px;} /* стиль общего количества сообщений в чате */
.del_dels {text-align:right;float:right;margin-right:13px;} /* стиль количества удаленных сообщений */
</style>
<script type="text/javascript">
$('#mchatMsgF').keyup(function(){
var url = ["http://", "https://", "www", ".ru", ".su", ".com", ".net"]; // Запрещеные элементы.
var field = $(this).val();
for (i = 0; i <= url.length; i++){
if(field.toLowerCase().indexOf(url[i])!=-1){
_uWnd.alert('Ссылки в чате запрещены!','',{w:180,h:38,tm:4000});
$(this).val('');
}}
});
</script>
<br>
<textarea name="mcmessage" class="mchat" id="mchatMsgF" title="Сообщение" onkeyup="countMessLength();" onfocus="countMessLength();" style="height: 40px; width: 100%;"></textarea>
<br><br>
<div class="button_blue"><input value="Отправить" onclick="$('#mchatBtn').click();" type="button"></div>
<div class="button_gray"><input value="Обновить" onclick="document.getElementById('mchatIfm2').src='/mchat/?'+Math.random();return false;" type="button"></div>
<a href="$MSGCTRL_URI$"><div class="button_gray"><input value="История" onclick="$('#mchatBtn').click();" type="button"></div></a>
<hr>
<a href="javascript:void('mchatMsgF')" onclick="parent.window.document.getElementById('mchatMsgF').focus();parent.window.document.getElementById('mchatMsgF').value+=' :cowboy:';return false;" style="margin-top:2px;"><img src="http://usocial-o.at.ua/img/gifts/cowboy.gif"></a><a href="javascript:void('mchatMsgF')" onclick="parent.window.document.getElementById('mchatMsgF').focus();parent.window.document.getElementById('mchatMsgF').value+=' :wink:';return false;" style="margin-top:2px;"><img src="http://usocial-o.at.ua/img/gifts/wink.gif"></a><a href="javascript:void('mchatMsgF')" onclick="parent.window.document.getElementById('mchatMsgF').focus();parent.window.document.getElementById('mchatMsgF').value+=' :cyclops:';return false;" style="margin-top:2px;"><img src="http://usocial-o.at.ua/img/gifts/cyclops.gif"></a><a href="javascript:void('mchatMsgF')" onclick="parent.window.document.getElementById('mchatMsgF').focus();parent.window.document.getElementById('mchatMsgF').value+=' :xd:';return false;" style="margin-top:2px;"><img src="http://usocial-o.at.ua/img/gifts/smile-big.gif"></a><a href="javascript:void('mchatMsgF')" onclick="parent.window.document.getElementById('mchatMsgF').focus();parent.window.document.getElementById('mchatMsgF').value+=' :poop:';return false;" style="margin-top:2px;"><img src="http://usocial-o.at.ua/img/gifts/poop.gif"></a><a href="javascript:void('mchatMsgF')" onclick="parent.window.document.getElementById('mchatMsgF').focus();parent.window.document.getElementById('mchatMsgF').value+=' :cigarette:';return false;" style="margin-top:2px;"><img src="http://usocial-o.at.ua/img/gifts/cigarette.gif"></a><a href="javascript:void('mchatMsgF')" onclick="parent.window.document.getElementById('mchatMsgF').focus();parent.window.document.getElementById('mchatMsgF').value+=' :love:';return false;" style="margin-top:2px;"><img src="http://usocial-o.at.ua/img/gifts/love.gif"></a><a href="javascript:void('mchatMsgF')" onclick="parent.window.document.getElementById('mchatMsgF').focus();parent.window.document.getElementById('mchatMsgF').value+=' :cow:';return false;" style="margin-top:2px;"><img src="http://usocial-o.at.ua/img/gifts/cow.gif"></a><a href="javascript:void('mchatMsgF')" onclick="parent.window.document.getElementById('mchatMsgF').focus();parent.window.document.getElementById('mchatMsgF').value+=' :kiss:';return false;" style="margin-top:2px;"><img src="http://usocial-o.at.ua/img/gifts/kiss.gif"></a><a href="javascript:void('mchatMsgF')" onclick="parent.window.document.getElementById('mchatMsgF').focus();parent.window.document.getElementById('mchatMsgF').value+=' :cake:';return false;" style="margin-top:2px;"><img src="http://usocial-o.at.ua/img/gifts/cake.gif"></a><a href="javascript:void('mchatMsgF')" onclick="parent.window.document.getElementById('mchatMsgF').focus();parent.window.document.getElementById('mchatMsgF').value+=' :pill:';return false;" style="margin-top:2px;"><img src="http://usocial-o.at.ua/img/gifts/pill.gif"></a><a href="javascript:void('mchatMsgF')" onclick="parent.window.document.getElementById('mchatMsgF').focus();parent.window.document.getElementById('mchatMsgF').value+=' :rose: ';return false;" style="margin-top:2px;"><img src="http://usocial-o.at.ua/img/gifts/rose.gif"></a><a href="javascript:void('mchatMsgF')" onclick="parent.window.document.getElementById('mchatMsgF').focus();parent.window.document.getElementById('mchatMsgF').value+=' :coffee:';return false;" style="margin-top:2px;"><img src="http://usocial.ru/img/gifts/coffee.gif"></a><a href="javascript:void('mchatMsgF')" onclick="parent.window.document.getElementById('mchatMsgF').focus();parent.window.document.getElementById('mchatMsgF').value+=' :dog:';return false;" style="margin-top:2px;"><img src="http://usocial-o.at.ua/img/gifts/dog.gif"></a><br><hr>
<div style="display:none;"><input value="OK" class="mchat" id="mchatBtn" style="width: 30px;" type="submit"></div><img alt="" style="display: none;" id="mchatAjax" src="/img/upload.gif" border="0">
<img alt="" src="http://web-masters.3dn.ru/js/st2/delete_ochictka_mini_chata_v15.png" onclick="delete_chat()" title="Очистка чата" align="absmiddle" border="0">
<script type="text/javascript" src="http://web-masters.3dn.ru/js/st2/trane73.del2_ochictka_mini_chata_v15.js"></script>
<style type="text/css">
.del_chat {width:300px;height:15px;border:1px solid #666;background:#f2f2f2;margin:10px 0;} /* сам прогресс-бар, цвет рамки и фона */
.delete_chat {height:15px;float:left;} /* выравнивание заполнения прогресс-бара */
.delete_chats {background:#c0c0c0;height:13px;width:1px;float:left;padding:1px;} /* стиль полоски прогресс-бара (главное цвет) */
.del_proc {margin-top:-25px;margin-bottom:15px;} /* процент удалённых сообщений */
#del_enter, #del_ok, #del_error, .del_c {margin:10px auto !important;overflow:none;} /* отступы для кнопки и сообщение об успехе/ошибке */
#del_ok, #del_error {font-size:15px;} /* размер текста для сообщений об успехе/ошибке */
#del_ok, #del_error, .del_c {text-align:center;display:none;} /* выравниание текста сообщений об успехе/ошибке */
.del_num {text-align:left;margin-left:14px;} /* стиль общего количества сообщений в чате */
.del_dels {text-align:right;float:right;margin-right:13px;} /* стиль количества удаленных сообщений */
</style>
<script type="text/javascript">
$('#mchatMsgF').keyup(function(){
var url = ["http://", "https://", "www", ".ru", ".su", ".com", ".net"]; // Запрещеные элементы.
var field = $(this).val();
for (i = 0; i <= url.length; i++){
if(field.toLowerCase().indexOf(url[i])!=-1){
_uWnd.alert('Ссылки в чате запрещены!','',{w:180,h:38,tm:4000});
$(this).val('');
}}
});
</script>