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

evan flows's avatar
evan flows
33 posts
20 years ago
evan flows's avatar evan flows

redo – Excellent plugin.

I’d love to see the ability to for visitor to choose their location and then having the plugin generate the weather. Any thoughts on what it would take to add this functionailty?

       
Chris Curtis's avatar
Chris Curtis
17 posts
20 years ago
Chris Curtis's avatar Chris Curtis

You could probably create a new member profile field to hold the location code. Then just populate the location in the weather plugin with that member’s code.

I think you’ll need 1.1 for this so that you can 1) grab the custom profile field info anywhere and 2) nest that inside the weather Plugin. If might look something like:

{exp:world_weather:current
  station="{exp:member:custom_profile_data}{weather}{/exp:member:custom_profile_data}"
  cache_refresh="300"}
       
evan flows's avatar
evan flows
33 posts
20 years ago
evan flows's avatar evan flows

Thanks for the suggestion Chris.

Your solution seems to require human intervention to find and input the location code into the database.

The ideal situation would be to have the member/user choose their location and then store the location code in the member DB. I guess that the plug-in would need to do a lookup on the weather location code base – but I’d not sure if a plug-in can perform this type of operation. What do you think?

       
Chris Curtis's avatar
Chris Curtis
17 posts
20 years ago
Chris Curtis's avatar Chris Curtis

Plugins typically don’t interact with the database beyond simply pulling information out in order to display.

I’m not sure how you’re envisioning the user being able to “choose their location”. I really don’t see anything wrong with telling a user “if you want to have local weather info displayed, then go here, find your local source, and put the code into this field.”

       
evan flows's avatar
evan flows
33 posts
20 years ago
evan flows's avatar evan flows

>I really don’t see anything wrong with telling a user…

Neither do I but my “the computer should do that…” side of me thinks that it would be nice to ask them for their zipcode and have the weather_location code automatically entered. :}

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

I haven’t looked into doing look ups using zipcodes, but I can do something similar to noaa.gov’s site. It would have to be as a module though.

       
mmjaeger's avatar
mmjaeger
78 posts
20 years ago
mmjaeger's avatar mmjaeger

too bad that the noaa.gov site doesn’t provide a link to a nice looking weather picture - is there a work around?

       
mmjaeger's avatar
mmjaeger
78 posts
20 years ago
mmjaeger's avatar mmjaeger

very nice weather module to be seen at: http://www.gizgo.com/weather.php

       
Halogen's avatar
Halogen
74 posts
20 years ago
Halogen's avatar Halogen

redo, Two things:

1) I couldn’t quite get it to work. Here’s what I’m using:

<code> <h2 class=”sidetitle”>Your Local Weather</h2>

{exp:world_weather:current station="{exp:member:custom_profile_data}{weather}{/exp:member:custom_profile_data}” cache_refresh=”300”} Temperature: {temperature_f}°F<br /> Feels Like: {feels_like_f}°F<br /> Humidity: {humidity}%<br /> Conditions: {condition}<br /> Wind: from the {wind_direction} at {wind_speed_mph} mph<br> Last Updated: {last_update format="%m/%d/%Y %g:%i %a"}<br> {/exp:world_weather:current} </code>

I created a “Custom Profile Field” called weather, and calling that info up didn’t quite work. Field info:

type: text input format: none field width: 15px max length: 4 rows: 1

2) Is there anyway to output the real name of the City / State where the weather stats are coming from? It would be nice to have it say, “The weather in Omaha, NE”….

Any help / thoughts we be appreciated.

       
Halogen's avatar
Halogen
74 posts
20 years ago
Halogen's avatar Halogen

If I just place

<code> {exp:member:custom_profile_data}{weather}{/exp:member:custom_profile_data} </code>

somewhere in my page, it does display the right 4 char code, so I know the data is there and is being returned correctly.

       
Halogen's avatar
Halogen
74 posts
20 years ago
Halogen's avatar Halogen

You plugin does seem to work fine, I’m just having trouble getting it to be “location” specific based off of the custom_profile_field.

       
Halogen's avatar
Halogen
74 posts
20 years ago
Halogen's avatar Halogen

redo,

Any thoughts on this?

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

City / State is possible but not with a plugin being that It’d need access to the database.

As far as the custom profile goes, I’ll check it out later on today to see if I can get it to work.

       
Halogen's avatar
Halogen
74 posts
20 years ago
Halogen's avatar Halogen

Any chance to take a look at this?

       
bigblue's avatar
bigblue
11 posts
20 years ago
bigblue's avatar bigblue
The wind is coming in from the calm at 0 mph

Hmmm, interesting report from Sue’s site 😊

       
1 2 3 4

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.