vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Sort Users By State (https://vborg.vbsupport.ru/showthread.php?t=67814)

joeychgo 07-31-2004 04:06 AM

Sort Users By State
 
Looking for something similar to this for 3.0

https://vborg.vbsupport.ru/showthrea...=user+location

joeychgo 08-01-2004 03:10 PM

bump

joeychgo 08-15-2004 09:01 PM

bump

oldford 08-21-2004 02:07 AM

1 Attachment(s)
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

Add this: (but be sure to change the field # to your correct #. See item 2 above)

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>

The above search code willl only work if you use the same exact list of states I did. If you modify it you'll need to modify the code accordingly. Or just view the source code of your "advanced search" page and steal the Search by State bit.


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


joeychgo 08-21-2004 05:38 AM

is there any way to base it off zip code? Many already have that in the profile for weather data, etc..............

shunx91 01-19-2006 11:33 PM

When I tried to enter this vBulletin gave me this message :(

Quote:

You may only specify up to 32 options for checkbox or select_multiple input types. You entered 51 options for this field.
Any idea how to fix this?

Also, if I add this new profile field as "required" what would happen to the existing members on the foruM?


All times are GMT. The time now is 05:45 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01738 seconds
  • Memory Usage 1,728KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete