Наш опрос
Как вам quCoz?
Всего ответов: 11
Вид мини чата +мини чат на форуме(сворачивающийся)
11.09.2011, 23:37
Это вид мини чата Заменяем весь код "Вид материалов" Мини-чата на Code
<div style="white-space:normal"> <script type="text/javascript" src="http://sinners.pp.ua/SINNERS/1/js/mchat.js"></script> <div class="Mchat" style="padding:0 4px 5px 2px;margin-bottom:3px;"> <table width="100%"><tr><td><img src="http://s105.ucoz.net/img/icon/profile.png" align="absmiddle" width="13" border="0"><span style='cursor: pointer;' onclick='show_bar(event, $USER_ID$)'><b>$USERNAME$</b></span></td> <td align="right"><span style="font-size:8px">$TIME$</span></td></tr></table> <div align="center" style="display:none" id="hide2"></div> <table id="win_$USER_ID$" onclick='hide_bar(860)' style='background: #d5d5d5; position:absolute; visibility:hidden; filter:alpha(opacity=85); opacity: 0.85; width: 110px; border: 1px solid #;'> <tbody> <tr><td onmouseover="this.bgColor='e0e0e0';" onmouseout="this.bgColor='#d5d5d5';" style="padding: 5px; border: 1px solid #5d5d5d;"><a href="javascript:void('Apply to')" onclick="parent.window.document.getElementById('mchatMsgF').focus();parent.window.document.getElementById('mchatMsgF').value+='[b]$USERNAME$[/b], ';return false;"><font color="5d5d5d"><b>Цитировать</b></font></a></td></tr> <tr><td onmouseover="this.bgColor='e0e0e0';" onmouseout="this.bgColor='#d5d5d5';" style="padding: 5px; border: 1px solid #5d5d5d;"><a href="/index/14-$USER_ID$-0-1" target="self" ><font color="5d5d5d"><b>Отправить ЛС</b></font></a></td></tr> <tr><td onmouseover="this.bgColor='e0e0e0';" onmouseout="this.bgColor='#d5d5d5';" style="padding: 5px; border: 1px solid #5d5d5d;"><a href="javascript://" rel="nofollow" onclick="new _uWnd('Rd',' ',400,250,{autosize:1,maxh:300,minh:100,closeonesc:1},{url:'/index/23-$USER_ID$'});return false;"><font color="5d5d5d"><b>Репутация ±</b></font></a></td></tr> <tr><td onmouseover="this.bgColor='e0e0e0';" onmouseout="this.bgColor='#d5d5d5';" style="padding: 5px; border: 1px solid #5d5d5d;"><a href="/index/8-$USER_ID$" target="blank" ><font color="5d5d5d"><b>Профиль</b></font></a></td></tr> <tr><td style="text-align: left;"><img onclick="hide_bar($USER_ID$)" src="http://sinners.pp.ua/SINNERS/1/img/mchat/close.png" alt="Закрыть" border="0"></td></tr> </tbody></table> $MESSAGE$ </div>
Далее заменяем весь код "Форма добавления сообщений" Code
<?if(!$CAN_ADD$)?><div align="center"><?if($LOGIN_LINK$)?><a href="$LOGIN_LINK$">Для добавления необходима авторизация</a><?else?>Доступ запрещен<?endif?></div><?else?> <script type="text/javascript"> function sbtFrmMC991(f){$('#mchatBtn').css({display:'none'});$('#mchatAjax').css({display:''});_uPostForm('MCaddFrm',{type:'POST',url:'/mchat/'});} function countMessLength(){var rst = 500-$('#mchatMsgF').val().length;if (rst<0){rst=0;$('#mchatMsgF').val($('#mchatMsgF').val().substr(0,500));}$('#jeuwu28').html(rst);} var tID7174=-1;var tAct7174=false; function setT7174(s){var v=parseInt(s.options[s.selectedIndex].value);document.cookie="mcrtd="+s.selectedIndex+"; path=/";if(tAct7174){clearInterval(tID7174);tAct7174=false;}if(v>0){tID7174=setInterval("document.getElementById('mchatIfm2').src='/mchat/?'+Math.random();",v*1000);tAct7174=true;}} function initSel7174() {var res=document.cookie.match(/(\W¦^)mcrtd=([0-9]+)/);if(res){s=$("#mchatRSel")[0];;s.selectedIndex=parseInt(res[2]);setT7174(s);}$("#mchatMsgF").bind("keydown",function(e){if(e.keyCode==13 && e.ctrlKey && !e.shiftKey){e.preventDefault();sbtFrmMC991();}})} </script> <form style="margin:0;padding:0;" id="MCaddFrm" onsubmit="sbtFrmMC991();return false;"> <br> <span> <span style="padding-right: 1px;" id="bc9"><input title="Вставить картинку" value="img" onclick="tag_image1('mchatMsgF','')" class="codeButtons" style="width: 25px;" id="img" type="button"></span> <span style="padding-right: 1px;" id="bc18"><input title="Вставить код" value="code" onclick="simpletag1('code','','','mchatMsgF','')" class="codeButtons" style="width: 30px;" id="code" type="button"></span> <span style="padding-right: 1px;" id="bc7"><input title="Вставить ссылку" value="URL" onclick="tag_url1('mchatMsgF','')" class="codeButtons" style="direction: ltr; width: 45px;" id="url" type="button"></span> <script src="http://sinners.pp.ua/SINNERS/1/js/bbmchat.js" type="text/javascript"></script> <span style="padding-right: 1px;" id="bc1"><input title="Bold" value="b" onclick="simpletag1('b','','','mchatMsgF','')" class="codeButtons" id="b" style="width: 20px; font-weight: bold;" type="button"></span> <span style="padding-right: 1px;" id="bc2"><input title="Italic" value="i" onclick="simpletag1('i','','','mchatMsgF','')" class="codeButtons" id="i" style="width: 20px; font-style: italic;" type="button"></span> <span style="padding-right: 1px;" id="bc3"><input title="Underline" value="u" onclick="simpletag1('u','','','mchatMsgF','')" class="codeButtons" id="u" style="width: 15px; text-decoration: underline;" type="button"></span></span> <br> <table border="0" cellpadding="1" cellspacing="1" width="100%"> <td width="10%" align="left"> <div align="center"> <span style="padding-right: 0px;" id="bc18"><input title="Правила мини-чата" value="Правила чата" href="javascript://" onclick="openLayerB('Rules_Mchat',0,'/xml/rules_mchat.xml','Правила мини-чата',400,200,'1','','',0,'justify'); return false;" class="codeButtons" style="width: 80px;" id="code" type="button"></span></div></td> <td width="70%" align="right"> <a href="javascript://" rel="nofollow" onclick="document.getElementById('mchatIfm2').src='/mchat/?'+Math.random();return false;" title="Обновить"><img border="0" align="absmiddle" src="http://s32.ucoz.net/img/icon/tf.png"></a> <a href="javascript://" rel="nofollow" onclick="new _uWnd('Sml',' ',-250,-350,{autosize:0,closeonesc:1,resize:0},{url:'/index/35-0-2'});return false;" title="Вставить смайл"><img border="0" align="absmiddle" src="http://s32.ucoz.net/img/icon/s.png"></a> <a href="javascript://" rel="nofollow" onclick="window.open('/index/17','cbbcodes','scrollbars=1,width=550,height=450,left=0,top=0');return false;" title="BB-Коды"><img border="0" align="absmiddle" src="http://s32.ucoz.net/.s/img/icon/mc.png"></a> <?if($MSGCTRL_URI$)?> <a href="$MSGCTRL_URI$" title="Управление сообщениями"><img alt="" border="0" align="absmiddle" src="http://s105.ucoz.net/img/fr/mcm.gif" width="15" height="15"></a><?endif?> </td></tr></table> <?if(!$USER_LOGGED_IN$)?> <table border="0" cellpadding="1" cellspacing="1" width="100%"> <tr><td colspan="2">$FLD_NAME$</td></tr> <tr><td width="50%">$FLD_EMAIL$</td><td>$FLD_URL$</td></tr> </table> <?endif?> <?if($FLD_CUSTOM1$ ¦¦ $FLD_CUSTOM2$)?> <table border="0" cellpadding="1" cellspacing="1" width="100%"> <tr><td width="50%">$FLD_CUSTOM1$</td><td>$FLD_CUSTOM2$</td></tr> </table> <?endif?> <?if($FLD_SECURE$)?> <table border="0" cellpadding="1" cellspacing="1" width="100%"> <tr><td width="50%">$FLD_SECURE$</td><td align="right">$IMG_SECURE$</td></tr> </table> <?endif?> <table border="0" cellpadding="1" cellspacing="1" width="100%"> <tr><td width="95%" rowspan="2">$FLD_MESSAGE$</td> <td align="center" valign="top"><div style="font-size:10px;">$LENGTH_COUNTER$</div></td> </tr><tr><td align="center" valign="bottom">$SUBMIT$</td></tr></table> <?endif?>
Добавляем правила чата(редактировать под себя можно блокноте)Скачать ! ( Нажмите ПКМ [Правой кнопкой мыши] -Сохранить как... ) Теперь чат на форуме Итак приступим 1) идем в ПУ ? Дизайн ? Управление дизайном(шаблоны) Форум Общий вид страниц форума и после ставим код ? Code
<div style="position:absolute;position:fixed;bottom:1;left:1;opacity:1.0;"> <div id="chat" style="display: none;"><table border="0" cellpadding="0" cellspacing="0" width="300" height="15" style="border: 1px solid #1d1d1d; background: #1d1d1d;"> <tr><td height="15" background="http://nice-diz.ucoz.net/mcaht/verh-mini-chat.png"></td></tr><tr><td style="background: #1d1d1d; text-align: center; border-top: 1px solid #1d1d1d;"> $CHAT_BOX$ <input type="hidden" name="numa" id="numa832" value="0"><input type="hidden" name="a" value="18"><input type="hidden" id="ajaxFlag" name="ajax" value="1" /></form> <script type="text/javascript">initSel7174();</script> <table border="0" cellpadding="1" cellspacing="1" width="100%"> <tr><td width="206"> </td></tr></table> </td></tr></table></div> <div style="padding:5px;background:url('http://nice-diz.ucoz.net/mcaht/fon1.png') repeat-x #494949; width: 288px; border: #2d2d2d 1px solid; color:#707070;"> <div style="float:right; center; padding-top: 4px;">$TIME$</div> <div style="float: left; padding-top: 3px;"><a href="javascript://" rel="nofollow" onclick="document.getElementById('mchatIfm2').src='/mchat/?'+Math.random();return false;" title="Обновить"><img src="http://nice-diz.ucoz.net/mcaht/2.png" alt="Обновить" border="0" width="16" height="16" style="padding-left: 3px;"></a></div> <div style="margin-top: 4px; text-align:center;"><a href="javascript://" onclick="$('#chat').slideToggle(2000)"><img src= "http://nice-diz.ucoz.net/mcaht/nimichat.png" title="Мини чат"width="200" height="15" border="0"></a></div> </div></div>
Категория: Скрипты Ucoz |
Просмотров: 667 |
Добавил: pendulum47
| Теги: форуме(сворачивающийся) , +мини , вид , на , чат , чата , Мини
| Рейтинг: 0.0 /0 | Жаловаться на материал
Добавлять комментарии могут только зарегистрированные пользователи.
[
Регистрация |
Вход ]