default search type: "everything" to "threads and posts"

wtgw

Member
Can I change the default search type to "threads and posts" instead of everything? Also to have "Display results as threads" checked by default?
 
You can change the Advanced search link in the search menu by editing this template:

Admin CP -> Appearance -> Templates -> search_bar

Replace this:

Code:
<a href="{xen:link search}" class="advSearchLink">{xen:phrase advanced_search}...</a>

with this:

Code:
<a href="{xen:link search, '', 'type=post'}" class="advSearchLink">{xen:phrase advanced_search}...</a>

Now it will link to the Search Threads and Posts page instead of Search Everything.

You can enable Display results as threads by default by editing this template:

Admin CP -> Appearance -> Templates -> search_form_post

Replace this:

Code:
	<dl class="ctrlUnit">
		<dt></dt>
		<dd><label for="ctrl_group_discussion"><input type="checkbox" name="group_discussion" id="ctrl_group_discussion" value="1"{xen:checked '{$search.group_discussion}'} /> {xen:phrase display_results_as_threads}</label></dd>
	</dl>

with this:

Code:
	<dl class="ctrlUnit">
		<dt></dt>
		<dd><label for="ctrl_group_discussion"><input type="checkbox" name="group_discussion" id="ctrl_group_discussion" value="1" checked="checked" /> {xen:phrase display_results_as_threads}</label></dd>
	</dl>

Now that box will be checked on the Advanced search page by default.
 
Top Bottom