Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
  #1  
Old 01-12-2009, 12:45 PM
zero5854 zero5854 is offline
 
Join Date: Oct 2008
Posts: 129
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default change default search option?

Is there a way to change the search option in Advanced search from

"Search Entire Posts" TO "Search Titles Only" ?? see att below...THANKS!

Reply With Quote
  #2  
Old 01-13-2009, 05:24 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Edit the search template, if you could post that up, I'm sure we could help.
Reply With Quote
  #3  
Old 01-13-2009, 11:38 PM
zero5854 zero5854 is offline
 
Join Date: Oct 2008
Posts: 129
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok here it is...thanks !!

Code:
$stylevar[htmldoctype]
<html xmlns="http://www.w3.org/1999/xhtml" dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
$headinclude
<title>$vboptions[bbtitle] - <if condition="$show['searchthread']">$vbphrase[search_thread]<else />$vbphrase[search_forums]</if></title>
$tag_cloud_headinclude
</head>

<body>
$header
$navbar

<if condition="$show['errors']">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
	<td class="tcat">
			$vbphrase[errors_occured_with_search]:
	</td>
</tr>
<tr>
	<td class="alt1">
			<ol>$errorlist</ol>
	</td>
</tr>
</table>

<br />
</if>

<form action="search.php?do=process" method="post" name="vbform" id="searchform" style="display:block; margin:0px">
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
<input type="hidden" name="do" value="process" />
<input type="hidden" name="searchthreadid" value="$searchthreadid" />

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
	<td class="tcat">
		<if condition="$show['searchthread']">$vbphrase[search_thread] - <a href="showthread.php?$session[sessionurl]t=$threadinfo[threadid]">$threadinfo[title]</a><else />$vbphrase[search_forums]</if>
	</td>
