PDA

View Full Version : Mini Mods - Auto Selecting Search Titles Only in Drop-Down Menu


crackers
02-22-2009, 10:00 PM
This small mod was 'prepared' for huge forums, which have problems with load. After install it, users can search only by Threads' Titles rule in a Drop-Down Menu. Users still can select 'Search Entire Posts' in Advanced Search Menu, of course. This mod decrease load over serveral % and also it doesn't change anything in a search form's appearance.


Open navbar template, search for:

<input type="hidden" name="do" value="process" />
<input type="hidden" name="quicksearch" value="1" />
<input type="hidden" name="childforums" value="1" />
<input type="hidden" name="exactname" value="1" />

Place BEFORE line with childforums:

<input type="hidden" name="titleonly" value="1" />



Open FORUMDISPLAY template, search for:

<input type="hidden" name="do" value="process" />
<input type="hidden" name="forumchoice[]" value="$forumid" />
<input type="hidden" name="childforums" value="1" />
<input type="hidden" name="exactname" value="1" />

Place BEFORE line with forumchoice[]:

<input type="hidden" name="titleonly" value="1" />



Moreover I recommend change default option in Advanced Search (Search Titles Only instead Search Entire Posts). You can do it by (Dismounted's solution):

Open search_forums template

Find:

<select name="titleonly">
<option value="0" $titleonlyselected[0]>$vbphrase[search_entire_posts]</option>
<option value="1" $titleonlyselected[1]>$vbphrase[search_titles_only]</option>
</select>

Replace for:

<select name="titleonly">
<option value="0">$vbphrase[search_entire_posts]</option>
<option value="1" selected="selected">$vbphrase[search_titles_only]</option>
</select>



Greetings ;)

lazydesis
02-23-2009, 04:55 PM
any screenshots? please

crackers
02-23-2009, 05:00 PM
This mod (...) doesn't change anything in a search form's appearance

So I think that screenshots aren't needed ;)

adhmwagde
02-24-2009, 11:36 AM
nothing happen :)

crackers
02-24-2009, 01:42 PM
You did something wrong, search should find words only in thread's titles by default after install. It works perfect for me.

wangyu1314
06-26-2012, 09:49 AM
thank you, this trouble me too long time.
It's fine.