PDA

View Full Version : Creating a single search box


Mark.B
09-06-2009, 11:50 AM
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 (http://www.bowlandcentral.com/forum), 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).