10-15-2000, 01:33 PM
Tiny tiny hack! However I know some newbies may wanted to have this coded a long time ago on their forum
In the file newreply.php (under the action="newreply" section)
if ($DB_site->num_rows($posts)>$maxposts) {
eval("\$threadreviewbits = \"".gettemplate("threadreview")."\";");
} else {
while ($post=$DB_site->fetch_array($posts)) {
$username=$post[username];
$reviewmessage=bbcodeparse($post[pagetext],$forumid,$post[allowsmilie]);
eval("\$threadreviewbits .= \"".gettemplate("threadreviewbit")."\";");
}
}
And replace with
$i = 1;
while ($post=$DB_site->fetch_array($posts) and $i<=10) {
$username=$post[username];
$reviewmessage=bbcodeparse($post[pagetext],$forumid,$post[allowsmilie]);
eval("\$threadreviewbits .= \"".gettemplate("threadreviewbit")."\";");
$i++;
}
You can set $i equal to the amount of posts you want to see. So far no bugs since this is such a tiny addition! :) Hope some people like this
[Edited by SonnetCelestial on 10-15-2000 at 10:36 AM]
In the file newreply.php (under the action="newreply" section)
if ($DB_site->num_rows($posts)>$maxposts) {
eval("\$threadreviewbits = \"".gettemplate("threadreview")."\";");
} else {
while ($post=$DB_site->fetch_array($posts)) {
$username=$post[username];
$reviewmessage=bbcodeparse($post[pagetext],$forumid,$post[allowsmilie]);
eval("\$threadreviewbits .= \"".gettemplate("threadreviewbit")."\";");
}
}
And replace with
$i = 1;
while ($post=$DB_site->fetch_array($posts) and $i<=10) {
$username=$post[username];
$reviewmessage=bbcodeparse($post[pagetext],$forumid,$post[allowsmilie]);
eval("\$threadreviewbits .= \"".gettemplate("threadreviewbit")."\";");
$i++;
}
You can set $i equal to the amount of posts you want to see. So far no bugs since this is such a tiny addition! :) Hope some people like this
[Edited by SonnetCelestial on 10-15-2000 at 10:36 AM]