Quote:
Originally posted by TommyXXL
If you use this, than all threads are shown on the mainpage, even threads that are in internal forums.
|
Do you mean private forums that are limited access? If so, here's the solution. Change the line
PHP Code:
$query = "SELECT * FROM thread ORDER BY lastpost DESC LIMIT $maxthreads";
to
PHP Code:
$query = "SELECT * FROM thread WHERE forumid!=XX ORDER BY lastpost DESC LIMIT $maxthreads";
and change the
XX to the number of the forum you want to exclude. (You can determine the forum number by going to your main forums page and mousing over the link to each forum. The forum number is the part of the url after forumid; e.g.
http://yoursite.com/forumdisplay.php?s=&forumid=36. To exclude more than one forum, add this:
PHP Code:
AND forumid!=XX
for each additional forum you want to exclude. MAKE SURE you add a space before the word AND and a space after XX and you change the XX to the number you want excluded. Example: I want to exclude forums 6, 12, and 35.
PHP Code:
$query = "SELECT * FROM thread WHERE forumid!=6 AND forumid!=12 AND forumid!=35 ORDER BY lastpost DESC LIMIT $maxthreads";
Second example: I want to exclude forum 6.
PHP Code:
$query = "SELECT * FROM thread WHERE forumid!=6 ORDER BY lastpost DESC LIMIT $maxthreads";