Hi Josh,
This will produce only 2 queries.

To get this to work on all pages that use the send_header function you will need to change this line:
$LastOn = $html -> get_date() - 600;to this one:
$LastOn = $this -> get_date() - 600;and then place the code inside of the send_header function of their ubbt.inc.php script below this:
code:
// -------------------------------------------------
// Are we showing the user list to reged users only?
if ( ($config['userlist'] == 2) || ($config['userlist'] == 1) ){
$template['members_link'] = " | <a href="$phpurl/showmembers.php?Cat=$Cat&page=1" $target>{$ubbt_lang['USER_LIST']}</a>";
}
Ok now in your registerednav.tmpl place this code:
echo <<<UBBTPRINT
<table width="{$theme['tablewidth']}" align="center" cellspacing="1" cellpadding="1">
<tr>
<td>
<table width="100%" align="center" class="tableborders" cellpadding="{$theme['cellpadding']}" cellspacing="{$theme['cellspacing']}">
<tr>
<td class="lighttable" align="center">
$whosOnline
</td>
</tr>
</table>
</td>
</tr>
</table>
<br />
UBBTPRINT;
at the bottom, between:
UBBTPRINT;and
/* UBBTREMARK */ ?>and now you should have the "Who's Online Box" on every page that displayes the registered navigational bar.
Upload and Enjoy
