Version: 1.00, by Gary King
Developer Last Online: Jun 2020
Version: 3.0.4
Rating:
Released: 01-02-2004
Last Update: 03-16-2004
Installs: 527
No support by the author.
PLEASE CLICK THE INSTALL BUTTON IF INSTALLED!
What does this hack do?
It shows the users who visited your forums in the last 24 hours (or today). This hack works similiarly like the one released for vBulletin 2.
NOTE: If you want to show 'Who was online today' on a separate page from forumhome, then download instructions-newpage.txt and onlinetoday.php instead of instructions-regular.txt
Modifications
1 file modification
3 template modifications
0 queries to run
Features
supports and uses phrases
usernames are formatted properly
invisible users only show to people who are supposed to see them (admins and whoever else you allowed)
integrated (makes it so that the Who Was Online bar is now collapseable
Screenshots
Look below
Credits: Thanks goes to Mystics, where this hack is based on his
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
Invisible users show for all and not just admins. The fix is as follows:
Find:
PHP Code:
$todayusers=$DB_site->query("SELECT userid, username, usergroupid, lastactivity FROM ".TABLE_PREFIX."user
WHERE lastactivity > " . (mktime(0,0,0,date("m"),date("d"),date("Y")) + (($bbuserinfo['timezoneoffset']-$timeoffset)*3600)) . "
ORDER BY username");
while ($todayuser=$DB_site->fetch_array($todayusers)) {
$numbertodayonline++;
$invisibleuser = '';
$userid = $todayuser['userid'];
$lastactivetime = vbdate($vboptions['timeformat'], $todayuser[lastactivity]);
if ($todayuser['invisible']==1) and ($bbuserinfo['usergroupid']!=6) {
$numbertodayonlineinvisible++;
continue;
}
if ($todayuser['invisible']==1) { // Invisible User but show to Admin
$invisibleuser = '*';
}
Replace with:
PHP Code:
$todayusers=$DB_site->query("SELECT userid,(user.options & $_USEROPTIONS[invisible]) AS invisible, username, usergroupid, lastactivity FROM ".TABLE_PREFIX."user
WHERE lastactivity > " . (mktime(0,0,0,date("m"),date("d"),date("Y")) + (($bbuserinfo['timezoneoffset']-$timeoffset)*3600)) . "
ORDER BY username");
while ($todayuser=$DB_site->fetch_array($todayusers)) {
$numbertodayonline++;
$invisibleuser = '';
$userid = $todayuser['userid'];
$lastactivetime = vbdate($vboptions['timeformat'], $todayuser[lastactivity]);
if (($todayuser['invisible']) and ($bbuserinfo['usergroupid']!=6)) {
$numbertodayonlineinvisible++;
continue;
}
if (($todayuser['invisible']) and ($bbuserinfo['usergroupid']==6)) { // Invisible User but show to Admin
$invisibleuser = '*';
}
-----------
In case my copying and pasting are screwy, what needs to be fixed is the query. It needs to check the options field in the table. invisible was a vb2 field and isn't in vb3. It also needs to change the if statements because invisible will not equal 1. It just won't equal zero.
I also moved the templates to the cache on my board, but didn't bother with the phrases. Things seem to be working ok now.