![]() |
Excluding a forum in ALL search functions
I have seen a few threads regarding removing a forum from "view new posts" and have gotten that to work. However, I want to go one step farther and completely ignore a forum from all search functions except searching within the forum itself (at the bottom of the screen in the forum view)
Can someone explain how this could possibly be done? Again, I have already modified the "get daily" stuff and that works great. I know I can exclude searching via rights.. but this seems to remove everything, even the forum search itself. Thanks! (and I apologize if this was stated elsewhere, but I could only find the new posts part) |
I'm responding to "how it could possibly be done" b/c I'll probably end up doing this for our forums (one subforum alone has 986,000+ posts). I too had searched & haven't seen previous discussion on this.
step 1: add a new field to the forum table, ala UPDATE forum ADD COLUMN 'exemptfromsearch' tinyint(4) NOT NULL default '0' step 2: manually query to toggle the value of forum.exemptfromsearch for select subforums update forum set exemptfromsearch='1' where forumid=x step 3: since the forumid isn't passed to function indexpost() function unindexpost() within ~admin/functions.php we'll either have to add code which WILL pass forumid as an argument to these functions and eval its value and conditionally abort -=OR=- add conditional code within each calling script editpost.php newreply.php postings.php surrounding each instance of calls to the indexpost and unindexpost functions, so that the indexing won't ALWAYS occur if ( $threadinfo['forumid']!='0') { (I suspect the latter approach would be more efficient) ^---- 1, 2 & 3 cover the functional requirements. Steps 4, 5, etc. would be a matter of editing ~admin/forum.php to add contols to the AdminCP interface and extend the SQL queries to update forum.exemptfromsearch along with the other column values. Quote:
|
if you find
PHP Code:
PHP Code:
gotto go now so couldnt have time to hack more, but please bear in mind that you also have to hack the "simplesearch" part of search.php so that when ALL FORUMS are marked, search will ignore your specific forum.. |
All times are GMT. The time now is 05:11 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|