if($limit>100) $limit=100;
$request = db_query("SELECT * FROM {$tp_prefix}shoutbox WHERE 1 ORDER BY value2 DESC LIMIT $limit", __FILE__, __LINE__);
if (mysql_num_rows($request) > 0)
{
$shouts= $txt['tp-last'].' '.$limit.' '.$txt['tp-shouts'].'
';
while($row = mysql_fetch_assoc($request))
{
$shouts .=''.$row['value3'].'
'.timeformat($row['value2']).'
';
$myshout='';
$myshout=$row['value1'];
$shouts .= doUBBC($myshout);
$shouts .= '
';
}
// Now we reverse it!
$shouts = array_reverse($shouts);
$context['TPortal']['shoutbox']=$shouts;
mysql_free_result($request);
}