</tr>
<tr>
	<td class="panelsurround" align="center">

	<table class="panel" cellpadding="0" cellspacing="$stylevar[formspacer]" border="0" width="100%">
	<tr>
		<td align="$stylevar[left]" valign="top" width="50%">
			<fieldset class="fieldset" style="margin:0px">
				<legend>$vbphrase[search_by_key_word]</legend>
				<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
				<tr>
					<td colspan="2">
						<div>$vbphrase[key_words]:</div>
						<div><input type="text" class="bginput" name="query" size="35" value="$query" style="width:250px" /></div>
					</td>
				</tr>
				<if condition="!$show['searchthread']">
				<tr>
					<td>
						<select name="titleonly">
							<option value="0" $titleonlyselected[0]>$vbphrase[search_entire_posts]</option>
							<option value="1" $titleonlyselected[1]>$vbphrase[search_titles_only]</option>
						</select><if condition="$show['nocache']"> <label for="cb_nocache"><input type="checkbox" name="nocache" value="1" id="cb_nocache" />$vbphrase[do_not_use_cached_results]</label></if>
					</td>
				</tr>
				</if>
				</table>
			</fieldset>
		</td>
		<td align="$stylevar[left]" valign="top" width="50%">
			<fieldset class="fieldset" style="margin:0px">
				<legend>$vbphrase[search_by_user_name]</legend>
				<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
				<tr>
					<td colspan="2">
						<div>$vbphrase[username]:</div>
						<div id="userfield">
							<input type="text" class="bginput" name="searchuser" id="userfield_txt" size="35"  value="$searchuser" style="width:250px" />
						</div>
						<if condition="$show['searchthread']">
							<div>
								<label for="cb_exactname"><input type="checkbox" name="exactname" value="1" id="cb_exactname" $exactnamechecked[1] />$vbphrase[exact_name]</label>
							</div>
						</if>
						<if condition="$show['popups']">
							<div id="userfield_menu" class="vbmenu_popup" style="display:none"></div>
							<script type="text/javascript" src="clientscript/vbulletin_ajax_namesugg.js?v=$vboptions[simpleversion]"></script>
							<script type="text/javascript">
							<!--
							vbmenu_register('userfield', true);
							snc = new vB_AJAX_NameSuggest('snc', 'userfield_txt', 'userfield');
							//-->
							</script>
						</if>
					</td>
				</tr>
				<if condition="!$show['searchthread']">
				<tr>
					<td>
						<select name="starteronly">
							<option value="0" $starteronlyselected[0]>$vbphrase[find_posts_by_user]</option>
							<option value="1" $starteronlyselected[1]>$vbphrase[find_threads_started_by_user]</option>
						</select>
					</td>
					<td><label for="cb_exactname"><input type="checkbox" name="exactname" value="1" id="cb_exactname" $exactnamechecked[1] />$vbphrase[exact_name]</label></td>
				</tr>
				</if>
				</table>
			</fieldset>

		</td>
	</tr>
	<if condition="$human_verify">
	<tr>
		<td align="$stylevar[left]" valign="top" colspan="2">$human_verify</td>
	</tr>
	</if>
	</table>

	<div align="$stylevar[left]">

	<div class="thead" style="padding:$stylevar[cellpadding]px">
		<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('search_adv')"><img id="collapseimg_search_adv" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_search_adv].gif" alt="" border="0" /></a>
		$vbphrase[search_options]
	</div>

	<div id="collapseobj_search_adv" style="$vbcollapse[collapseobj_search_adv]">
	<table class="panel" cellpadding="0" cellspacing="$stylevar[formspacer]" border="0" width="100%">
	<tr valign="top">
		<td width="50%">
			<if condition="!$show['searchthread']">
			<if condition="$prefix_options">
			<fieldset class="fieldset">
				<legend>$vbphrase[find_threads_with_prefix]</legend>
				<div style="padding:$stylevar[formspacer]px">
					<div>
						<select style="<if condition="is_browser('mozilla')">min-width:250px<else />width:100%</if>" name="prefixchoice[]" size="5" multiple="multiple">
							<option value=""$prefix_selected[any]>$vbphrase[any_prefix_meta]</option>
							<option value="-1"$prefix_selected[none]>$vbphrase[no_prefix_meta]</option>
							$prefix_options
						</select>
					</div>
				</div>
			</fieldset>
			</if>

			<fieldset class="fieldset">
				<legend>$vbphrase[find_threads_with]</legend>
				<div style="padding:$stylevar[formspacer]px">
					<select name="replyless" style="width:150px">
						<option value="0" $replylessselected[0]>$vbphrase[at_least]</option>
						<option value="1" $replylessselected[1]>$vbphrase[at_most]</option>
					</select>
					<input type="text" class="bginput" style="font-size:11px" name="replylimit" size="3" value="$replylimit" /> $vbphrase[replies]
				</div>
			</fieldset>
			</if>

			<fieldset class="fieldset">
				<legend>$vbphrase[find_posts_from]</legend>
				<div style="padding:$stylevar[formspacer]px">
					<select name="searchdate" style="width:150px">
						<option value="0" $searchdateselected[0]>$vbphrase[any_date]</option>
						<option value="lastvisit" $searchdateselected[lastvisit]>$vbphrase[your_last_visit]</option>
						<option value="1" $searchdateselected[1]>$vbphrase[yesterday]</option>
						<option value="7" $searchdateselected[7]>$vbphrase[a_week_ago]</option>
						<option value="14" $searchdateselected[14]><phrase 1="2">$vbphrase[x_weeks_ago]</phrase></option>
						<option value="30" $searchdateselected[30]>$vbphrase[a_month_ago]</option>
						<option value="90" $searchdateselected[90]><phrase 1="3">$vbphrase[x_months_ago]</phrase></option>
						<option value="180" $searchdateselected[180]><phrase 1="6">$vbphrase[x_months_ago]</phrase></option>
						<option value="365" $searchdateselected[365]>$vbphrase[a_year_ago]</option>
					</select>
					<select name="beforeafter">
						<option value="after" $beforeafterselected[after]>$vbphrase[and_newer]</option>
						<option value="before" $beforeafterselected[before]>$vbphrase[and_older]</option>
					</select>
				</div>
			</fieldset>

			<if condition="!$show['searchthread']">
			<fieldset class="fieldset">
				<legend>$vbphrase[sort_results_by]</legend>
				<div style="padding:$stylevar[formspacer]px">
					<select name="sortby" style="width:150px">
						<option value="rank" $sortbyselected[rank]>$vbphrase[relevancy]</option>
						<option value="title" $sortbyselected[title]>$vbphrase[title]</option>
						<option value="replycount" $sortbyselected[replycount]>$vbphrase[number_of_replies]</option>
						<option value="views" $sortbyselected[views]>$vbphrase[number_of_views]</option>
						<option value="threadstart" $sortbyselected[threadstart]>$vbphrase[thread_start_date]</option>
						<option value="lastpost" $sortbyselected[lastpost]>$vbphrase[last_posting_date]</option>
						<option value="postusername" $sortbyselected[postusername]>$vbphrase[username]</option>
						<option value="forum" $sortbyselected[forum]>$vbphrase[forum]</option>
					</select>
					<select name="order">
						<option value="descending" $sortorderselected[descending]>$vbphrase[in_descending_order]</option>
						<option value="ascending" $sortorderselected[ascending]>$vbphrase[in_ascending_order]</option>
					</select>
				</div>
			</fieldset>

			<fieldset class="fieldset">
				<legend>$vbphrase[show_results_as]</legend>
				<div style="padding:$stylevar[formspacer]px">
					<label for="rb_showposts_0"><input type="radio" name="showposts" value="0" id="rb_showposts_0" $showpostschecked[0] />$vbphrase[threads]</label>
					<label for="rb_showposts_1"><input type="radio" name="showposts" value="1" id="rb_showposts_1" $showpostschecked[1] />$vbphrase[posts]</label>
				</div>
			</fieldset>
			</if>
		</td>
		<if condition="!$show['searchthread']">
		<td width="50%">
			<if condition="$show['tag_option']">
			<fieldset class="fieldset">
				<legend>$vbphrase[search_by_tag]</legend>
				<div style="padding:$stylevar[formspacer]px">
					<div>$vbphrase[tag]:</div>
					<div id="tag_add"><input type="text" class="bginput" name="tag" id="tag_add_input" size="35" value="$formdata[tag]" style="width:250px" /></div>

					<if condition="$show['popups']">
						<div id="tag_add_menu" class="vbmenu_popup" style="display:none"></div>
						<script type="text/javascript" src="clientscript/vbulletin_ajax_tagsugg.js?v=$vboptions[simpleversion]"></script>
						<script type="text/javascript">
						<!--
						vbmenu_register('tag_add', true);
						tag_add_comp = new vB_AJAX_TagSuggest('tag_add_comp', 'tag_add_input', 'tag_add');
						//-->
						</script>
					</if>
				</div>
			</fieldset>
			</if>

			<fieldset class="fieldset" style="margin:0px">
				<legend>$vbphrase[search_in_forums]</legend>
				<div style="padding:$stylevar[formspacer]px">
					<div>
						<select style="width:100%" name="forumchoice[]" size="13" multiple="multiple">
							<option value="0" $noforumselected>$vbphrase[search_all_open_forums]</option>
							<option value="subscribed">$vbphrase[search_subscribed_forums]</option>
							$searchforumbits
						</select>
					</div>
					<div><label for="cb_childforums"><input type="checkbox" name="childforums" value="1" id="cb_childforums" $childforumschecked[1] />$vbphrase[also_search_in_child_forums]</label></div>
					<if condition="$show['cantsearchposts']">$vbphrase[you_can_only_search_thread_titles]</if>
				</div>
			</fieldset>
		</td>
		</if>
	</tr>
	</table>
	</div>

	</div>

	<div style="margin-top:$stylevar[cellpadding]px">
		<input type="submit" class="button" name="dosearch" value="$vbphrase[search_now]" accesskey="s" />
		<input type="reset" class="button" value="$vbphrase[reset_fields]" accesskey="r" onclick="window.location='search.php?$session[sessionurl]type=advanced';" />
	</div>
	</td>
