4images Forum & Community
4images Issues / Ausgaben => Discussion & Troubleshooting => Topic started by: Chris on October 03, 2002, 04:36:17 AM
-
I have images of two people. In the description fields, I have entered their names. They are:
Clint Macbeth
Keith Macbeth
Using the Advanced Search form, if I enter "Keith Macbeth" in the search_keywords form field and click the "AND" search constructor radio button, I get all images from both people. If I enter "Keith AND Macbeth" in the search_keywords form field, I get only the images of "Keith Macbeth".
So what purpose does the "search constructor" serve?
-
Try this:
Add in search.php after
elseif (is_array($search_word_cache[$i])) {
this code
if ($search_terms) {
$operator = "and";
}
Jan
-
Cool, that fixed it.
-
Update:
If you want to make the "search_bar" search form also default to ALL words entered instead of ANY, you can add the following to the html form:
<input type="hidden" name="search_terms" value="all" />
or you can open search.php, look for
if (isset($HTTP_POST_VARS['search_terms'])) {
$search_terms = (trim($HTTP_POST_VARS['search_terms']) == "all") ? 1 : 0;
}
else {
$search_terms = 0;
}
and change this line
$search_terms = 1; // Makes default search use ALL terms entered
}