+The Blue Quasar Posted January 29, 2005 Share Posted January 29, 2005 I don't know who thought it up or did it first but including the "Local weather box - from The Weather Network" is such a useful thing. Now a cacher that might be going out of territory for a caching adventure can see at a glance what the weather is doing... brilliant ! I wonder if it can be the whole day's forecast? That way if you leave in the morning you'd know what the afternoon holds in store. Great idea though, local weather is very important when caching for families. The Blue Quasar Quote Link to comment
+Keith Watson Posted January 29, 2005 Share Posted January 29, 2005 On all my pages the box is there, and if you click on it, it will take you to the weather network site to the full forcast. Quote Link to comment
+Geofellas Posted January 29, 2005 Share Posted January 29, 2005 I would like to credit Keith Watson for giving me the idea. Mind you, although the weather network website purports to provide you with a means to get the code for the link I could never get that to work so had to delve my way through the javascript it produces to figure out how to set this up on my caches. Thanks Keith. Quote Link to comment
+PDOP's Posted January 29, 2005 Share Posted January 29, 2005 It's a great idea. Could you provide an example of the code required? Quote Link to comment
+Swifteroo Posted January 29, 2005 Share Posted January 29, 2005 Alas, I am not sure where I gathered the idea to do it for the COG Spring Fling page, but I had my troubles let me tell you! Originally I thought it would be easy to collect the cookie-cutter javascript that theweathernetwork.com provides, and simply add it to the cache page. However, it appears that Javascript code is not permitted on Cache pages (I can understand this). What I had to do was "Scrape" the actual Barrie image from the site simply by linking to the image they display on their site. I wasn't so sure it would work, but thankfully, everytime the cache page is loaded, it subsequently loads the most recent image that theweathernetwork.com is displaying at that time! Because theweathernetwork.com breaks what appears to be one image into 3, I had to use code as follows: <a href="http://www.theweathernetwork.com/weather/cities/can/pages/CAON0040.htm" target="_blank"><img src="http://www.theweathernetwork.com/inter/weathercentre/weatherbutton/images/headers/CAON0040.gif"><BR> <img src="http://www.theweathernetwork.com/inter/weathercentre/weatherbutton/images/observations/YBN.gif"></a> If that all seems tricky, feel free to email me and I will take the time to give you a better idea! Quote Link to comment
+Geofellas Posted January 29, 2005 Share Posted January 29, 2005 You will see from Swifteroo's example that you need to find the city code, such as CAON0040 in his example and the nearest airport code, in his case YBN. You can do these by going to theweathernetwork.com and getting a weather forecast for your nearest town. In my case when I get one for Stouffville it pops up at http://www.theweathernetwork.com/weather/c...es/CAON0656.htm and so I know my city code is CAON0656. I know my nearest airport/weaather reporting station is Buttonville for which the ICAO code is CYKZ so I take the last 3 characters YKZ which seems to be the convention that the weather network uses. Not all airport codes are supported however so you have to experiment. Once I have all that I wrap it in a anchor tag to take you to the full forecast page and pop it in a table to put it on the right of the page and insert that code at the beginning of the cache long description. This results in code that looks like this: <TABLE BORDER="0" ALIGN="right"><TR><TD> <A HREF="http://www.theweathernetwork.com/weather/cities/can/pages/CAON0656.htm" TARGET="_blank"> <IMG SRC="http://www.theweathernetwork.com/inter/weathercentre/weatherbutton/images/headers/CAON0656.gif" BORDER="0"><BR> <IMG SRC="http://www.theweathernetwork.com/inter/weathercentre/weatherbutton/images/observations/YKZ.gif" BORDER="0"><BR> <IMG SRC="http://www.theweathernetwork.com/inter/weathercentre/weatherbutton/images/bottom.gif" BORDER="0"><BR></A> </TD></TR></TABLE> Don't forget to turn HTML on in your cache description Quote Link to comment
+Keith Watson Posted January 29, 2005 Share Posted January 29, 2005 Go to the Weather Button Page and enter the city. It will then give your and axample. From here right click on the images and select properties. it will give you the city and airport codes. Quote Link to comment
+murfster Posted January 29, 2005 Share Posted January 29, 2005 Great Idea! and Great instructions.. did my first one here Thanks gents!!!! Murfster Quote Link to comment
+PDOP's Posted January 30, 2005 Share Posted January 30, 2005 Swifteroo and Geofellas Thanks for the code Unfortunately for me the nearest airport that the weather channel has data for is 80km east from me. The Enviroment Canada site get's their data from 80km west so it looks like I'm lost in the middle. Quote Link to comment
+murfster Posted January 30, 2005 Share Posted January 30, 2005 Codes for airports can be found here!. Murfster ps.. if you ever wanted to know more about these codes look here. Quote Link to comment
+C&C+COMPANY Posted February 7, 2005 Share Posted February 7, 2005 DID ONE FOR hALIFAX THANKS <TABLE BORDER="0" ALIGN="right"><TR><TD> <A HREF="http://www.theweathernetwork.com/weather/cities/can/pages/CANS0057.htm" TARGET="_blank"> <IMG SRC="http://www.theweathernetwork.com/inter/weathercentre/weatherbutton/images/headers/CANS0057.gif" BORDER="0"><BR> <IMG SRC="http://www.theweathernetwork.com/inter/weathercentre/weatherbutton/images/observations/YHZ.gif" BORDER="0"><BR> <IMG SRC="http://www.theweathernetwork.com/inter/weathercentre/weatherbutton/images/bottom.gif" BORDER="0"><BR></A> </TD></TR></TABLE> Quote Link to comment
BradGrier Posted February 8, 2005 Share Posted February 8, 2005 Nice, did one for Edmonton, but stripped out the Table tags as I have a nice CSS I use on our GCblog - that code works well! Thanks Brad http://bratandtesty.blogspot.com Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.