MyBB Community Forums

Full Version: who was online today mod for mybb 1.2+
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
ok im trying to install a whos online mod,.. and its throwing up an error... i know this to be becoz im using the 1.x mod version...

the problem is in line 170. which is
$onlinetoday .= $todaycomma.formatname($online['username'], $online['usergroup'], $online['displaygroup']).$invisiblemark;


to be exact.

so what is the correct php line i should be using?

im using this modification of index.php.

$todaycount = 0;
    $countinv = 0;
    $stime = time()-(60*60*24);
    $query = $db->query("SELECT u.* FROM ".TABLE_PREFIX."users u LEFT JOIN ".TABLE_PREFIX."usergroups g ON (g.gid=u.usergroup) WHERE u.lastactive > $stime ORDER BY u.lastactive DESC");
    $todaycomma = '';
    $onlinetoday = '';
    while($online = $db->fetch_array($query))
    {
        if($online['invisible'] != "yes" || $mybb->usergroup['canviewwolinvis'] == "yes")
        {
            if($online['invisible'] == "yes")
            {
                $invisiblemark = "*";
                $countinv++;
            }
            else
            {
                $invisiblemark = "";
            }
            $todaycount++;
            $onlinetoday .= $todaycomma.formatname($online['username'], $online['usergroup'], $online['displaygroup']).$invisiblemark;
            $todaycomma = ', ';
        }
    }
Big Grin nvm, had to put a _ in format_name Toungue
Ok, anyone know what the $lang is for the online today note?
Please read the "What qualifies as General Support thread before you make posts in this forum.

This forum is for support with MyBB, not modifications, themes or template sets.

Moving to the correct forum..
thanks chris

ok anyway...

how do i get it to show the
[# Member Was Online Today]
and
[# Members Was Online Today]

...i can't get it to work like the who was online page.. even if i copy in the


		$todaycount++;
	}
	if($todaycount == 1)
	{
		$onlinetoday = $lang->member_online_today;
	}
	else
	{
		$onlinetoday = sprintf($lang->members_were_online_today, $todaycount);
	}