vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Adding Search Specific Forum Option (https://vborg.vbsupport.ru/showthread.php?t=295189)

kh99 07-29-2014 10:32 AM

I was saying that if you change forumchoice[]=35 to include=35 it will work.

Edit: oops, forget that last part I wrote, I got myself confused by not refreshing my browser page. But looking at the search code, it seems like it might have something to do with how the content type is specified.

Edit again: OK, I'm pretty sure that this works:
Code:

<a href="search.php?do=finduser&userid={vb:raw post.userid}&contenttypeid=1&showposts=0&forumchoice[]=22">test</a>

Skyrider 07-29-2014 11:06 AM

Quote:

Originally Posted by kh99 (Post 2508820)
I was saying that if you change forumchoice[]=35 to include=35 it will work.

Edit: oops, forget that last part I wrote, I got myself confused by not refreshing my browser page. But looking at the search code, it seems like it might have something to do with how the content type is specified.

Edit again: OK, I'm pretty sure that this works:
Code:

<a href="search.php?do=finduser&userid={vb:raw post.userid}&contenttypeid=1&showposts=0&forumchoice[]=22">test</a>

I'm in love with you right now, thanks! So it was just the "contentid" with value 1 that had to be added? I assume I can add multiple forumchoices as well to search through multiple forum sections?

kh99 07-29-2014 12:21 PM

I didn't try that, but you should be able to. I believe it's done by adding additional parameters, like:
Code:

...&forumchoice[]=22&forumchoice[]=23&forumchoice[]=24
BTW, I noticed my post above could be confusing because I edited and removed a paragraph, but just to be clear, using include=35 should also work, even without the contenttypeid. But in that case specifying multiple forums would be like this: include=22,23,24. So that will work with a link (and the resulting link is easier to read) but to have a form with a list to select from (like the OP wanted) then you need to use forumchoice[]. (I hope that makes sense).


All times are GMT. The time now is 06:29 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.01079 seconds
  • Memory Usage 1,721KB
  • 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_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete