I would like to modify the search box to point to a custom search function. So far, I have modified template.php to detect when the search box is being called from a specific module and I reset some variables.
function my_theme_preprocess_search_block_form(&$vars, $hook) {
$uri = request_uri();
if (preg_match("/\/my_module/", $uri)) {
unset($vars["form"]["search_block_form"]["#title"]);
$vars["form"]["search_block_form"]["#title"] = t("SOME SEARCH MESSAGE");
$vars["form"]["search_block_form"]["#value"] = t("SOME SEARCH TERM");
}
}
That works fine. But now what I want to do is have that form submit to some module of my own creation. Oddly, this isn't as obvious. Do I need to modify something in modules/search/ ? If so, what?