Quote:
Originally posted by Franki
Logician,
This hack exculdes a forum from searching it. I want the reverse: I'd like to search only one forum. Is is difficult?
|
well if you exlude all forums but one, your search will be in that forum..
But if you want a specific code for this this should work (this is not tested while the other one was):
Replace
PHP Code:
if (isset($forumid)) {
$forums=$DB_site->query("SELECT forumid FROM forum WHERE INSTR(CONCAT(',',parentlist,','),',".addslashes($forumid).",')>0");
$forumsql.=" AND forumid IN (0";
while ($forum=$DB_site->fetch_array($forums)) {
$forumsql.=",$forum[forumid]";
}
$forumsql.=") ";
}
AS:
PHP Code:
$forumsql.=" AND forumid IN (0,X) ";
Replace X with your forumid.. And dont forget to make the same change twice in search.php (more info about this is on the other thread)