форум vBSupport.ru > vBulletin > Old vB versions (3.0.x & 2.x.x) > vBulletin 3.5.x > Hacks, mods and scripts [3.5.x]
  • »
VBsupport перешел с домена .ORG на родной .RU Ура! Пожалуйста, обновите свои закладки - VBsupport.ru
 
 
 
 
Kurt
Простоузер
Default Who's Online [AJAX]
0

Description:
This only refreshes the names of the users in the index page of the forums. Not the "currently online" number of users. It could say currently 4 users online, and there's a huge list of usernames.
I don't really see a need of a picture since there's no visual change. It only calls the names of the users currently online and removes them if they're offline without the need of refreshing the index page of the forums.


AJAX Who's Online

может кто выложить?
Bot
Yandex Bot Yandex Bot is online now
 
Join Date: 05.05.2005
Реклама на форуме А что у нас тут интересного? =)
 
 
kerk
k0t
 
kerk's Avatar
Default
0

Edits:
1 Template to edit (FORUMHOME)
1 File to edit (index.php)

First the File Edit:
Open your index.php file in your forum directory.
Find:
PHP Code:
// ### ALL DONE! SPIT OUT THE HTML AND LET'S GET OUTTA HERE... ### 
Above add:
PHP Code:
if ($_GET['do'] == 'online')
{
    echo 
$activeusers;
    exit;

Save, close, then upload index.php file to your forum directory.

Next, open your FORUMHOME template.
Find:
HTML Code:
			<div class="smallfont">
				<div style="white-space: nowrap"><phrase 1="$recordusers" 2="$recorddate" 3="$recordtime">$vbphrase[most_users_ever_online_was_x_y_at_z]</phrase>
Above that, add:
HTML Code:
<script type='text/javascript'>
<!--
function requestWhoOnline()
{
	doReqOnline = new vB_AJAX_Handler(true)
	doReqOnline.onreadystatechange(ReqOnlineDone)
	doReqOnline.send('index.php?do=online')
}
function ReqOnlineDone()
{
	if (doReqOnline.handler.readyState == 4 && doReqOnline.handler.status == 200)
	{
		fetch_object('whoisonline').innerHTML = doReqOnline.handler.responseText
		setTimeout("requestWhoOnline()", 60000)
	}
}
setTimeout("requestWhoOnline()", 20000)
-->
</script>
Now Find:
HTML Code:
<div>$activeusers</div>
Replace with:
HTML Code:
<div id="whoisonline">$activeusers</div>
но скрей всего сервак будет грузить не по детски....
 
 
Profess1on
Продвинутый
Default
0

А к4аков смысл данного хака?
Из названия темы несовсем ясно!
 
 
tetrakiss
Простоузер
Default
0

ну из названия я понял что типа без рефреша страницы можно узнать сколько юзеров околачивается щас на форуме..... вроде как реалтайм
 
 
Profess1on
Продвинутый
Default
0

Вопрос к тем, кто устанавливал: грузит сервак сильно?
Есть смысл ставить?
 
 
StirolXXX
Продвинутый
 
StirolXXX's Avatar
Default
0

Поставил - вроде не сильно...
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT +4. The time now is 10:16 PM.


Powered by vBulletin® Version 3.5.0
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Loading...