vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Creating a single search box (https://vborg.vbsupport.ru/showthread.php?t=222575)

Mark.B 09-06-2009 11:50 AM

Creating a single search box
 
I'd quite like to create a single search box, as the default vB searches are not terribly user friendly.

If you have a look at my site's front page HERE, you'll see I've put two search boxes up...one for blogs and one for forums...in the top right corner.

However, even this method is still a bit clunkier than I would like. I would ideally like to have a single search box that then has a tick box/radio button/dropdown for forums or blogs, and then sends the search parameters to the relevant file...search.php or blog_search.php.

Kind anyone point me in the right direction for how to do this? I can probably write it myself if I know the direction I should be heading.

(PS not currently sure what I'd do with the threads/posts radio button at this stage.)

Lynne 09-06-2009 03:57 PM

I don't have a blog addon, so I can't really try and test anything there. It looks like the form action would have to change depending on what you are searching. I don't think you can do that.... unless you have some intermediate page that both forms use as an action and then it redirects based on the real form action you want (search forum or search blogs). Maybe javascript could be used? I'm not really sure since I'm no javascript expert. You may want to consider a single box that then drops down to show the three search fields (kinda like how it is done on vb.com).


All times are GMT. The time now is 08: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.01181 seconds
  • Memory Usage 1,709KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)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