In
shoutbox_archive.php search
[syntaxhighlighter brush=php,first-line=1,highlight=0,collapse=false,html-script=false]if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart'])) { $_GET['rowstart'] = 0; }
if ($rows != 0) {
$result = dbquery(
"SELECT s.shout_id, s.shout_name, s.shout_message, s.shout_datestamp, u.user_id, u.user_name, u.user_status
FROM ".DB_SHOUTBOX." s
LEFT JOIN ".DB_USERS." u ON s.shout_name=u.user_id
WHERE s.shout_hidden='0'
ORDER BY s.shout_datestamp DESC LIMIT ".$_GET['rowstart'].",20"
);[/syntaxhighlighter]
replace with
[syntaxhighlighter brush=php,first-line=1,highlight=0,collapse=false,html-script=false]if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart']) || $_GET['rowstart'] > $rows) { $_GET['rowstart'] = 0; }
if ($rows != 0) {
$and = "";
if ((isset($_GET['shout_id']) && isnum($_GET['shout_id'])) && !isset($_GET['action']) && $_GET['rowstart'] == 0) {
$and = "AND s.shout_id='".$_GET['shout_id']."'";
}
$result = dbquery(
"SELECT s.shout_id, s.shout_name, s.shout_message, s.shout_datestamp, u.user_id, u.user_name, u.user_status
FROM ".DB_SHOUTBOX." s
LEFT JOIN ".DB_USERS." u ON s.shout_name=u.user_id
WHERE s.shout_hidden='0' ".$and."
ORDER BY s.shout_datestamp DESC LIMIT ".$_GET['rowstart'].",20"
);[/syntaxhighlighter]
If you don't know what's with the first line
see this.