Help - Search - Members - Calendar
Full Version: MT Search Functions....
Movable Type Community Forum > Additional Resources > Tips and Tricks
Talanithus_UOLS
I would like to provide a search box for two different scenarios...

1. A Search only box for my main Blog (no replace functions), that is listed on the main index.
2. A Search function that will look through the archives of multiple Blogs located on my server.

These could either be separate, or through a drop down menu in the same search box.

For example, I would like for my users to be able to search my main site for a particular topic, OR my main site + all sub sites (multi-Blog).

Possible? Thanks in advance for the help
nammer
The "include and exclude blogs" from search function is covered here in the manual; it's generally handled via editing a line in the mt.cfg file (to exclude your test blog, for example). The long and the short of it is that because include and exclude is handled globally for your entire MT installation (no mattr how many blogs you're running), you can do either option one or two, but not both.

Of course, I could be wrong - it's happened before! tongue.gif

Donna
crys
Actually you can exclude or include blogs in a form rather than globally. (see the link Nammer gave) I think this code should work for seaching from a single form: (untested)
CODE
<form method="get" action="<$MTCGIPath$><$MTSearchScript$>">

<b>Search:</b>
<select name="IncludeBlogs">
<option value="">All Blogs</option>
<option value="<$MTBlogID$>">This blog</option>
</select>
<br />
<input id="search" name="search" size="20" /><br />

<input type="submit" value="Search" />
</form>
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.