Version: , by romeshomey
Developer Last Online: Apr 2014
Version: Unknown
Rating:
Released: 08-06-2003
Last Update: Never
Installs: 0
No support by the author.
Can anyone help me out here.
I added the hack for the Number Of Users Online Today to my forum, and since, my Current Users Online panel has quit working.
I have no clue what the problem is and can only asume its an error in my index file as I have the codes in my forumhome already but it isnt being called up.
Can someone PLEASE take a look at my index file and see if I have something missing, or what might be wrong?
Id really really appreciate it, this is driving me nutz, Iv spent 2 hours today tring to solve this and am now at a standstill.
Code:
// today online hack begin
if ((int)$maxusers[0] <= $totalonline) {
$time = time();
$maxloggedin = "$totalonline " . $time . " " . $maxusers[2] . " " . $maxusers[3];
$DB_site->query("UPDATE template SET template='$maxloggedin' WHERE title='maxloggedin'");
$maxusers[0] = $totalonline;
$maxusers[1] = $time;
}
$todayloggedinusers = "";
$numbertodayonline = 0;
$numbertodayonlineinvisible = 0;
$todayusers=$DB_site->query("SELECT userid, username, usergroupid, lastactivity, invisible FROM 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($timeformat, $todayuser[lastactivity]);
if ($todayuser['invisible']==1 and $bbuserinfo['usergroupid']!=6) {
$numbertodayonlineinvisible++;
continue;
}
if ($todayuser['invisible'] == 1) { // Invisible User but show to Admin
$invisibleuser = '*';
}
if ($todayuser['usergroupid'] == 6 and $highlightadmin) {
$username = "<b><i>$todayuser[username]</i></b>";
} else if (($mod["$userid"] or $todayuser['usergroupid'] == 5) and $highlightadmin) {
$username = "<b>$todayuser[username]</b>";
} else {
$username = $todayuser['username'];
}
if (!$todayloggedinuser) {
eval("\$todayloggedinuser = \"".gettemplate('forumhome_todayloggedinuser')."\";");
} else {
eval("\$todayloggedinuser .= \", ".gettemplate('forumhome_todayloggedinuser')."\";");
}
}
$DB_site->free_result($todayusers);
if ($bbuserinfo[usergroupid] == 6) {
$todayonline = $numbertodayonline;
} else {
$todayonline = $numbertodayonline - $numbertodayonlineinvisible;
}
if ((int)$maxusers[2] <= $numbertodayonline) {
$time = time();
$maxloggedin = $maxusers[0] . " " . $maxusers[1] . " $numbertodayonline " . $time;
$DB_site->query("UPDATE template SET template='$maxloggedin' WHERE title='maxloggedin'");
$maxusers[2] = $numbertodayonline;
$maxusers[3] = $time;
}
$todayrecordusers = $maxusers[2];
$todayrecorddate = vbdate($dateformat,$maxusers[3]);
eval("\$todayloggedinusers = \"".gettemplate('forumhome_todayloggedinusers')."\";");
//today online hack end
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.