View Full Version : profile search (zip code)


Snake
February 14th, 2009, 03:21 PM
It would be great if this site had a profile search so someone could look up members that are within a specified miliage from you. The map is great but it only has those members that put themselves there. I would like to ride with members in my area.

Thank you.

Alex
February 14th, 2009, 05:40 PM
Hi Rick -

I think the Member Map is going to be the only place to do what you're asking for the foreseeable future. The problem with trying to implement an automated profile search is that not everyone puts in a standard location. Some people put West coast. Some people put SF Bay Area. Some just put a town. Some put a state. Some put both. Look at even yours, for example, where you listed a town and state, but spelled out the full state rather than using the abbreviation.

If I forced people to enter in a fixed piece of data like a zipcode, it would become more feasible, but I don't want to force people to do that; many would feel like it was too intrusive (and likely enter in "12345" or "00000" if I truly required to field to be filed in).

While the member map isn't perfect, it does a reasonable job at letting those who want to be found be found by others looking for them. Thanks for the suggestion.

- Alex

Snake
February 15th, 2009, 08:40 AM
Hi Alex,
One last suggestion and I will let this issue go. What if you put in an optional field for the members zip code.

Thanks again.

By the way, I have found this 250 Ninja site much more friendly then the others. The members and the Admin here do not slam other members for asking "stupid" or repeating questions that may have been covered previously.

Alex
February 15th, 2009, 01:17 PM
Hi Rick -

I added it as an optional field. I don't expect to be able to add geo-searching (finding how many members are within X miles of you); that would require some custom coding on top of the vbulletin search engine. But, you can go into the member list (from the Community menu), hit search, then advanced search, and you can search on partial zip codes. So if your zip is 24356, you can search for 2435, 243, or even 24 to bring up possible nearby Ninjette folks. Right now it looks like it matches throughout the string, so searching for 243 would bring back 00243 & 92436 as well, but it's a start.

- Alex

kkim
February 15th, 2009, 01:21 PM
where is said field so present members can go fill it in?

Alex
February 15th, 2009, 01:38 PM
It's in the "edit details" section of the User CP:

http://www.ninjette.org/forums/profile.php?do=editprofile

Scroll down. I don't like the location at the bottom, but it needs to be there as it's not a required field; the box at the top are all required (that's how vbulletin groups things on that page). I don't want to publicize this yet as I'm working on disallowing advanced member list searching from unregistered users. Won't affect users here, but I don't want to allow guests to easily search by zip code. Yes, they could set up an account and do the same, but at the very least they'd need to have a confirmed email address at that point.

Alex
February 15th, 2009, 02:39 PM
OK -

The member list searching is OK at this point, so everything's up and running. Only thing to keep in mind is that at the moment a partial zip code search may still pick up some unintended hits, as described a few posts up in this same thread.

Snake
February 15th, 2009, 02:54 PM
Thanks I just added my zip code to my profile.

Alex
February 15th, 2009, 04:00 PM
OK -

Fixed the search process. Now if you search on "950", you'll get results for 95011, 95022, 95055, etc. But you won't get 09500, 00950, etc. So you can search for people further and further away, by using the entire zip, just the first 4, just the first 3, just the first 2, or even just the first digit. Kelly and I are both in 9xxxx. :-)

Alex
February 16th, 2009, 03:16 PM
Changed the zip code field to be required at registration, as well as during profile updating. This puts it up at the top right by the Location field, so it won't be missed. Also removed the default "00000" in the field, so people will have to type that if they want. When registering for the first time, or whenever they update their profile, it will now require that field to have a 5-digit number in it or they cannot continue.

I'll leave this up for awhile, and the zip codes will slowly be filled in as people go to their profiles. At some point I can flip it to mandatory, then users won't be able to do or see anything on the board until they enter something in for that field, and we'll quickly get to 100% compliance. I'm starting to like this, as right now there's no way to make sure that people enter themselves on the member map. This way they will eventually have to make a conscious decision *not* to enter their zip code (by entering 00000).

I do still need to work on the search coding. I'm unhappy that right now it required a custom modification to the member.php file to get it to work; I hope to find a way to have the same functionality with a plug-in rather than custom code. A plug-in will make future board upgrades much easier to deal with.

Alex
May 8th, 2009, 09:50 AM
I've had to pull the custom code for the moment, I found a bug that was affecting other areas of the memberlist. Right now you can still search for any complete zipcode, but the partial zipcode searching isn't functional. I hope to get this back up and running (and bugfree) soon.