• Страница 1 из 1
  • 1
мини-чат + бот + автообновление..
PyT1[H]Дата: Пятница, 29.10.2010, 16.40.30 | Сообщение # 1

Я вернулсАаА :D

ICQ:5675567

Сообщений: 1208
Награды: 3

[ 182 ]


делать нечего было..
пример: http://up-cinema.ru - под блоком рекалама.

1. Мини-чат - Форма добавления сообщений:

Code
<style type="text/css">   
.newfilm{background:#777;width:80%;height:23px;margin:1px;border:1px solid #777;color:#FFF;cursor:pointer}   
.newfilm:hover{background:#414141;width:80%;height:23px;margin:1px;border:1px solid #777;color:#9E9E9E;cursor:pointer}   
</style>   
<script type="text/javascript">function initTimer( id, overtext, callback ) {var tim = setInterval( init, 1000 );function init() {var timer = document.getElementById( id );if ( timer.innerHTML == 1 ){timer.innerHTML = overtext,clearInterval( tim );if ( callback ) {callback.call( timer );var timer = document.getElementById('mchatIfm2').src='/mchat/?'+Math.random();return false;}} else {timer.innerHTML--;}}}</script><script>initTimer( 'ready', '', function () {this.innerHTML = 30;initTimer( this.id, '', arguments.callee );});</script>   

<?if(!$CAN_ADD$)?><div align="center"><?if($LOGIN_LINK$)?><a href="$LOGIN_LINK$">Для добавления необходима авторизация</a><?else?>Доступ запрещен<?endif?></div><?else?>   
<table border="0" cellpadding="1" cellspacing="1" width="100%">   
<tr><td><?if($MSGCTRL_URI$)?><a href="$MSGCTRL_URI$"><img src="http://up-cinema.ru/design/profil/wrench.png" width="13" border="0" style="vertical-align:-2px"/></a><?else?><img src="http://up-cinema.ru/design/profil/userr.png" width="13" border="0" style="vertical-align:-2px"/><?endif?> Обновление: <b id="ready">30</b> сек..</td>   

<td><div style="padding-right:2px;text-align:right;font-size:10px;">$LENGTH_COUNTER$</div></td>   
</tr></table>   

<table border="0" cellpadding="1" cellspacing="1" width="100%">   
<tr><td width="95%" rowspan="2">$FLD_MESSAGE$</td>   

</tr><tr><td valign="bottom"><div style="width:30px"><input class="newfilm" style="width:40px;height:38px;font-weight:bold;border:2px solid #cccccc;" type="submit" value="OK" style="width:30px;"><img alt="" style="display:none;" id="mchatAjax" src="http://s42.ucoz.net/img/fr/ajax3.gif" border="0" width="16"/></div></td></tr></table>   
<?endif?>

2. Мини-чат - Вид материалов

Code
<div style="padding:10px 0px 0px 0px;overflow-x:hidden;overflow-y:hidden;">   
<?if($MESSAGE$='привет' or $MESSAGE$='хай')?>   
<img src="http://up-cinema.ru/design/profil/userr.png" width="13" border="0"> <a style="color:white;text-decoration:none;"><b>bot up-Cinema.ru</b></a>   
<div style="margin:0px 0px 5px 0px;border-bottom: #e5e5e5 0px solid;padding-left:3px;padding-top:5px;">→ <span style="padding-left:2px;">hello :D</span><hr style="color:#4F5835;height:1px;width:100%;border-top:0;border-style:dashed;">         
<?else?><?endif?>   
<?if($USERNAME$)?><a href="$PROFILE_URL$" title="$USERNAME$"><img src="http://up-cinema.ru/design/profil/user.png" width="13" border="0"></a><?endif?>   
<a style="color:white;text-decoration:none;" href="javascript:void('Apply to')" onclick="parent.window.document.getElementById('mchatMsgF').focus();parent.window.document.getElementById('mchatMsgF').value+='[color=green][i]$NAME$[/i][/color], ';return false;" title="Цитировать?"><b>$NAME$</b></a>   
<div style="margin:0px 0px 5px 0px;border-bottom: #e5e5e5 0px solid;padding-left:3px;padding-top:5px;">→ <span style="padding-left:2px;">$MESSAGE$</span><hr style="color:#4F5835;height:1px;width:100%;border-top:0;border-style:dashed;"></div>

3. Куда надо ставим:
[code]



Я гл.Модератор оО
  • Страница 1 из 1
  • 1
Поиск: