wp-weather

Latest version: 0.3.8
Please update to the latest version. I apologize for the rash of updates, but this version should fix all issues while allowing multiple forecasts to be used. Hopefully this will be the final update for quite some time.

Download link: http://wordpress.org/extend/plugins/wp-weather/

I have been using weather.com’s XML web service to display local weather information on my family website for several years. I decided to make the PHP code into a widget for wordpress. Here’s where you sign up for their service: http://www.weather.com/services/xmloap.html

This widget uses a database table to cache the data for a half hour to avoid hammering the web service. Additionally, if you are using the wp-cache plugin, any changes to the options clear the cache.

To install: upload to your plugin directory, activate the plugin, set the options and add the widget to your sidebar. Your location ID is a zip code for US and an alphanumeric code for international. Take Dublin for example – when searching for Dublin on weather.com you are taken to the following page: http://www.weather.com/weather/today/Dublin+Ireland+EIXX0014 and EIXX0014 is the location code.

Additionally, you may use a shortcode on any post or page.
[weather_display]
If you want to show different cities on different pages/posts you can specify a location id:
[weather_display location_id="75034"]
If you’d like to display more days than default (what you set in the plugin options page):
[weather_display forecast_length=5]

weather.com has made changes to their servers which now REQUIRE you to enter a partner id and license key in this plugin’s settings. If you do not, they will not send the complete forecast data which in turn will break this plugin.

Preview:

221 responses to “wp-weather”

  1. Paul

    Hi Matt,

    Quick question on a problem I am experiencing. (WP 2.2, PHP 5.2.2, and an older hacked template that I have brought up to widget capable code (per the WP guys instructions and code). Here’s the error I get:

    Internal Server Error

    The server encountered an internal error or misconfiguration and was unable to complete your request.

    Please contact the server administrator, webmaster@sundoggy.net and inform them of the time the error occurred, and anything you might have done that may have caused the error.

    More information about this error may be available in the server error log.

    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

    If you have any ideas, I’d appreciate it. It looks great, and I hope to try it out soon.

    Thanks,

    Paul

  2. yabbox

    I understand. Thanks for the reply.

    Unfortunately I received a similar reply from hostexcellence.com/ so it looks like I need to look for an alternative. Any ideas?

    “I’m sorry, it is impossible to make an upgrade of PHP version on our servers at the moment. I regret.
    We do not at this current time have any ETA for PHP5. We do appreciate your interest, and your patience in this situation. We will inform all current customers at such time as we do begin to offer PHP5.”

    Regards,
    Andy

    ________________________________________
    Unfortunately I do not have a solution for PHP

  3. Rolando

    Thanks for this cool plugin!

  4. Mitchell

    I am having a problem with WP-Weather Manager. When I filled the partner id and license key along with zip code and then save the values and got an error stating:

    WordPress database error: [Table 'campmark_wp_2.wp_weatherxml' doesn't exit]
    TRUNCATE TABLE wp_weather xml

    What does that mean? Your help is much appreciated. Thanks.

  5. andy

    I have set up this plugin on one site, thanks very much for making it php4 compatible.

    But I get the same error as Mitchell on another of my sites. I see that he has fixed the problem.

    Any advice?

  6. andy

    thanks again Matt. I got it working by adding the following SQL (excluding line 6).

    CREATE TABLE wp_weatherxml(
    xml_url varchar( 150 ) NOT NULL DEFAULT ”,
    xml_data text NOT NULL ,
    last_updated datetime NOT NULL DEFAULT ’0000-00-00 00:00:00′,
    KEY xml_url( xml_url )
    )

  7. daniel

    hi,

    is there a way to display international locations. weather.com accepts city, country.

    also is there a way to change the units say to metric.

    daniel

  8. buffawhat

    I’m trying to get this plugin working on a WPMU home page. I get the 500 server error when I try to put the tag in.. even as a widget on a widget theme i get the error..

    any ideas?
    runing MU 1.2.3 on dreamhost with php 5.2.2

  9. piecealava

    I’m able to activate the plugin, but when i click the link to configure i get the following error:

    Cannot load wp_weather/wp_weather.php.

    what did i miss?

  10. DesiTech

    hi,

    I’m using wordpress-mu-1.2.3-2.2.1 and when I tried your widget I get this error:

    Fatal error: Call to a member function on a non-object in /homepages/36/d162900626/htdocs/blogs/wp-content/plugins/wp-weather.php on line 313

    And line 313 code is this:
    $day = $day_attributes['t'];

    can you please look into it.

    thx,
    DesiTech

  11. DesiTech

    I’m using Version: 0.2.1

  12. Richard Brown

    Unfortunately I will have to decativate the plugin because I can’t get it working without widget support – a shame.