| Joined: |
Mar 1, 2005 06:11 AM |
| Last Post: |
Aug 15, 2010 08:22 AM |
| Last Visit: |
Aug 15, 2010 08:22 AM |
| Website: |
http://www.evagoras.com/ |
| Location: |
Nicosia, Cyprus |
| Occupation: |
Senior Web Developer |
| Interests: |
Scuba Diving, reading, Sci-fi |
| Avatar: |
Forum Administrator
|
|
| AIM: |
|
| ICQ: |
|
| MSN IM: |
|
| Yahoo IM: |
|
|
evagoras has contributed to 157 posts out of 393 total posts
(39.95%) in 2,020 days (0.08 posts per day).
20 Most recent posts:
Hi LilMoke. Can you post a link to the example you are talking about? It will help me understand better what you are trying to do.
I am not sure what you mean by "default header with title and the 'subscribe to this feed' link". I suspect that you may be talking about the RSS template implemented by Firefox which shows up when you are viewing an RSS feed by default. That is a Firefox setting and there's nothing you can do about it (I think) for those users that may be coming to your site using Firefox. For other browsers that no style is implemented by default (like IE), then you CAN add css styles to your output and they will be picked up.
And I suppose, if you really want to get rid of the default header implemented by Firefox, you could try adding something like this to your output (where 'feedHeaderContainer' is the ID of the top header inserted by Firefox:
#feedHeaderContainer { diplay:none; visibility:hidden; }
What: 1) operating system (Windows, Linux, etc.) 2) web server (Microsoft IIS, Apache, etc.) 3) and ColdFusion engine (Adobe CF, Railo, BlueDragon) are you using?
This is a ColdFusion custom tag, so you will need to be running ColdFusion as your application server for it to work. Dreamweaver is just an editor, it's not going to compile and run code. The custom tag is dynamic in that it is responsible of going to the weather.com's website and getting the updates by itself. It's also responsible for parsing through the XML results that weather.com gives back to us and creating a more friendly output. And yes, you can show the weather for 7 or for 7,000 cities for that matter. There is no limit. So, in short, do you have ColdFusion running on your website? If not, then you will not be able to use this tag.
The data seems promising, however I couldn't find any documentation or information on how to use this over the web. It looks like it's only a desktop application that you need to install on your PC. Are you sure you can use this as a web service?
It's working fine on my end. Are you sure that you have donwloaded the latest zip file? And have you made sure that you have added your own Partner ID and License Key when you call the forecast or the current conditions pages? Without yor own ID and Key, weather.com will not return a valid XML. Make sure you delete all cached XML local files as well.
I am not sure I understand how you got that parking URL. It's not in my custom tag, and it's not in the XML feed from weather.com. Please elaborate.
I went through and made the necessary changes to make this tag work again. I'am gonna have to go through things in more detail when I have more time, but it works fine on my end now. Test it and let me know.
You can download the new source code from within the article. I added an update right at the top of the article with a new download link.
@SCWgreg: How about them 5 bucks? :o)
No kidding! A few months back Weather.com changed its web service call without any backwards compatability, and now this! I chose weather.com initially beacuse everything was given to us for free. I will look into it now, and if what SCWgreg says is true, then I might go with another web service instead. BTW, I also have lot sof sites using this tag, so I assume they will break as well?!!
By the way, I have only tested this under CF7 and CF8 (and testing now only under CF8). Make sure you are not using any other version of ColdFusion. And see what happens when you replace the "weather.cfm" custom tag with the new one I just uploaded.
It shouldn't matter that the validator service throws an error. Things should still work ok.
I have not seen the error you mention. However, I did go through the code and I have spotted a small error that could be causing that issue. I uploaded a new zip file with a fix. Go ahead and download the new one and try things out again.
One thing you can also try is to cache the entire html contents of the weather control so that coldfusion doesn't have to parse the entire xml file every time. I have included caching for the url contents but not for the html output. You can find several libraries that do that, including "cf_accelerate", which I mention in the article. If you want to try something like that out and you have problems, post them back here and I will try to help.
Let me know how it goes.
Sam, that's not true. Weather.com DOES offer the results in Celcius, and actually, I already have that functionality working in the module. There is a parameter you can use for the custom tag called "unit" which takes the values "m" and "s". They stand for: s = standard (Farenheit) m = metric (Celcius)
Example: <cf_weather locationCode="GRXX0004" partnerID="xxxxxxxxxx" licenseKey="xxxxxxxxxxxxxxxx" unit="s">
Note that for each type of unit that you use, a different file will actually be saved in your system for caching the contents, but you don't really need to worry about this as it is done automatically, i.e. for the metric unit a file called "weather_m" will be created and for the standard, "weather_s".
Sam, it seems that weather.com decided to change their web service and unfortunately did not leave it backswards compatible, causing errors in the existing weather module. I have made the necessary changes to the code, and have uploaded a new zip file that should work fine now. Please go to the article and download the code in the zip file all over again, try it out and let me know how it goes.
Sure I am! :o) Go back to the article and download the zip file again. I have fixed that error and have uploaded a new file. The problem was that weather.com had changed the way it uses its web service, and unfortunately did not leave it backwards-compatible. I figured out what the change was (it was really simple to fix), and it should work fine now. Try it, and let me know.
Since this site is becoming increasingly ColdFusion oriented, I have turned off the ASP.NET forum. Please use other, more active, forums for your ASP questions.
The solution is easy. Just replace line 195 of the "weather.cfm" custom tag (it's the line that builds the url to call) to this:
<cfset sVars.cUrl = "#sVars.cUrl##arguments.location#?cc=#sVars.cCC#&unit=#arguments.unit#&dayf=#sVars.iDaysForecast#">
It seems that the query to weather.com still works now without needing a partner username and key. I don't know under what circumstances this works or not, I have to look into it some more. The "prod" argument is no longer needed either.
I will make sure to update the article as well and the download accordingly.
Actually, I happened to run across it today as well. Weather.com has changed the way you call the url query. And this happened just last week, as some of the places that I had this custom tag working, stopped suddenly. Fortunately, they have not changed the XML structure at all, so everything else should work the same.
The change you mention, i.e. removing the with the "link" is correct. However, you also need to completely remove the "prod" argument. It seems like they don't use it anymore and by including it you always get 5 days no matter if you ask for a 10 day forecast.
I believe so. You can pretty much do anything that the weather dot com website displays. A simple dump of the structure that is created by using the provided code will give you a pretty good idea of what you can display.
You can still loop through your results just as you do when displaying them on the page, but this time try saving them to a file instead. If you save the table that you created as a text stream into a new file, and name that file "xls" (or any other spreadsheet program extension), then Excel will recognize that data as tabular and will open and convert your HTML table into a regular worksheet when you open the file.
It could be an issue of sandbox security on the server. See this: http://www.talkingtree.com/blog/index.cfm/2006/7/11/SBS-Known-Issues
As an alternate solution you could try adding the contents of the xml file in the application scope instead of using a flat file.
By all means. Use it in any way that you like. And thanks for your comments too!
|
|