The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Sort Users By State
|
#2
|
||||
|
||||
bump
|
#3
|
||||
|
||||
bump
|
#4
|
||||
|
||||
I just did this tonight. I'm sure it's not the cleanest way to do things, but it works for me. Screenshot attached.
All I did was copy the advanced search code for "search by state" and put it at the top of my Member List so people could search it more easily. 1. Create a new "User Profile Field" named State. Make it a "single selection menu" field and add in all your states. (See a list of US states at the bottom of this post to copy and paste) Be sure to also set "Field Searchable on Members List" to "yes". 2. Note what field # your new State field is. (ie. mine was field10) 3. Edit your "memberlist" template. Below this code: Code:
<body> $header $navbar Code:
<form action="memberlist.php" method="post"> <input type="hidden" name="s" value="" /> <input type="hidden" name="do" value="getall" /> Search Members by State: <select name="field10" id="csel_field10"><option value="0" selected="selected"></option> <option value="1" >AL</option><option value="2" >AK</option><option value="3" >AZ</option><option value="4" >AR</option><option value="5" >CA</option><option value="6" >CO</option><option value="7" >CT</option><option value="8" >DE</option><option value="9" >DC</option><option value="10" >FL</option><option value="11" >GA</option><option value="12" >HI</option><option value="13" >ID</option><option value="14" >IL</option><option value="15" >IN</option><option value="16" >IA</option><option value="17" >KS</option><option value="18" >KY</option><option value="19" >LA</option><option value="20" >ME</option><option value="21" >MD</option><option value="22" >MA</option><option value="23" >MI</option><option value="24" >MN</option><option value="25" >MS</option><option value="26" >MO</option><option value="27" >MT</option><option value="28" >NE</option><option value="29" >NV</option><option value="30" >NH</option><option value="31" >NJ</option><option value="32" >NM</option><option value="33" >NY</option><option value="34" >NC</option><option value="35" >ND</option><option value="36" >OH</option><option value="37" >OK</option><option value="38" >OR</option><option value="39" >PA</option><option value="40" >RI</option><option value="41" >SC</option><option value="42" >SD</option><option value="43" >TN</option><option value="44" >TX</option><option value="45" >UT</option><option value="46" >VT</option><option value="47" >VA</option><option value="48" >WA</option><option value="49" >WV</option><option value="50" >WI</option><option value="51" >WY</option></select> <input type="submit" class="button" value="Search" accesskey="s" /> </form> Here's is a list of US states to copy and paste. Code:
AL AK AZ AR CA CO CT DE DC FL GA HI ID IL IN IA KS KY LA ME MD MA MI MN MS MO MT NE NV NH NJ NM NY NC ND OH OK OR PA RI SC SD TN TX UT VT VA WA WV WI WY |
#5
|
||||
|
||||
is there any way to base it off zip code? Many already have that in the profile for weather data, etc..............
|
#6
|
|||
|
|||
When I tried to enter this vBulletin gave me this message
Quote:
Also, if I add this new profile field as "required" what would happen to the existing members on the foruM? |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|