Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 02-18-2003, 03:06 PM
gopherhockey's Avatar
gopherhockey gopherhockey is offline
 
Join Date: Jul 2002
Posts: 202
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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)
Reply With Quote
  #2  
Old 02-19-2003, 08:10 PM
sparky2 sparky2 is offline
 
Join Date: Jul 2002
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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:
In excluding this as a feature, the attitude of the vBulletin developers seems to be "why/when in-the-world would anyone want to do this?"
-=-
In reaction to this, I would ask
"Why would anyone ever want to set a forum INACTIVE?"
(There's a setting for this)
along with
"Doesn't it make sense that if a forum is set INACTIVE, the admin wouldn't want its posts indexed?"
(and yes, I do understand that reindexing would be necessary after toggling this for one or more subforums.)
Reply With Quote
  #3  
Old 02-21-2003, 11:37 AM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

if you find

PHP Code:
$iforums=$DB_site->query('SELECT forumid,parentid,displayorder,title FROM forum WHERE displayorder<>0 AND active=1 ORDER BY parentid,displayorder,forumid'); 
and Replace it as:

PHP Code:
$iforums=$DB_site->query('SELECT forumid,parentid,displayorder,title FROM forum WHERE displayorder<>0 AND active=1 AND forumid!=YY AND forumid!=XX ORDER BY parentid,displayorder,forumid'); 
and replace XX and YY with the forumids of the forums you want to ignore in search page, this will remove the forums name from search page, so it cant be specifically searched in that page.

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..
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:21 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
  • Page Generation 0.03163 seconds
  • Memory Usage 2,186KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (3)post_thanks_box
  • (3)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit_info
  • (3)postbit
  • (3)postbit_onlinestatus
  • (3)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete