Version: 2.31, by Paul M
Developer Last Online: Nov 2023
Version: 3.0.x
Rating:
Released: 11-08-2004
Last Update: 07-23-2005
Installs: 627
No support by the author.
This modification is no longer available or supported.
A very simple display of all members who have visited the forum 'today' (i.e. since midnight). I looked at the existing hacks that apparently do this, and they either seemed over complicated or had a lot of problems, so I wrote my own simple version.
The main features of Version 2.xx are ;
1. It displays the list on Forum Home under the "Users online" display.
2. The list view is collapsable, so you just see the number.
3. Invisible users are only displayed to those allowed to see them (with a "*")
4. Users who should display as coloured or bold etc should be displayed correctly. (based on the display usergroup)
5. If you 'hover' over a username it will show the time they were last active.
6. The list is in member name order.
If you prefer, then there is an option to make this hack display a rolling 24 hours - un-comment the relevant line in the code.
Addons: ericgtr has created a CMPS module for this hack, you will find the files here. paul41598 has created a pop-up display instead of the collapsable display, you will find the files here.
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
Works like a charm for me. Thanks for your work. I hope I don't offend you by posting what I did.
I would like to know since I dont play in vB a lot whether anything I did would open a security hole.
Well it's a bit of a odd thing to do, but it won't open any security holes. However, you realise that by doing this, you will run the code on every vB page you ever view, not just the forumhome page ?
I see someone else has made a variation of this, I did also and I will share it here. Basically, I like the idea of it showing how many users are online today but not the names on my forumhome, I want that in a new page. The other modification for this does this but has never worked on my site, the numbers were different when you clicked on it. So I made it so this will work in a new page.
Create a new php page called online_today.php add all of the following code to it and save:
PHP Code:
<?php
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'online_today'); // change this depending on your filename
// ################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array(
);
// get special data templates from the datastore
$specialtemplates = array(
);
// pre-cache templates used by all actions
$globaltemplates = array(
'online_today',
);
// pre-cache templates used by specific actions
$actiontemplates = array(
Well it's a bit of a odd thing to do, but it won't open any security holes. However, you realise that by doing this, you will run the code on every vB page you ever view, not just the forumhome page ?
I just installed this mod with vb 3.0.5 and it works great. I made some changes and I am posting what I did if you want to have an option that does not require altering the index.php.
1 : create a php file called whos.online.today.php with the following and upload to the root of the forum. :
PHP Code:
<?php
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
3: Follow your instructions for replacing the code in the Forumhome template.
Done.
Works like a charm for me. Thanks for your work. I hope I don't offend you by posting what I did.
I would like to know since I dont play in vB a lot whether anything I did would open a security hole.
You may want to consider adding a conditional to your phpinclude_start template to only run that query when the page selected is forum home or your new WWOL page. As it is that code runs on every page loaded whether it's used or not. Just a little optimization suggestion.