Some of us prefer the functionality of the Simple Search that is on the list pages over the keyword search from the Advanced Search Module. So here is how to make a module with the functionality of the Simple Search.
Navigate to one of your list pages and view the source code (Ctrl+U). Find the Simple Search code. Should look something like this:
<!-- BEGIN SEARCH CONTROLS -->
<div class="jr_listSearch">
<form name="jr_simpleSearchForm" action="" method="post">
<input size="20" type="text" name="data[keywords]" class="jrText" value="Search" onblur="if(this.value=='') this.value='Search';" onfocus="if(this.value=='Search') this.value='';" />
<button onclick="jQuery(this).parents('form:eq(0)').attr('action',s2AjaxUri).submit();" class="jrButton">Buscar</button>
<a href="http://yourdomain.com/your-advanced-search-menu-url" >Advanced Search</a> <input type="hidden" name="data[simple_search]" value="1" />
<input type="hidden" name="data[dir]" value="2" />
<input type="hidden" name="data[controller]" value="search" />
<input type="hidden" name="data[action]" value="_process" />
<input type="hidden" name="data[menu_id]" value="232" />
<input type="hidden" name="data[cat]" value="" />
</form>
</div>
<!-- END SEARCH CONTROLS -->
Copy and paste this code into a Custom HTML Module.
You might have to tweak the HTML a bit to get the layout how you want it, depending on your template and where you are inserting the module.
That's it!
Notes:
Most likely, all of the parameters below will already be set according to your search preferences you set in JReviews Configuration, 'Search' tab. But I include them here for clarification.
This code limits results to a specific directory:
<input type="hidden" name="data[dir]" value="2" />
This code limits results to the current category:
<input type="hidden" name="data[cat]" value="" />
Erase both of those lines to search across all listings, or change the values to limit results to the directory/category IDs you desire.
You might have to paste the URL of one of your Advanced Search Menus here:
<a href="http://yourdomain.com/your-advanced-search-menu-url" >Advanced Search</a>
Here you have to input the ID of the menu you want to use on the results page, or leave the value blank to use the current page menu ID:
<input type="hidden" name="data[menu_id]" value="232" />
You can change the code in /jreviews/controllers/categories_controller.php, function search if you want to show results that include one or more of multiple keyword searches, instead of only showing results containing the entire text string.
WARNING: these results are not ordered by relevance, so changing this code will likely result in very broad search results on most sites.
Change:
$simplesearch_query_type = 'all'; // any|all
to:
$simplesearch_query_type = 'any'; // any|all