View Full Version : exclude some forums.. not the normal way though
Acers
10-03-2005, 08:42 AM
I want to exclude some forums from new search and daily search. I know the normal method of comma seperated values
eg
do=getnew&exclude=73,74,75
etc
is there any way i can define some variable in global_start hook (or anywhere else) like
$excludedforums=(list of forum ids)
and then do it like
do=getnew&exclude=$excludedforums
the idea being that with multiple skins i need to change at one place to reflect everywhere.
hobbes747
10-05-2005, 08:56 PM
I plugged this into search_getnew_start
$vbulletin->GPC['exclude'] .= ((!$vbulletin->GPC['exclude']) ? '1,2,3,4' : ',1,2,3,4');
Change 1,2,3,4 to your forum ids.
It works on Get New and Get Daily.
I've been trying to find where I can do the same for every other search, but the other searches don't use exclude, they use forumchoice. If I tack
$vbulletin->GPC['forumchoice'] .= ((!$vbulletin->GPC['forumchoice']) ? '1,2,3,4' : ',1,2,3,4');
on to do=process (search_process_start), it changes the searching for everything, including inside of the threads. :hurt:
Andreas
10-05-2005, 08:58 PM
<a href="https://vborg.vbsupport.ru/showthread.php?t=91025" target="_blank">https://vborg.vbsupport.ru/showthread.php?t=91025</a> might also be useful
Acers
10-06-2005, 03:05 PM
thanks hobbes.. yes thats a better way.
btw kirby, i had seen that hack. but that would work for registered users only.(atleast thats what it looks like from the hack description)
Btw anyway its possible to have that thing extended so that people can choose which forums to return search results from. eg users can select the forum once( exclude some forums which they don't want the search keywords tems to be returned from). That might be a useful addon. That setting can be there is say usercp,
David_R
10-07-2005, 03:32 PM
i cannot work this on vbulletin version 3.5 gold
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.