WebmasterSite.net: PHP scripts to enable your creativity
WSN Links PHP Directory Software
PHP Scripts Webmaster Links Support Forums

Register | Forgot Password

zip search in kilometer

Version: WSN Links 5.0.0 Alpha 5
Status: completed
printPrint


zip search in kilometer
chris
Member
Avatar

Usergroup: Customer
Joined: May 04, 2008
Location: Liège, BELGIUM
Total Topics: 10
Total Posts: 33
Posted 06/25/08 - 11:26 PM:
quote post
#1
To make zip-search a usefull tool outside anglo-american countries it would be nice to have it also available in kilometers, not only mils. No miles here in Europe ;-)
Paul
Administrator
Avatar

Usergroup: Administrator
Joined: Dec 21, 2001
Location: Northern California
Total Topics: 57
Total Posts: 6312
Posted 06/29/08 - 07:19 AM:
quote post
#2
I'm not even sure the formula is doing it in miles and not kilometers. Since it believes in a flat earth it's not accurate over long distances anyway. Picked it up from somewhere else:
$latrange = $range / 69.172;
$lonrange = abs($range / (cos($latitude) * 69.172));
$minlat = number_format($latitude - $latrange, "4", ".", "");
$maxlat = number_format($latitude + $latrange, "4", ".", "");
$minlon = number_format($longitude - $lonrange, "4", ".", "");
$maxlon = number_format($longitude + $lonrange, "4", ".", "");


Wouldn't be hard to do
$range = $range / 1.6;
to use kilometers (presuming its using miles now). Any suggestions on where in the admin panel the option should go to ever be found, however?

Edited by Paul on 06/29/08 - 07:23 AM

"Do things you love doing, because then it ain't work. Don't do something you don't really enjoy, because you're never going to work hard enough at it." - Bob Young, founder of Red Hat
chris
Member
Avatar

Usergroup: Customer
Joined: May 04, 2008
Location: Liège, BELGIUM
Total Topics: 10
Total Posts: 33
Posted 06/29/08 - 10:48 AM:
quote post
#3
Perhaps a select-box (or radio-buttons) next to the switch under admin --> settings --> switches --> "ZIP code range" (miles/km)?
Paul
Administrator
Avatar

Usergroup: Administrator
Joined: Dec 21, 2001
Location: Northern California
Total Topics: 57
Total Posts: 6312
Posted 06/30/08 - 02:25 PM:
quote post
#4
Switches page is too cluttered already. Maybe if stuff appeared dynamically on click, but that'll get time consuming.

"Do things you love doing, because then it ain't work. Don't do something you don't really enjoy, because you're never going to work hard enough at it." - Bob Young, founder of Red Hat
chris
Member
Avatar

Usergroup: Customer
Joined: May 04, 2008
Location: Liège, BELGIUM
Total Topics: 10
Total Posts: 33
Posted 06/30/08 - 11:29 PM:
quote post
#5
Yeah, the admin menue needs a total makeover anyway - it's a bit too cluttered everywhere ;-)
Have you ever installed eSyndiCat? I don't like the script. Far less flexibility than with wsnlinks, but the design of the admin-menue is really exemlary.
chris
Member
Avatar

Usergroup: Customer
Joined: May 04, 2008
Location: Liège, BELGIUM
Total Topics: 10
Total Posts: 33
Posted 07/01/08 - 02:17 AM:
quote post
#6
Just thought about it - perhaps it would be possible to handle the miles/km question within the templates insted of the admin menu (hidden field?) - some people might need both options on international websites.
Paul
Administrator
Avatar

Usergroup: Administrator
Joined: Dec 21, 2001
Location: Northern California
Total Topics: 57
Total Posts: 6312
Posted 07/17/08 - 02:11 PM:
quote post
#7
What do you like about esyndicat's design? That horizontal top menu? I can't afford to buy it, but I can see their online demo.

I've added a localizations page which includes the miles/kilometers choice.

"Do things you love doing, because then it ain't work. Don't do something you don't really enjoy, because you're never going to work hard enough at it." - Bob Young, founder of Red Hat
chris
Member
Avatar

Usergroup: Customer
Joined: May 04, 2008
Location: Liège, BELGIUM
Total Topics: 10
Total Posts: 33
Posted 07/18/08 - 12:33 AM:
quote post
#8
f*** - I just wrote a huge answer (the biggest ever) then accidentally I hit the F5-key. Lost all my text. I'm too frustrated to start writing it again. I'll send you my skype-id via email so we can talk about it if you like. It's easier anyway.
Paul
Administrator
Avatar

Usergroup: Administrator
Joined: Dec 21, 2001
Location: Northern California
Total Topics: 57
Total Posts: 6312
Posted 07/18/08 - 09:53 PM:
quote post
#9
I don't do skype, because text is a million times easier for me.

"Do things you love doing, because then it ain't work. Don't do something you don't really enjoy, because you're never going to work hard enough at it." - Bob Young, founder of Red Hat
chris
Member
Avatar

Usergroup: Customer
Joined: May 04, 2008
Location: Liège, BELGIUM
Total Topics: 10
Total Posts: 33
Posted 07/18/08 - 11:20 PM:
quote post
#10
You can text on skype - it's like windows messenger, just not Microsoft ;-)
Anyway: will write soon again about the admin-menu-subject.
Paul
Administrator
Avatar

Usergroup: Administrator
Joined: Dec 21, 2001
Location: Northern California
Total Topics: 57
Total Posts: 6312
Posted 07/19/08 - 07:29 PM:
quote post
#11
There won't be any significant admin panel redesigns in the next year, since I already annoyed my German cobrander enough with all the 4.0->4.1 admin changes and 5.0 is too late in the game now anyway, so take your time.

Edited by Paul on 07/19/08 - 07:37 PM

"Do things you love doing, because then it ain't work. Don't do something you don't really enjoy, because you're never going to work hard enough at it." - Bob Young, founder of Red Hat
Search thread for
Download thread as


You don't have permission to post.

Please login or register.

   
 
© 2008 Paul Knierim. All rights reserved.