View Full Version : looking for a site user choice weather widget
ccscull
04-01-2010, 05:07 PM
I am looking for a service, code, free or otherwise, that one of our intranet users can choose their city to display the weather on our intranet site.
I have come across several where the webmaster can display on their site A city but nothing were the end users can choose what is displayed. I have also come across ones were you can look up the weather in a city but it means leaving the intranet site. I am trying to keep them on the intranet site.
Also this has to be available worldwide.
djr33
04-01-2010, 05:15 PM
I don't know of any services that allow this, but you might find one.
The reason it is hard to find one is that the point of allowing people to use their services is as an ad for their website. So once your users can do everything on your site that they can do on their site, their site is not useful and your site does not work as an ad, but as competition.
In other words, it's best for business reasons that they do not allow what you want.
I'm not saying it's "better" necessarily, but finding a free service that works on your site is hard.
Also, it's technically difficult unless you use an iframe because the data must be sent to their server from your website so that can get messy.
djr33
04-01-2010, 10:25 PM
I had another thought after my initial post:
Since YOU can choose which city to load, you can probably transfer that ability to your users. That value will either be part of the html or a Javascript variable and using Javascript you could probably access both and change it. Alternatively (and perhaps smoother, though a little harder to make), you could do the same using a server side language (such as PHP) and pre-setting that value to a certain choice. You could have a form that would allow this.
Still, though, this would mean possibly having to reload your page if the element is not in an iframe.
ccscull
04-02-2010, 09:34 PM
Thanks, I was looking for a widget, not sure what you ment in your second post.
"Since YOU can choose which city to load, you can probably transfer that ability to your users. "
The ones I looked at are just plug ins from site like wunderground.com or weather.com. They only offer either a update graphic for a specific city that I link to on my site or some small chunk of code. There is not a way to give control of what city after it is put in the page code.
djr33
04-02-2010, 09:49 PM
I was describing modifying/expanding a widget.
My idea probably could work. Somewhere in the code that you insert into your page, you specify which city you want. This is a variable sent to the weather site's server that informs it what info you want. You MUST have this or it would not know what city to send back.
So based on user choice you could find a way to specific the city and send THAT CHOICE to the server and get the weather for it.
There are three problems:
1. Of course this means something complex on top of the widget, though it isn't extremely difficult once all of the details are understood.
2. This might be against the TOS of the weather service, so you should look into that and not do it if they don't allow it.
3. It might be difficult to figure out the correlation between location and code to submit to the weather service. For example, it would be easy if zip codes corresponded to locations, but if not then how would you set that up? In fact, if a site does not want you to modify this, then they might try to "encrypt" the location data into something you cannot read or predict and only makes sense to their server/database where they can decode it and figure out what it means.
The end result of all of this is that they are using your website to advertise their service. By giving your users full control of their information on your website, they lose customers.
They have no reason to do this.
You may not find anything that works.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.