The site I’m building requires two ways to filter results—by category and by keyword search. Users should be able to use either or both methods. Unfortunately EE’s search module requires keywords in order to run. If not keywords are supplied then we get this error: “You did not submit a search term”.
It’s the result of this block of code in the search module:
/** ----------------------------------------
/** Did the user submit any keywords?
/** ----------------------------------------*/
// We only require a keyword if the member name field is blank
if ( ! isset($_GET['mbr']) OR ! is_numeric($_GET['mbr']))
{
if ( ! isset($_POST['member_name']) OR $_POST['member_name'] == '')
{
if ( ! isset($_POST['keywords']) OR $_POST['keywords'] == "")
{
return $this->EE->output->show_user_error('general', array($this->EE->lang->line('search_no_keywords')));
}
}
}I’m reluctant to mess around in here too much—there must be a supported way of searching just on categories, right?