The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
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> </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> Thanks a lot John |
#2
|
||||
|
||||
You could mabe set it up somewhat similar to your other search. Have 1 text box, that searches just the username, and when someone clicks advanced, they get all the advanced options.
|
#3
|
|||
|
|||
Thanks Paul.
Would you be willing to share your code? I'm looking to do this but I'm looking to add a few fields to the search. I don't know how to add custom fields to the search. Seems to be a lot of people interested in this but I haven't been able to see code for it anywhere. |
#4
|
||||
|
||||
Well I can just come up with the template code to add the member search in ur sidebar... with an advanced link to the actual advanced member search page. As far as adding custom fields.. I'm not sure if you need to do that? Mine show up fine in my advanced page...maybe edit the custom field and make sure it says "Field Searchable on Members List"
|
#5
|
|||
|
|||
Hey Paul,
Thanks for the help I am using it on a poker forum to let members search for other users that are in their country, its for a forum just for the UK and Ireland so having the custom fields for region, gender and age would really help and be used a lot. Is your site private Paul or could I take a look at it? Thanks again |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|