Thread: Private Messages Enhancements - User PM Search
View Single Post
  #217  
Old 05-27-2008, 03:03 AM
markp_2000 markp_2000 is offline
 
Join Date: Jul 2006
Posts: 49
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Using
Quote:
Originally Posted by Mark.B View Post
This is how I made 1.0.2 work in 3.7.0, I have no idea about 2.0.0 though.

In template pm_messagelist, find:
Code:
input type="text" class="bginput" name="query" size="35" value="$query" style="width:250px" />
Add below:
Code:
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
Then find:
Code:
<input type="text" class="bginput" name="searchuser" id="userfield_txt" size="35"  value="$searchuser" style="width:250px" autocomplete="off" />
Add below:
Code:
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
Something similar should fix 2.0.0 also, but I haven't tried.
Here is the correct paste after code in the pm_messagelist. Remember this is the 1.0.2 version.

Code:
<!-- PM Search --> 


<form action="private.php?folderid=$search_folderid" method="post">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<thead>
	<tr>
		<td class="tcat">
			<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('pmsearch')"><img id="collapseimg_pmsearch" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_pmsearch].gif" alt="" border="0" /></a>
			$vbphrase[private_message_search]
		</td>
	</tr>
</thead>
<tbody id="collapseobj_pmsearch" style="$vbcollapse[collapseobj_pmsearch]">
	<tr>
		<td class="panelsurround" align="center">
		<div class="panel">
				<table 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>
                                                <input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
					</td>
				</tr>
				<if condition="!$show['searchthread']">
				<tr>
					<td>		
						<select name="titleonly">
							<option value="0" $titleonlyselected[0]>$vbphrase[search_entire_pms]</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" autocomplete="off" />
                                                        <input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
						</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="toby">
							<option value="0" $starteronlyselected[0]>$vbphrase[find_pms_by_user]</option>
							<option value="1" $starteronlyselected[1]>$vbphrase[find_pms_to_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>
	</table>
			
		</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" />
	</div>
		</td>
	</tr>
</tbody>
</table>
</form>

<if condition="$showsearch">
<br />
<form action="private.php?do=managepm&amp;folderid=$folderid" method="post">
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="do" value="managepm" />
<input type="hidden" name="folderid" value="$folderid" />
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<thead>
	<tr>
		<td class="tcat" colspan="4" style="padding: $stylevar[cellpadding]px 0 $stylevar[cellpadding]px $stylevar[cellpadding]px">
			<span class="smallfont" style="float:$stylevar[right]">
				<label for="checkall_all">
				$vbphrase[number_of_search_results]: <strong>$search_totalmessages</strong>
				<if condition="$search_totalmessages > 0"><input type="checkbox" name="allbox" id="checkall_all" title="$vbphrase[check_uncheck_all]" onclick="js_check_all(this.form)" /></if>
				</label>			
			</span>
			$vbphrase[search_results_in_folder]<span class="normal">: $foldername</span>			
		</td>
	</tr>
</thead>

<if condition="$search_totalmessages == 0">
<tbody>
	<tr>
		<td class="alt1">
			$vbphrase[no_search_results]
		</td>
	</tr>
</tbody>
</if>

<if condition="$errors">
<tbody>
	<tr>
		<td class="alt1">
			$displayCommon		</td>
	</tr>
</tbody>
</if>

<if condition="$search_totalmessages > 0">$searchresults

<tbody>
	<tr>
		<td class="tfoot" align="$stylevar[right]" colspan="4">			
			<div class="smallfont">
				$vbphrase[selected_messages]:
				<select name="dowhat">
					<if condition="$show['movetofolder']"><option value="move">$vbphrase[move_to_folder]...</option></if>
					<option value="delete">$vbphrase[delete]</option>
					<option value="read">$vbphrase[mark_as_read]</option>
					<option value="unread">$vbphrase[mark_as_unread]</option>
					<option value="xml">$vbphrase[download_as_xml]</option>
					<option value="csv">$vbphrase[download_as_csv]</option>
					<option value="txt">$vbphrase[download_as_text]</option>
				</select>
				<input type="submit" class="button" value="$vbphrase[go]" />
			</div>		
		</td>
	</tr>
</tbody>
</if>
</table>
</form>
</if>

<br />
<!-- PM Search end -->
Mark
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01553 seconds
  • Memory Usage 1,816KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • 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
  • showpost_complete