Okay I modded the script somewhat to create the above mentioned look but
I'm stuck on the
Most users online bit.
heres my code thus far:
Code:
<?php
error_reporting(E_ALL & ~E_NOTICE);
require_once("./global.php");
$datecut = time()-$vboptions['cookietimeout'];
$regmembername = $DB_site->query("SELECT DISTINCT username,options FROM ".$tableprefix."user,".$tableprefix."session
WHERE ".$tableprefix."session.userid=".$tableprefix."user.userid AND ".$tableprefix."session.lastactivity>$datecut
ORDER BY username ASC") or exit("oops2");
while($regmember = $DB_site->fetch_array($regmembername))
{
$regmember['options'] = intval($regmember['options']);
foreach($_USEROPTIONS as $optionname => $optionval)
{
$regmember["$optionname"] = iif($regmember['options'] & $optionval, 1, 0);
}
if ((($regmember['invisible'] == 0)) and $regmemberson or ($bbuserinfo['usergroupid'] == 6 and $regmember['invisible'] == 1))
{
$regmemberson .= ", ";
}
$regmembercomma++;
if ($regmember['invisible'] == 0 or $bbuserinfo['usergroupid'] == 6) {
if ($regmember['invisible'] == 1) {
$userinvisible = "*";
}
$regmemberson .= $regmember['username'].$userinvisible;
} else {
$regmembercomma++;
}
}
if (!$regmemberson)
{
$regmemberson = "(none)";
}
$regmembers = $DB_site->query_first("SELECT COUNT(DISTINCT userid) AS membersonline FROM ".$tableprefix."session WHERE userid>0 AND ".$tableprefix."session.lastactivity>$datecut") or exit("oops3");
$regmembersno = number_format($regmembers['membersonline']);
$guests = $DB_site->query_first("SELECT COUNT(userid) AS guestsonline FROM ".$tableprefix."session WHERE userid=0 AND ".$tableprefix."session.lastactivity>$datecut") or exit("oops4");
$guestson = number_format($guests['guestsonline']);
$totalonline = $regmembersno + $guestson;
print 'Active users online: '.$totalonline.' ('.$regmembersno.' users and '.$guestson.' guests online.)';
echo "<br>$regmemberson";
?>
I removed all the extra's to help clear up things while manipulating the code.
I was thinking of pulling the data from the original /forum/online.php file
but I am uncertain of the approach to use, the code seems fairly long to
me and I'm pretty sure it can be reduced
any help would be greatly appreciated. thx