Quote:
Today at 07:18 PM fury said this in Post #19
Why not just change this line...
Code:
$postids.= "post.threadid='$threadid'";
to this:
Code:
$postids.= "post.threadid='$threadid' AND post.visible='1'";
It might slow it down a tiny bit more but it works with moderated forums...
|
for moderated forums you'll need the other query ($postscount = $DB_site->query_first("SELECT COUNT(*)...) too, to get the right pagecount and page navigation.
this hack speeds thread-display because it will not have to crawl the whole post-table to check the "visible" column, it just uses the indexed "thread" column which is alot faster. this is not "a tiny bit" this is MUCH faster on big forums whith huge threads.
I've installed it on my 2 million post forum and it runs like a charm now.