</tr>
</table>

<if condition="$show['member']">
	<div align="center" style="margin-top:20px">
		<select name="saveprefs">
			<option value="1" selected="selected">$vbphrase[save_search_preferences]</option>
			<option value="0">$vbphrase[clear_search_preferences]</option>
		</select>
		<input type="submit" class="button" name="doprefs" value="$vbphrase[go]" id="save_searchprefs" />
		<input type="image" src="$vboptions[cleargifurl]" style="width: 1px; height: 1px;" />
		<script type="text/javascript" src="clientscript/vbulletin_ajax_search.js?v=$vboptions[simpleversion]"></script>
		<script type="text/javascript">

		<!--
		vB_AJAX_SearchPrefs_Init('save_searchprefs');
		//-->

		</script>
	</div>
</if>

</form>

<if condition="$tag_cloud">
	<div style="margin-top:20px">$tag_cloud</div>
</if>

$footer

</body>
</html>
EDIT NVM I FOUND IT! I had to swith the true false values. IE : sitch the 1's to 0's and the 0's to 1's in ther to options

EDIT#2
OR NOT! all it did was change it to SAY "search titles only" but it actually doesnt after testing..
Reply With Quote
  #4  
Old 01-14-2009, 03:42 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Find:
HTML Code:
<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 With:
HTML Code:
<select name="titleonly">
	<option value="0">$vbphrase[search_entire_posts]</option>
	<option value="1" selected="selected">$vbphrase[search_titles_only]</option>
</select>
Reply With Quote
  #5  
Old 01-14-2009, 12:52 PM
zero5854 zero5854 is offline
 
Join Date: Oct 2008
Posts: 129
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

AWESOME it worked! Thanks so much!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:54 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03891 seconds
  • Memory Usage 2,224KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (2)bbcode_html
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete