Here’s the link:
http://www.sonicpling.net/weather/weather-plugin.zip
Note; you still cannot have two locations displayed at one time, and I’m too lazy to try and fix it right now. if someone wants to do that and send me the updated file, I’ll host it.
I’m also thinking it would be nice to swipe some of pericat’s code to get it to keep a cache, but thats another thing I’m too lazy for.. lol
Beel: are you wanting me to include the gifs in the zip?
–Jeremiah
Updated the zip file.. same location:
http://www.sonicpling.net/weather/weather-plugin.zip
I added an option to set the icon extension and also added Beel’s icons.
–Jeremiah
star, that javascript fix worked perfectly. great find
Jeremiah, I hacked the two locations bit – I’ll take a look at the plug-in and see if it will still work.
Beel, I got the file.
I’ll try and get it into the zip this evening!
Many Thanks!
I sent you an e-mail BTW.
–Jeremiah
Here’s a good place to look for the ICAO METAR codes:
http://weather.gov/tg/siteloc.shtml
It doesn’t look as though the Wu-Chi Observatory does hourly reporting.
Maybe CNN has their own observation station?
–Jeremiah
Updated the zip file.. same location:
http://www.sonicpling.net/weather/weather-plugin.zip
Thanks to Beel, you can now have multiple stations showing on one page!
–Jeremiah
likin’ it.
so far i’m just using it to overlay the icon on top of my site’s header. the trans png’s are great in ‘modern browsers’.
hmm… i must have something set wrong, because the plugin seems to think it’s nighttime (the icon is a moon) here in sunny Tucson, AZ at 10AM.
[grumble]
i’ve got my station set to KTUS and my time difference (from GMT) set to “-7″… i don’t know what else to change.
[pout]
Boy, I wish I had the time to sit down and really learn what I’m doing.. lol
Final update for now, (unless someone finds a bug)
Same location, new file:
http://www.sonicpling.net/weather/weather-plugin.zip
Changed the description of $local_time to reflect that it’s an offset from the server time, not from GMT.
Changed the way I was styling the weather item to be more semantically correct. (Thanks Beel!)
Updated the instructions to reflect the new style sheet changes needed.
That is all.
–Jeremiah
Jeremiah, I have been playing with caching the metar data (pouring over the stuff David Chait has done because I am a PHP novice) and was pleasantly surprised at the performance increase – cutting my rendering time in half. I am on a slow server off my computer, but still…
Beel, is it caching to a file or to the wordpress db?
If we could get it to keep a cache in the database for each ICAO station then, that would pretty much finish every feature that I personally am wanting from this plugin.
And while you may be a novice, you obviously know more than I do, so if you get it working, then please send it my way and we’ll update the zip file!
I was playing with pericat’s weather plugin, and I didn’t see a speed difference when loading the same station a second time, so I didn’t pursue that very far. (I probably had something configured incorrectly.)
Using either this or pericat’s weather plugin seems, on average, to add about 1.2 seconds to the page load time for me.
–Jeremiah
I have it caching to a txt file on the server and, unless I am missing something, I do not see an advantage to caching in the database. I suspect this way would be slightly faster, but perhaps those more in the know, like David, will chime in here. I was thinking about running the plugin by him to see if he would fine tune it since he has done a lot in this area.
Without caching my page renders in 1.6-1.9 seconds (1.2 on a good refresh, over 2 seconds on a bad one). With caching it runs a pretty consistent .84-.87 seconds, so the improvement is pretty significant.
Sounds pretty nifty.
I look forward to seeing it.
–Jeremiah