View Full Version : Extra forum option to...
filburt1
04-28-2002, 02:56 PM
...exclude a forum from the search indexing? Wayne at vB.com said it is very easy, so I'm crossing my fingers :)
Admin
04-28-2002, 03:41 PM
Here's the basic code to do this. There might be a better way (without adding a query) but I really don't feel like chasing down all calls to indexpost() throughout vB.
Add this:
$getforum = $DB_site->query_first("
SELECT forumid FROM thread
WHERE threadid=$post[threadid]
");
$forumid = $getforum['forumid'];
if ($forumid == 5 or $forumid == 8 or $forumid == 14) {
return;
}
Right after this in functions.php:
$post=$DB_site->query_first("SELECT postid,threadid,title,pagetext FROM post WHERE postid='$postid'");
Now it won't index posts from forums 5, 8, and 14.
filburt1
04-28-2002, 03:46 PM
Cool :) I was hoping for a more graceful way, i.e., assigning forum IDs through the admin CP, but what can ya do ;)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.