Очень красивый мини чат для ucoz в стиле css/
Установка:
1) Идём в ПУ/Управление дизайном/Таблица стилей CSS и вставляем код:
Код
/* Mini chat */
html, body {
scrollbar-base-color: #333;
}
textarea {
scrollbar-base-color: #333;
}
a img {
border: none;
}
a {
outline: none;
}
.clear {
clear: both;
}
.b_block {
border: 1px dotted #444;
}
.b_block2 {
border: 1px dotted #555;
}
#m_chat {
font-family: Arial, Helvetica, sans-serif;
font-size: 8px;
color: #CCC;
background-color:transparent;
margin: 0 auto;
width: 200px;
padding: 2px;
position: relative;
}
#mchatIfm2 {
height: 360px !important;
}
#chat_mess {
margin: 4px;
min-height: 62px;
-height: 62px;
min-height: 62px;
height:auto !important;
height:62px;
}
.cBlock1 {
font-size:8pt;
color: #ccc;
margin: 2px;
padding: 1px;
background-color: #333;
min-height: 62px;
-height: 62px;
min-height: 62px;
height:auto !important;
height:62px;
}
.cBlock2 {
font-size:8pt;
color: #ccc;
margin: 2px;
padding: 1px;
background-color: #444;
min-height: 62px;
-height: 62px;
min-height: 62px;
height:auto !important;
height:62px;
}
.cBlock1 a, .cBlock2 a {
font-size:10pt;
color: #ff0000;
text-decoration: none;
}
#chat_form {
padding: 2px;
margin: 2px;
}
#chat_bb {
height: 25px;
background-image: url(../m_chat/pict/button.png);
background-repeat: repeat-x;
}
#chat_bb_button {
height: 25px;
float: right;
}
#m_chat .form_mess {
width: 95%;
resize:none;
background-color: #333;
color: #CCC;
margin-top: 4px;
}
#chat_form_button {
height: 25px;
margin-top: 2px;
padding:2px;
}
.mchat {
background-image: url(../m_chat/pict/button.png);
border: none;
width:187px;
height: 25px;
color: #CCC;
}
#chat_secury {
height: 36px;
padding: 2px;
margin: 2px 0 2px 0;
}
.pole {
float: left;
width: 60px;
height: 22px;
margin: 2px 0 0 0;
}
.pict {
width: 140px;
margin-left: 78px;
height: 22px;
}
/* -------- */
ВНИМАНИЕ!!! После того как вы вставите код css - у вас возможно изменятся ссылки на внешние css файлы, поэтому после установки мини-чата рекомендую проверить и заменить при необходимости ссылки в хедере типа
Quote
на те которые были до изменения.
2) Далее идём в ПУ/Управление дизайном/Первый контейнер и ищем там код:
и заменяем его на:
Код
<div id="m_chat" class="b_block">$CHAT_BOX$</div>
3) Идём в ПУ/Управление дизайном/Мини-чат/Вид материалов, удаляем всё что там есть и вставляем следующий код:
Код
<div id="chat_mess" class="b_block">
<div class="cBlock$PARITY$" style="min-height:62px;">
<div style="float: left; width:58px; height:58px; padding: 1px 1px 1px 1px; margin-right:3px; margin-bottom:1px;">
<div align="center">
<img alt="" src="$AVATAR_URL$" border="0" width="58" />
<img alt="" src="/profile/noavatar.gif" border="0" width="58" />
</div>
</div>
<div class="cMessage" style="text-align:left;">
<div><a href="$PROFILE_URL$" title="$USERNAME$" rel="nofollow"><img alt="" src="http://s44.ucoz.net/img/icon/profile.png" width="13" border="0" style="vertical-align:-2px"/></a> <a href="javascript:void('Apply to')" onclick="parent.window.document.getElementById('mchatMsgF').focus()
;parent.window.document.getElementById('mchatMsgF').value+='[i]$NAME$[/i],
';return false;">
<b>$NAME$</b></a></div>
$MESSAGE$</div>
</div>
</div>
4) Далее идём в ПУ/Управление дизайном/Мини-чат/Форма добавления сообщений, удаляем там всё и вставляем этот код:
Код
<!-- Form message -->
<link type="text/css" rel="StyleSheet" href="/_st/my.css">
<div id="chat_form">
<div id="chat_bb" class="b_block">
<div id="chat_bb_button"> <a href="javascript://" rel="nofollow" onclick="document.getElementById('mchatIfm2').src='/mchat/?'+Math.random();return false;" title="Обновить"><img src="/m_chat/pict/ref.png" width="24" height="25" /></a> <img src="/m_chat/pict/pl.png" width="5" height="25" /> <a href="javascript://" rel="nofollow" onclick="new _uWnd('Sml',' ',-250,-350,{autosize:0,closeonesc:1,resize:0},{url:'/index/35-23-2'});return false;" title="Смайлики"> <img src="/m_chat/pict/smiles.png" width="24" height="25" /></a> <img src="/m_chat/pict/pl.png" width="5" height="25" /> <a href="javascript://" rel="nofollow" onclick="window.open('/index/17','cbbcodes','scrollbars=1,width=550,height=450,left=0,top=0');return false;" title="ББ-коды"><img src="/m_chat/pict/bbcodes.png" width="24" height="25" /></a> <img src="/m_chat/pict/pl.png" width="5" height="25" /> <a href="javascript://" rel="nofollow" onclick="window.open('/mchat/0-1','mchatCtrl','scrollbars=1,width=550,height=550,left=0,top=0');return false;" title="Модерация"><img src="/m_chat/pict/moders.png" width="24" height="25" /></a> </div>
</div>
<div class="clear"></div>
<div id="chat_form_mess">
<textarea name="mcmessage" onkeyup="countMessLength();" onfocus="countMessLength();" rows="3" class="form_mess b_block" id="mchatMsgF"></textarea>
</div>
<div class="clear"></div>
<div id="chat_secury" class="b_block">
<div class="pole">$FLD_SECURE$</div>
<div class="pict">$IMG_SECURE$</div>
</div>
<div id="chat_form_button" class="b_block">
<div><input type="submit" value="Опубликовать" class="mchat" id="mchatBtn" />
<div align="center"><img alt="" style="display:none;" id="mchatAjax" src="http://s44.ucoz.net/img/fr/ajax3.gif" border="0" width="16" />
</div>
</div>
</div>
<div align="center" style="border: 1px dotted #444;">Необхдима регистрация!</div>
</div>
<!-- /Form message -->
Всё устоновка успешно завершена!!!