We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

plugin request- Weather Plugin...

Development and Programming

Jamie Poitra's avatar
Jamie Poitra
409 posts
20 years ago
Jamie Poitra's avatar Jamie Poitra

We have been having unusual weather here in Sitka Alaska this week and it got me to be thinking about a weather plugin.

I took a look at the available PHP scripts that deliver the weather however none of them were easily convertible to EE as a plugin and none of them had quite the functionality that I think would make a great plugin.

First I think it would be great to have it allow you to specify a certain day. For instance if I wanted the weather for a few days ago I could put that info as a parameter into the tag for the plugin and it would provide the weather for that day instead of what would probably be the generic display of the weather for whatever day it happens to be. It would also be useful to have parameters for what content to display, IE temp, wind direction, humidity, graphic, etc.

I sadly don’t have the skill to do this from scratch. Anyone interested in the challenge? I would love to help in anyway possible be it graphics, or testing, but I wouldn’t be much help with the coding.

Anyone else interested in something like this?

Jamie

       
Mr Adams's avatar
Mr Adams
18 posts
20 years ago
Mr Adams's avatar Mr Adams

Hmm, I could try using a feed from weather.com but I don’t think they allow you to obtain weather information from the past dates.

       
Jamie Poitra's avatar
Jamie Poitra
409 posts
20 years ago
Jamie Poitra's avatar Jamie Poitra

Really? I was assuming they did allow that since you can do it through a search. Well I dug through one a script that uses weather.com and found this xml feed:

http://xoap.weather.com/weather/local/99835?cc=*&link=xoap&unit=s&prod=xoap&par=1003524002&key=6196f50b8fb87a21

cc means current conditions I think. I suppose we would have to see if there is a way to ask for pc or previous conditions or something like that. 😊

Another choice at least for the US would be NOAA. I’m checking their page right now. I know other scripts have used them for a source before however I’m not seeing any feeds.

Jamie

       
MelodramaBabs's avatar
MelodramaBabs
15 posts
20 years ago
MelodramaBabs's avatar MelodramaBabs

This would be neat. (Don’t forget canada, eh?)

       
Mr Adams's avatar
Mr Adams
18 posts
20 years ago
Mr Adams's avatar Mr Adams

methnen, from what I seen so far weather.com only allows you to obtain future weather information for up to 10 days. I’m working on a plugin using their feed since it supports other locations… including cities in Canada. I’ll try and finish it by the end of the week, hopefully that is.

       
Jamie Poitra's avatar
Jamie Poitra
409 posts
20 years ago
Jamie Poitra's avatar Jamie Poitra

Great anything is better than nothing. Thats too bad that weather.com doesn’t allow more with their feeds. If you need any help with anything within my abilities I’m happy to help out.

Jamie

       
spacey310's avatar
spacey310
17 posts
20 years ago
spacey310's avatar spacey310

There’s also http://www.rssweather.com. I use that to get weather for Canada. 😊

       
Sean C. Smith's avatar
Sean C. Smith
3,818 posts
20 years ago
Sean C. Smith's avatar Sean C. Smith

I have used weather pixie - it’s good for around the world but it doesn’t do future days only current weather.

       
Mr Adams's avatar
Mr Adams
18 posts
20 years ago
Mr Adams's avatar Mr Adams

Anyone what to test it out for me? Might be contain a bug or two, but should work as expected over all. Comments and improvement suggestions are welcomed.

World Weather

       
Sue Crocker's avatar
Sue Crocker
26,054 posts
20 years ago
Sue Crocker's avatar Sue Crocker

redo, works just fine on my 1.1beta test site.

I’ve lots of cloud pictures.. I might add an if statement to show various photos depending on the cloud conditions.

Suggestion: rename the readme.txt to readme_worldweather.txt, so when I unzip the file, I don’t have to worry about over writing another readme.txt.

Do you have any idea what the various sky conditions are?

       
Mr Adams's avatar
Mr Adams
18 posts
20 years ago
Mr Adams's avatar Mr Adams

Yes, if you take a look at the lang.world_weather.php in a text editor it should be everything listed under the heading titled “Skys”…

The default values are clear skies, partly cloudy, scattered clouds, clear below 12,000 ft, mostly cloudy, overcast, and obscured but they can be changed to anything you want in the control panel.

I also changed the name of the readme file as you suggested.

       
Sue Crocker's avatar
Sue Crocker
26,054 posts
20 years ago
Sue Crocker's avatar Sue Crocker

I did see those in the lang file..

But –

//----------------------------
// Skys
//----------------------------

"SKC" =>
"clear skies",

"NSC" =>
"clear skies",

"SCT" =>
"partly cloudy",

"SKT" =>
"partly cloudy",

"FEW" =>
"scattered clouds",

"CLR" =>
"clear below 12,000 ft",

"BKN" =>
"mostly cloudy",

"OVC" =>
"overcast",

"VV" =>
"obscured",

"CB" =>
"cumulonimbus",

"TCU" =>
"towering_cumulus",

See how you have dupes there? 2 clear skies and 2 partly cloudies.

Or are there more than one possibilites for these?

Sorry to get so detailed - but it’s the certification analyst in me.

       
Mr Adams's avatar
Mr Adams
18 posts
20 years ago
Mr Adams's avatar Mr Adams

There’s only one possibility for those fields. The weather data that the plugin receive’s (called a Metar) is encode and has to be decode. Here’s and example of what’s received…

2004/08/09 10:30
EIDW 0900Z 24035G55KT 210V270 1700 +SHRA BKN007 OVC015CB 08/07 TEMPO 3500

For example “OVC015CB” means… Overcast (solid cloud cover) 15000 feet high and the cloud type is cumulonimbus.

There are duplicates because a particular value may be coded in more than one way depending on the station or if the station’s is in the US or Europe. Clear skies may encoded as SKC or NSC in the metar.I duplicate used values so that if it came up as NSC or SKC EE would fetch the value of clear skies with out me having to add extra coding to use a single value for both. I didn’t think about it being confusing though and change this.

Just realized that I spelled skies wrong 😊

       
Mr Adams's avatar
Mr Adams
18 posts
20 years ago
Mr Adams's avatar Mr Adams

I need to start using the preview button, lol

I didn’t uses a normal xml feed because weather.com’s license was to strict and other xml feeds only supported US weather or wasn’t very reliable. They all basically get their weather from the same place.as the plugin though.

       
Mr Adams's avatar
Mr Adams
18 posts
20 years ago
Mr Adams's avatar Mr Adams

“clear_skies” => “clear skies”,

“partly_cloudy” => “partly cloudy”,

“scattered_clouds” => “scattered clouds”,

“clear_below_twelve_thousand_feet” => “clear below 12,000 ft”,

“mostly_cloudy” => “mostly cloudy”,

“overcast” => “overcast”,

“obscured” => “obscured”,

“cumulonimbus” => “cumulonimbus”,

“towering_cumulus” => “towering cumulus”,

       
1 2 3 Last

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.