it's a bit more complicated ^^
example from showthread.php:
PHP Code:
// set $perpage
if (!$perpage)
{
$perpage = $bbuserinfo['maxposts'];
}
$checkmax = explode(',', $vboptions['usermaxposts'] . ',' . $vboptions['maxposts']);
if ($perpage < 1 OR $perpage > max($checkmax))
{
$perpage = $vboptions['maxposts'];
}
so $perpage can be defined in several ways, as parameter of the url, as a user setting, as $vboptions[mx] aso.