vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Custom filter in quick search (https://vborg.vbsupport.ru/showthread.php?t=306530)

januszmk6 01-02-2014 03:15 PM

Custom filter in quick search
 
Hi. I am trying to add filter to quick search form, so if someone set a checkbox, the search result will be just from specific forum id.
I can see that there is
PHP Code:

vB_Search_Criteriaq::add_filter 

where I can add array of forum ids, but I see that all plugins are before
PHP Code:

$criteria->set_search_terms($searchterms); 

which remove my search filters. I tried also add custom values to request array:
PHP Code:

$_REQUEST['forumchoice'][] = 122;
$_REQUEST['childforums'] = 1;
$globals['forumchoice'] = 10;
$globals['childforums'] = 1

but it seems that it doesn't work in that way.
Could someone help me with this?

vB version: 4.2.2

kh99 01-02-2014 05:36 PM

Maybe try setting $_REQUEST['include'] to a comma separated list of forum ids to search.

januszmk6 01-02-2014 06:04 PM

Quote:

Originally Posted by kh99 (Post 2471848)
Maybe try setting $_REQUEST['include'] to a comma separated list of forum ids to search.

thanks, with $_REQUEST['include'] and $_REQUEST['contenttypeid'] = 1 it's working now


All times are GMT. The time now is 08:39 AM.

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.00975 seconds
  • Memory Usage 1,718KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete