Just a littel and simple MOD but it works and can be useful... (o:
Open the search.php
serach for:
$main_template = 'search';
replace with:
$mode = $HTTP_GET_VARS['mode'];
if ($mode==""){
$main_template = 'search';
} else {
$main_template = 'search_'.$mode;
}
search for:
$content = $site_template->parse_template("search_form");
replace with:
if ($mode==""){
$content = $site_template->parse_template("search_form");
} else {
$content = $site_template->parse_template("search_form_".$mode);
}
make a Copy of the seach_form.html and name it for Example seach_form_
colorsearch.html
And also make a Copy of the search.html and name it search_
colorsearch.html
Open the seach_form_
colorsearch.html
search for:
<form method="post" action="{url_search}">
replace with:
<form method="post" action="{url_search}?mode=colorsearch">
Now when you are call the Search like this /search.php?mode=
colorsearch the new search_
colorsearch.html & search_form_
colorsearch.html Template will be used... (o:
Now, for Example, you kann make a Dropdown like this one:
<select name="search_keywords" id="search_keywords">
<option value="red">red</option>
<option value="blue">blue</option>
<option value="black">black</option>
</select>
Open the search_form_
colorsearch.html and replace the search inputfield:
<input type="text" name="search_keywords" size="40" value="{search_keywords}" class="input" />
with the Dropdown.
Now call the /search.php?mode=
colorsearch and there is a Search where the User can only search for the three Colors in the Dropdown... (o:
Another Example:you will make a other search, that they can only search for the Words Animal, Building, Nature and Ocean...
make a Copy of the seach_form.html and name it for Example seach_form_
group.html
And also make a Copy of the search.html and name it search_
group.html
Open the seach_form_
group.html
search for:
<form method="post" action="{url_search}">
replace with:
<form method="post" action="{url_search}?mode=group">
Now when you are call the Search like this /search.php?mode=
group the new search_
group.html & search_form_
group.html Template will be used... (o:
Now, for Example, you kann make a Dropdown like this one:
<select name="search_keywords" id="search_keywords">
<option value="animal">animal</option>
<option value="building">building</option>
<option value="nature ">nature </option>
<option value="ocean">ocean</option>
</select>
Open the search_form_
group.html and replace the search inputfield:
<input type="text" name="search_keywords" size="40" value="{search_keywords}" class="input" />
with the Dropdown.
Now call the /search.php?mode=
group and there is a Search where the User can only search for the Keywords in the Dropdown... (o: