MoNsTeR1KinG СаЙт ФаЙлов И то Другое:-)
[ Новые сообщения · Участники · Правила форума · Поиск · RSS ]
  • Страница 1 из 1
  • 1
Кто вышел и зашел
MoNsTeR-666Дата: Понедельник, 26.08.2013, 05:33 | Сообщение # 1
Полковник
Группа: Администраторы
Сообщений: 170
Репутация: 12
Статус: Offline
Теперь когда пользователь входит в сеть то с правой стороны будет светится такой-то пользователь зашел в сеть...и так же вышел. 
Для форума делаем так! 
в Общие страницы форума после $BODY$ 
вставляем:


Код
[spoiler=Спойлер]<script type="text/javascript" id="userList">  
$.get('/index/62',function(e){ fuu = $('cmd[p="content"]',e).text();  
$('a',fuu).each(function(i){  
$('#userList').prepend('<a class="userList '+$(this).attr('class')+'" href="'+$(this).attr('href')+'">'+$(this).text()+'</a><div style="clear:both"></div>');  
});  
});  

setInterval(function(){  
data=$('#userList').text();  
$.get('/index/62',function(q){ fis = $('cmd[p="content"]',q).text();  
//  
$('a',fis).each(function(){  
if(data.indexOf($(this).text())== -1){  
$('#userList').prepend('<a class="userList '+$(this).attr('class')+'" href="'+$(this).attr('href')+'">'+$(this).text()+'</a><div style="clear:both"></div>');  
_uWnd.alert('<div align="center" style="padding:5px;"><b>'+$(this).text()+'</b> зашел на сайт</div>', '',{w:210, tm:5000, h:60});  
}  
}); // вошли  
$('#userList a').each(function(){  
if(fis.indexOf($(this).text())== -1){  
_uWnd.alert('<div align="center" style="padding:5px;"><b>'+$(this).text()+'</b> вышел из сайта</div>', '',{w:210, tm:5000, h:60});  
$(this).prev('.ssikq').remove(); $(this).remove();  
}  
}); // вышли  
//  
});  
},7000);  
</script>
 
  • Страница 1 из 1
  • 1
Поиск:

***/****
Администратор online
Администратор offline