Help - Search - Members - Calendar
Full Version: Search options
Movable Type Community Forum > Additional Resources > Tips and Tricks
elph
I'm assuming this is pretty simple but here it goes. I want to put 2 radio buttons on my site for the search box. One would say something like "Search this area" and the other would be something like "Search the whole site". By default I would probably have it search the whole site. I want to have multiple blogs on the site for each major area of the site, so I want to give the ability to search each blog individually and the site as a whole on the main search box.

I would I pull this off? Right now I've got the mt.cfg set to include all blogs but as time goes on I think that's going to be an excessive standard and I would like to figure something out now.

Thanks in advance,
elph

Also as a side thought. I'm tryin to figure how to change the B & I buttons in the entry field to spit out < strong > < /strong > & < em > < /em > instead of the < b > < /b > & < i > < /i >.
ronincyberpunk
Well first let's look at the search question:

Now I've managed to get as close as I can to your request. What I've done is made the search default to search all blogs, and a checkbox which indicates to search this blog only.

CODE
<form method="get" action="<$MTCGIPath$><$MTSearchScript$>">
<label for="search" accesskey="4">Search this site:</label><br />
<input id="search" name="search" size="20" /><br />
<input type="checkbox" name="IncludeBlogs" value="<$MTBlogID$>" /> Only this blog
</MTBlogs><br />
<input type="submit" value="Search" />
</form>


I've tested it on my own blog and it works. So let me know if you need more help on this topic.

As for changing the buttons, that requires hacking the mt cgi files themselves - which is doable. But I don't have any experience doing so.

Hope these help, if the template doesn't work for you please come back and post so we can work on it.

Thanks

Ronin
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.