Invalid zip code when running weather widgets
Tuesday, July 7, 2009 by jag4710 | Discussion: DesktopX
Reply #142 Wednesday, July 8, 2009 12:01 PM
Thank you Vad, you are very kind, I appreciate it. ![]()
I have delete the quote you have included in your post, because I was wrong, I got the ID etc with email.
It will be very useful for all the widgets creators to have an additional script for our widgets, so we will be abble to update them.
What you have suggested is a great idea.This is exactly what we need:
1. Enter here your TWC Partner ID:
2. Enter here your TWC License Key:
3. Enter here the US ZIPCODE or City, Country....
Then these three parameters must be used in the widget script to access to RSS Feed and be saved in the widget's *.INI file.
One of my weather widgets is here: http://adni18.wincustomize.com/skins.aspx?skinid=284&libid=34
Reply #143 Wednesday, July 8, 2009 12:07 PM
Well, I think we might have to do 2 tutorials: one for end-users where you just hard code the sucker, and the other for developers so they can modify the script to include a prompt for the key and ID, as well as any other TWC license requirements.
Reply #144 Wednesday, July 8, 2009 12:13 PM
Reply #145 Wednesday, July 8, 2009 12:36 PM
make it an "About" page
Reply #146 Wednesday, July 8, 2009 12:57 PM
I had the huge bad luck of downloading desktopx yesterday, when the weather services were down
and i've read all the posts and commants, but yet have found no way to fix it.
Can someone please make a tutorial of how to fix it?
I'm no good with scripts and stuff so PLEASE make it simple.
Thanks
Here's a quick and dirty how-to:
First, subscribe to the Weather.com feed -- LINK
When you get your confirmation email save the Partner ID code and License Key.
Next:
- Load DesktopX Builder
- Before importing your widget, disconnect from/turn off the internet (unplug cable, etc.)
- R-click on the DX Builder icon in your system tray and Import your widget
- R-click on the DX Builder icon and choose List Objects
- Find the "weather_image" object. R-click and choose Edit Script
(If you don't see this object, you are likely using a different version)
- In the script editor, find the line that looks similar to this:
http.Open "GET", "http://xoap.weather.com/weather/local/" & location & "?cc=*&dayf=5" & str_UNITS & str_RANDOM_URL, False
- Replace that line with the line Vad_M posted:
http.Open "GET", "http://xoap.weather.com/weather/local/ZIPCODE?cc=*&dayf=5&unit="&str_UNITS&"&link=xoap&prod=xoap&par=ID&key=KEY" , False
- Change ZIPCODE to your zipcode, ID to your PartnerID, and KEY to your LicenseKey
- In the script editor, click File and then Save and Close. Click Ok on the properties window to apply the new script
- This hardcodes your location into the widget, meaning if you want to change the location, you have to open the script to do so.
- Restore your internet connection and test the widget (Use the change location button; it will call your location no matter what you enter.)
- If all goes okay, you can now export the widget again.
Reply #147 Wednesday, July 8, 2009 1:56 PM
This, I think, is the bigger problem.
Amen sister! ![]()
Reply #148 Wednesday, July 8, 2009 2:47 PM
Nope, in the box where US zip code is asked, just type the local code you are using with widgets (ex: for me i entered Trappes, France and it worked fine till sending me the email with Partnet ID and License key
)
Reply #149 Wednesday, July 8, 2009 3:08 PM
and here I believed the universe had suddenly turned against me. I've had a few issues with my PC as of late, BSOD's, Mysterious Reboots, erroneous error messages such as "Windows was shutdown to prevent damage to your computer: the bios in your computer does not support ACPI"
HUH? (so why does it not support it today, when it supported it yesterday?)
and "warning, disk drive errors detected" with no clue as to which of the 8 connected drives (yes, I'm a complete geek, and have 8 drives connected totalling over 6 TB, it's how I save and later watch my High Def Movies etc.) as it turns out, these messages appear even when NO DRIVES are connected, and the BIOS has been updated to the latest version. Head Scratching......... RAM! it has to be. Sure enough, I had a stick of RAM go bad, and once removed everything was back to normal, except the ZIP code issues in any weather module I loaded. (Except some weather apps would return a script error for a certain line.)
wow, I find it hard to believe that my machine suddenly is rejecting DX weather apps, but no other DX apps. (as I tried to determine why) so I decided to post here for help, and lo and behold, the very first topic I see!!! Thank the Gods! I'm really not losing it!
With my version of Martin's Weather, I had to insert the fix posted here, then once it was done, I had to click on the City/Zip and either change the zip (to something other than it already was before), or type in my city. once I did, it retrieved the data, but now instead of seeing just the city listed like before, it now lists CITY (ZIP) at the top of the widget.
In all, I'm very happy for all of your efforts, I had just spent weeks working on a weather widget based on martin's, that matches a certain theme, and I was rather distressed that after all that work, something was kaput. Thanks again everyone for input here, and special thanks to those of you (Vad_M, Sviz, etc) who figured out and posted a fix.
-Doc
Reply #150 Wednesday, July 8, 2009 3:09 PM
• provide four (4) promotional links, selected by TWCi and provided through the Service on each data call, back to www.weather.com for additional weather information in close proximity to the TWCi Content as set
or in other words,put adware in every DX theme that has a weather widget.![]()
Reply #151 Wednesday, July 8, 2009 3:10 PM
After reading reply #107 it seems to me that we are being told that in order to use the service, we must put adware in our widgets. We cannot sell these widgets as Master skins, or as a part thereof.
With this in mind, my future themes may not have a weather app included. Updated themes may not either. ![]()
Edit: Weather is easy enough to get at a website, the Wincustomize Toolbar also has weather.
Reply #152 Wednesday, July 8, 2009 3:21 PM
With this in mind, my future themes may not have a weather app included. Updated themes may not either.
Reply #153 Wednesday, July 8, 2009 3:23 PM
I think the future of weather widgets is better off depending on another service other than weather.com
They did the same thing about a year ago and will likely do it again a year from now.
For me....(I use Samurize configs) I'm moving to a pagescraper to pull the info from Wunderground Weather I've already got my radar/5 day forecast & current conditions done.

Reply #154 Wednesday, July 8, 2009 3:26 PM
First, subscribe to the Weather.com feed -- LINK
When you get your confirmation email save the Partner ID code and License Key.
Next:
- Load DesktopX Builder
- Before importing your widget, disconnect from/turn off the internet (unplug cable, etc.)
- R-click on the DX Builder icon in your system tray and Import your widget
- R-click on the DX Builder icon and choose List Objects
- Find the "weather_image" object. R-click and choose Edit Script
(If you don't see this object, you are likely using a different version)
- In the script editor, find the line that looks similar to this:
http.Open "GET", "http://xoap.weather.com/weather/local/" & location & "?cc=*&dayf=5" & str_UNITS & str_RANDOM_URL, False
- Replace that line with the line Vad_M posted:
http.Open "GET", "http://xoap.weather.com/weather/local/ZIPCODE?cc=*&dayf=5&unit="&str_UNITS&"&link=xoap∏=xoap&par=ID&key=KEY" , False
- Change ZIPCODE to your zipcode, ID to your PartnerID, and KEY to your LicenseKey
- In the script editor, click File and then Save and Close. Click Ok on the properties window to apply the new script
- This hardcodes your location into the widget, meaning if you want to change the location, you have to open the script to do so.
- Restore your internet connection and test the widget (Use the change location button; it will call your location no matter what you enter.)
- If all goes okay, you can now export the widget again.
Well if you no need harcode your location :
Replace that line to:
http.Open "GET", "http://xoap.weather.com/weather/local/" & Object.PersistStorage("zipcode") & "?cc=*&dayf=5&link=xoap&prod=xoap&par=YOURID&key=YOURKEY" & str_UNITS & str_RANDOM_URL, False
next steps, like sViz suggested
In this way you change your location on popup window, like before. ![]()
Reply #155 Wednesday, July 8, 2009 3:33 PM
First, subscribe to the Weather.com feed -- LINK
When you get your confirmation email save the Partner ID code and License Key.
Next:
- Load DesktopX Builder
- Before importing your widget, disconnect from/turn off the internet (unplug cable, etc.)
- R-click on the DX Builder icon in your system tray and Import your widget
- R-click on the DX Builder icon and choose List Objects
- Find the "weather_image" object. R-click and choose Edit Script
(If you don't see this object, you are likely using a different version)
- In the script editor, find the line that looks similar to this:
http.Open "GET", "http://xoap.weather.com/weather/local/" & location & "?cc=*&dayf=5" & str_UNITS & str_RANDOM_URL, False
- Replace that line with the line Vad_M posted:
http.Open "GET", "http://xoap.weather.com/weather/local/ZIPCODE?cc=*&dayf=5&unit="&str_UNITS&"&link=xoap∏=xoap&par=ID&key=KEY" , False
- Change ZIPCODE to your zipcode, ID to your PartnerID, and KEY to your LicenseKey
- In the script editor, click File and then Save and Close. Click Ok on the properties window to apply the new script
- This hardcodes your location into the widget, meaning if you want to change the location, you have to open the script to do so.
- Restore your internet connection and test the widget (Use the change location button; it will call your location no matter what you enter.)
- If all goes okay, you can now export the widget again.
Works fine but something's might be missing somewhere else to get the units correctly in Celcius or Fahrenheit, because for me it's 63°C now ![]()
Reply #156 Wednesday, July 8, 2009 3:34 PM
in order to use the service, we must put adware in our widgets. We cannot sell these widgets as Master skins, or as a part thereof.
With this in mind, my future themes may not have a weather app included. Updated themes may not either.
This attitude saddens me. If someone (company, person, site) wants to give you something for free in exchange for attribution . . you should be willing to show them some love.
So you think it's ok to force me to either put adware and logos in my work? I have the choice not to do that, but it means no weather apps in my themes. Because it's free, I should allow adware into my work. I disagree.
I know I'm not the only one facing this problem, but as we all know too well, I recently had to reupload my entire gallery. We are talking having to do that, all over again, only this time a few at a time. Meanwhile, all my users have themes they can't use. And if I do update them all, and Weather.com pulls this again next year, then what?
And you can call it what you will, adware is adware. The blue Weather.com logo isn't gonna match all my themes. I don't want it in my work. I guess I have a bad attitude. Bummer when I can't say what goes into my work and what don't.
Reply #158 Wednesday, July 8, 2009 3:39 PM
This might be a case of a different weather script. Which widget are you using?
Reply #159 Wednesday, July 8, 2009 3:52 PM
It's different for different widgets, though. Yours uses Object.PersistStorage("zipcode"). Others, like ~Fairyy's, use the variable "location", and still others (Tiggz's) use the varaible "zipcode".
We should get these fixes organized into a new post.
So you think it's ok to force me to either put adware and logos in my work? I have the choice not to do that, but it means no weather apps in my themes. Because it's free, I should allow adware into my work. I disagree.
I know I'm not the only one facing this problem, but as we all know too well, I recently had to reupload my entire gallery. We are talking having to do that, all over again, only this time a few at a time. Meanwhile, all my users have themes they can't use. And if I do update them all, and Weather.com pulls this again next year, then what?
And you can call it what you will, adware is adware. The blue Weather.com logo isn't gonna match all my themes. I don't want it in my work. I guess I have a bad attitude. Bummer when I can't say what goes into my work and what don't.
I am a little irked, too. I'm going through the documentation, and they are very stringent on where/how the logo must be placed. The logo won't look good integrated with a theme (as most of your themes are), but on a separate widget, the 31 pixel logo is not so bad.
Once we have a more up-to-date, flexible, weather template, which includes the TWC requirements we should be back on track as far as new widgets are concerned.
Judging by the number of posts on this issue, it appears weather widgets are a major reason why people even use DX.
Reply #160 Wednesday, July 8, 2009 3:53 PM
Following this logic,we should be ok with free software that contains a mandatory toolbar or other app as long as we didn't have to pay for it. Whatever happened to free choice?
I watch TWC daily on TV,and have a Vista sidebar gadget that uses the service(w/no adware on it)and will continue to use both. I can't say the same for DX now that NONE of my themes work,and "fixing" them requires putting things onto my computer that I do not want.I may be wrong for thinking this way,but obviously others do as well or there would be no need for pop-up blockers,adware blockers,etc.
Btw,the sidebar gadget and Yahoo Messenger were free but I paid for DX,which from my end-users viewpoint is now useless. Let Stardock show them the love.
Please login to comment and/or vote for this skin.
Welcome Guest! Please take the time to register with us.
There are many great features available to you once you register, including:
- Richer content, access to many features that are disabled for guests like commenting on the forums and downloading skins.
- Access to a great community, with a massive database of many, many areas of interest.
- Access to contests & subscription offers like exclusive emails.
- It's simple, and FREE!







Reply #141 Wednesday, July 8, 2009 11:59 AM
Just try... now working with my own location, only 5 days forecast
http.Open "GET", "http://xoap.weather.com/weather/local/YOURLOCATIONCODE?cc=*&dayf=5&link=xoap&prod=xoap&par=YOURID&key=YOURKEY" & str_UNITS & str_RANDOM_URL, False
Thanks Bilbo!! Worked like a charm!!!
