PhotoPost Community

PhotoPost Community (http://www.photopost.com/forum/)
-   Classifieds Bug Reports (http://www.photopost.com/forum/classifieds-bug-reports/)
-   -   Sort by distance rather than zipcode?! (http://www.photopost.com/forum/classifieds-bug-reports/140922-sort-distance-rather-than-zipcode.html)

jammy_basturd October 11th, 2009 06:25 AM

Sort by distance rather than zipcode?!
 
Sorting adverts in a category by zipcode might make more sense in America, I'm not sure, I don't know how the American zipcode works, but it seems sorting by zipcode is useless, and that sorting by the distance would be far more helpful.

Possible?

Chuck S October 11th, 2009 07:08 AM

No easy way off the top of my head to do that. A sort is done on a field in the same table as the information is held. Distance is calculated for each individual result when the query is being printed after the sort by other queries.

jammy_basturd October 20th, 2009 08:19 AM

So the sort by zipcode is pretty much useless?

Chuck S October 20th, 2009 08:30 AM

well accordingly to you I guess. I dont think so but thats just me.

CavySpirit November 16th, 2009 02:10 PM

If only classifieds would sort by distance, I would come back to using this app. It is an absolute requirement for me.

What can we do as users to get this into the app? I did it myself one time a few years ago on this application but of course had to abandon it because of the upgrade process. But, it's definitely do-able--by revisiting the code structure of the sorting and making sure that lat and long are in the record.

Is it possible to fund the development? Perhaps those of us who need it could kick in to get it done? This one capability is so vitally important. A zip code sort really is useless. I need to be able to provide a list of items sorted by "distance from me." This feature is a big deal for many locally-driven sites--which is a HUGE market.

Please let us know what it would take to get this added. OR are there hooks enough in the current version to allow a third-party add-on? I don't know. Thanks for your consideration.

Chuck S November 16th, 2009 04:08 PM

well if you remember what you did let me know. The only sorts I know of off hand is mysql fields sorting by those.

CavySpirit November 16th, 2009 05:06 PM

I no longer have the site where I had the distance sorted. It was quite a while ago. And I had so many hacks added to the site (my early web days) that it was woefully out of date before I ever launched it, so gave up! (edit to add: I think I had stored the information in related arrays and used those to sort, which meant a fair amount of hacking of core code.)

But I do have this site still--which is ancient and buggy and on the block for an overhaul:

Guinea Pig Home Listings - Adoptables

It's an OLD version of classifieds and a very hacked vB to accommodate my needs.

In this site, I use the LAT/LON fields to get the distance and display it and I allow the user to limit the search to "X" miles or KMs from their location. So, it sort of works, but not really well enough (lists the distance but doesn't sort). Plus it's buggy (my issues) and I can't upgrade it.

I was planning on ditching the vB/PP solution for Joomla/SOBI2 because there is a SOBI2 addon that does a distance search. But, I really don't want to go that route. I did do an initial install of the solution for a different site (with the same basic needs) and while the distance search is fine, it's just too much work to get the overall look and other functionality I need.

But as you can see, here is a perfect example of a need for "Distance from Me" and not just for the US. It's about getting animals adopted out. People don't like to travel very far AND they can be lazy. You have to make it as easy as possible for them. It's just one example--and to me, it's about saving lives, so it's very important.

To me, a viable solution needs to be international, which I think means using a Google API to get Lat and Lon on both the permanent address of the listing and the reader's location and going from there. Relying on a zip code database is too limiting.

There are other internet apps out there that do provide 'distance from me' searches. If it would help to track some of those down for analysis and feasibility, I'm more than happy to help.

benFF November 16th, 2009 06:37 PM

If Classifieds search was changed to use temp table records like Photopost it would be much easier.

The search records could then store the distance in a field and this could be sorted on. Would just need the distance calculation done in mySQL at run time on the first search.

The other way of course would be to run the calculation on *every* search / category view. Though this might be quite costly, I'm not sure how much CPU time that would take. The benefit though would be it could be used on category viewings too, not just searches.


All times are GMT -5. The time now is 05:38 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97