View Single Post
  #1  
Old 01-04-2007, 12:50 PM
John Diver John Diver is offline
 
Join Date: Nov 2003
Posts: 329
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Getting member search to work in a sidebar on all pages

Hey,

I am trying to get the member search function to work in a side bar on all pages to let my users search for other members by custom profile fields.

This is the member search code

Code:
<form action="memberlist.php?do=getall" method="post">
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="do" value="getall" />

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
	<td class="tcat">$vbphrase[members_list] - $vbphrase[advanced_search]</td>
</tr>
<tr>
	<td class="panelsurround" align="center">
	<div class="panel">
		<div style="width:$stylevar[formwidth]" align="$stylevar[left]">
		
			<div style="margin-bottom:$stylevar[formspacer]px">
				$vbphrase[fields_on_form_optional]
			</div>
			
			<div class="fieldset">
				$vbphrase[username]
				<div id="userfield"><input type="text" class="bginput" id="userfield_txt" size="50" name="ausername" value="" /></div>
				<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>
			</div>
			
			<div class="fieldset">
				$vbphrase[home_page]<br />
				<input type="text" class="bginput" size="50" name="homepage" value="" />
			</div>
		
			$customfields
			
			<fieldset class="fieldset">
				<legend>$vbphrase[instant_messaging]</legend>
				<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
				<tr>
					<td>
						$vbphrase[icq_number]<br />
						<img src="$stylevar[imgdir_misc]/im_icq.gif" alt="" />
						<input type="text" class="bginput" size="25" name="icq" value="" dir="ltr" />
					</td>
					<td>
						$vbphrase[aim_screen_name]<br />
						<img src="$stylevar[imgdir_misc]/im_aim.gif" alt="" />
						<input type="text" class="bginput" size="25" name="aim" value="" dir="ltr" />
					</td>
				</tr>
				<tr>
					<td>
						$vbphrase[msn_messenger_handle]<br />
						<img src="$stylevar[imgdir_misc]/im_msn.gif" alt="" />
						<input type="text" class="bginput" size="25" name="msn" value="" dir="ltr" />
					</td>
					<td>
						$vbphrase[yahoo_messenger_handle]<br />
						<img src="$stylevar[imgdir_misc]/im_yahoo.gif" alt="" />
						<input type="text" class="bginput" size="25" name="yahoo" value="" dir="ltr" />
					</td>
				</tr>
				<tr>
					<td>
						$vbphrase[skype_name]<br />
						<img src="$stylevar[imgdir_misc]/im_skype.gif" alt="" />
						<input type="text" class="bginput" size="25" name="skype" value="" dir="ltr" />
					</td>
					<td>&nbsp;</td>
				</tr>
				</table>
			</fieldset>
			
			<fieldset class="fieldset">
				<legend>$vbphrase[post_count]</legend>
				<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
				<tr>
					<td>
						$vbphrase[is_greater_than_or_equal_to]<br />
						<input type="text" class="bginput" size="25" name="postslower" value="" />
					</td>
					<td>
						$vbphrase[is_less_than]<br />
						<input type="text" class="bginput" size="25" name="postsupper" value="" />
					</td>
				</tr>
				</table>
			</fieldset>
			
			<fieldset class="fieldset">
				<legend>$vbphrase[join_date]</legend>
				<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
				<tr>
					<td>
						$vbphrase[is_after]<br />
						<input type="text" class="bginput" size="25" name="joindateafter" value="" />
					</td>
					<td>
						$vbphrase[is_before]<br />
						<input type="text" class="bginput" size="25" name="joindatebefore" value="" />
					</td>
				</tr>
				<tr>
					<td colspan="2">$vbphrase[please_use_format]</td>
				</tr>
				</table>
			</fieldset>
			
			<fieldset class="fieldset">
				<legend>$vbphrase[last_post]</legend>
				<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
				<tr>
					<td>
						$vbphrase[is_after]<br />
						<input type="text" class="bginput" size="25" name="lastpostafter" value="" />
					</td>
					<td>
						$vbphrase[is_before]<br />
						<input type="text" class="bginput" size="25" name="lastpostbefore" value="" />
					</td>
				</tr>
				<tr>
					<td colspan="2">$vbphrase[please_use_format_yyyymmdd_hhmmss]</td>
				</tr>
				</table>
			</fieldset>
			
		</div>
	</div>
	
	<div class="thead" style="padding:$stylevar[cellpadding]px">$vbphrase[options]</div>
	
	<div class="panel" align="center">
		<div style="width:$stylevar[formwidth]" align="$stylevar[left]">
			
			<fieldset class="fieldset">
				<legend>$vbphrase[options]</legend>
				<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
				<tr>
					<td>
						$vbphrase[order_results_by]<br />
						<select name="sort">
							<option value="username" selected="selected">$vbphrase[username]</option>
							<option value="joindate">$vbphrase[join_date]</option>
							<option value="posts">$vbphrase[post_count]</option>
							<option value="lastvisit">$vbphrase[last_visit]</option>
							<if condition="$vboptions['reputationenable']">
							<option value="reputation">$vbphrase[reputation]</option>
							</if>
						</select>
						<select name="order">
							<option value="">$vbphrase[in_ascending_order]</option>
							<option value="DESC">$vbphrase[in_descending_order]</option>
						</select>
					</td>
				</tr>
				<tr>
					<td>
						$vbphrase[number_of_users_perpage]<br />
						<input type="text" class="bginput" size="25" name="pp" value="$vboptions[memberlistperpage]" />
					</td>
				</tr>
				</table>
			</fieldset>
			
		</div>
	</div>
	
	<div style="margin-top:$stylevar[cellpadding]px">
		<input type="submit" class="button" value="$vbphrase[search_now]" accesskey="s" />
		<input type="reset" class="button" value="$vbphrase[reset_fields]" />
	</div>
	</td>
</tr>
</table>

</form>
I have the normal search on the sidebar but not sure how the member search will work.

Thanks a lot
John
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01067 seconds
  • Memory Usage 1,815KB
  • 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
  • (1)bbcode_code
  • (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