PDA

View Full Version : who's online: page split


N8
01-13-2005, 09:33 PM
Is there a way to get rid of the page split on the who's online box, and just have all of the users/guests displayed on the first page?
( [vb3] )

Andreas
01-13-2005, 10:35 PM
** Untested **

In functions_online.php comment out

if ($doall == 1 AND ($count > $limitupper OR $count < $limitlower))
{
return '';
}


You might also want to remove the unnecessary pagenave controls.
In online.php comment out

$pagenav = construct_page_nav($totalonline, "online.php?$session[sessionurl]sort=$sortfield&amp;order=$sortorder&amp;pp=$perpage" . iif($who, "&amp;who=$who") . iif($showua, '&amp;ua=1'));


There might be a few other lines in online.php that can be commen, but I am too lazy to test if they are necessary ;)

N8
01-14-2005, 12:15 AM
ahh, I figured it out :)


If anyone else wants to know, change:

$perpage = intval($perpage);

if ($perpage == 0)
{
return $default;
}
else if ($perpage < 1)
{
return 1;
}
else if ($perpage > $max)
{
return $max;
}
else
{
return $perpage;
}


to

$perpage = intval($perpage);

return 999;

Andreas
01-14-2005, 12:21 AM
And what if you got more then 999 users currently logged in?

N8
01-14-2005, 12:59 AM
then put 99999 :P

Andreas
01-14-2005, 01:02 AM
And if you got more then 99999 users currently logged in?
(I know, most likely this will not happen - I just wanted to point out that this does not turn off page splitting, it only increases the limit :))

N8
01-14-2005, 01:04 AM
meh, I'm sure theres a way, I'm just not that great at php :)