[ Новые сообщения · Участники · Правила форума · Поиск · RSS ]
  • Страница 1 из 1
  • 1
Мини-чат
NuMetalДата: Воскресенье, 24.10.2010, 20:25 | Сообщение # 1
Сообщений: 12
[ 0 ]

1.Создаем папку js и пихаем туда файлы mchat.js и bbmchat.js
2.Создаем папку images и пихаем туда картинку close.png
3.Создаем папку xml и пихаем туда xml файл

4.Вид материалов мини-чата:

Code
<div style="white-space:normal">   
<script type="text/javascript" src="/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 #5d5d5d;'>   
<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="/images/close.png" alt="Закрыть" border="0"></td></tr>   
</tbody></table>  

$MESSAGE$  

</div>

5.Форма добавления сообщений:

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="/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?>
Прикрепления: 1769_mchatfiles.rar (4.3 Kb)
  • Страница 1 из 1
  • 1
Поиск: