Quote:
Originally posted by LightBringer
If I set up that particular news forum so that there are no replies allowed, then it works fine, but as long as there are comments associated with the post, those comments show up as news items on the front page.
|
Thats a slight oversight on my part, the board I was testing with didn't have any replies in the threads. To use the new query reduced code will require an alteration to the thread table to store the first postid when a newthread is started.
After a load of thinking and testing I have come up with these changes you need to do.
[sql]ALTER TABLE thread ADD tpostid int( 10 ) unsigned DEFAULT '0' NOT NULL[/sql]
In newthread.php find:
PHP Code:
$postid=$DB_site->insert_id();
After it add:
PHP Code:
if ($forumid=$newsforum) {
$DB_site->query("UPDATE thread SET tpostid=$postid WHERE threadid=$threadid");
}
This will only add the extra query when starting threads in the news forum, of course you can just add the query without the if to add it to all posts.
And upload the new vbindex.php that is attached. Just the threads to look into now.