2 isaac Sep 16, 2004 00:04

It works! Thanks a lot!
Seem to have only one problem: The selection "Exact phrase" seems not to work. It finds the same as "All words".
I tried to set the varible in lower case letters so it reads "sentence" instead of "SENTENCE" and then it seems to work!?
Issac, I also was trying to search all my blogs and tried your method, but it didn't work for me. Do you happen to know what else may be the problem. Thanks.
isaac wrote:
Here's what I use on my blog.
Put this in your _main.php file, or wherever the search box is located:
<form method="get" class="search" action="<?php $savedBlog = $Blog; $savedblog = $blog; unset($Blog); $blog = 1; bloginfo('blogurl'); $Blog = $savedBlog; $blog = $savedblog ?>"> <input type="text" name="s" size="18" value="<?php echo htmlspecialchars($s) ?>" /> <select name="sentence"> <option value="AND" selected="selected">All Words</option> <option value="OR">Some Word</option> <option value="SENTENCE">Exact Phrase</option> </select> <input type="submit" name="submit" value="<?php echo T_('Search') ?>" /> </form>
It's important to handle both $Blog (the object) and $blog (the number). This will search all blogs.
What do you mean by handle? What should be changed? Can you provide an example? Let's say I want to search Blog 6, 8 and 10.
Thanks for your help!
Here's what I use on my blog.
Put this in your _main.php file, or wherever the search box is located:
It's important to handle both $Blog (the object) and $blog (the number). This will search all blogs.