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 ;)
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 ;)