![]() |
AJAX Who's Online
First off, this is my first modification. It's tiny, it's obvious, but I'm proud of it. I have Zero Tolerance to thank, he did give me some hints and tips.
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. 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: Code:
// ### ALL DONE! SPIT OUT THE HTML AND LET'S GET OUTTA HERE... ### Code:
if ($_GET['do'] == 'online') Next, open your FORUMHOME template. Find: Code:
<div class="smallfont"> Code:
<script type='text/javascript'> Code:
<div>$activeusers</div> Code:
<div id="whoisonline">$activeusers</div> Since this is my first mod, I'd back up the files. Forgive me if this hack has already been done. I made a strict search and found no such thing. I decided to try to do it, and voila! Go me. |
wont this kill the server on active forums? It runs the WOL queries every second to find out who is online.
|
I don't see why this has to be in ajax..
|
and screenshots,
I don't see why this has to be in ajax.. |
Thanks...great modification...
Many of my members using the ajax chatbox (so they're on the index page most of the time)...Now they can track who's in... |
I didn't think there had to be a screen shot as that there isn't any visual change. If you don't need this, that's ok. I just wanted to share what I did.
|
I would just watch the server load. If you have even a semi active board this is going to bring it to the ground.
|
Thanks!
|
Great hack! Works perfectly. **installs**
I did add the code change for index.php as a plugin instead of hacking the file. It's the forumhome_complete hook. Thanks! |
Nice Hack! but seems a little buggie
1:Currently Active Users: X ( Y Members And Z Guests ) this code: Code:
<a href="online.php$session[sessionurl_q]" rel="nofollow">$vbphrase[currently_active_users]</a>: $totalonline (<phrase 1="$numberregistered" 2="$numberguest">$vbphrase[x_members_and_y_guests]</phrase>) Quote:
Edit: *installed* and disabled MarcoH64's Addon |
All times are GMT. The time now is 01:54 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|