wp-weather

PLEASE READ!
So weather.com killed off the feeds for free on November 15, 2011. Strange thing…my feed is working now. I don’t know if it will work for new subscribers but it appears the old API keys do work! Cheers!

Latest version: 0.4.4
If your images are not displaying, go the the plugin settings page and select an image set. It should default to the original images, but if not, this is how you fix it. To make the plugin more easy to upgrade/install I’ve included two icon sets, weathercom (default) and Samurize. To download more, they can be obtained here: wp-weather-icons. Unzip them and upload to plugins/wp-weather/images.

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]

I’ve also added support for a custom post field titled weather which takes a location code. Using the Weather Custom Field widget for your sidebar, you can have relevant weather information pertaining to the custom field location on any page or post.

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:

281 Responses

  1. 月光沼泽-MoonSwamp

    WP Plugin:wp-weather…

    This plugin display local weather information on your blog

    Table of Contents

    Name(插件名称)
    Author(插件作者)
    Version(插件版本)
    Download(下载插件)
    Introduction(插件介绍)
    Installation(安装插件)

    Name….

  2. Fred Greco
    Fred Greco |

    Is there any possible work around to use this plugin if your server only has PHP4?

  3. Jim
    Jim |

    Is there a way to show more than one city location?

  4. Hex
    Hex |

    Is there any way..to use this plugin without widgets?

  5. BeStMaker
    BeStMaker |

    :( yeah, i have PHP version 4.4.4 in blue host provider, thanks for ur time.

  6. Rusty Miller
    Rusty Miller |

    I get the following error when I activate your WP Plugin:

    Warning: require_once(/home/incog/public_html/blog/wp-admin/upgrade-functions.php) [function.require-once]: failed to open stream: No such file or directory in /home/incog/public_html/blog/wp-content/plugins/wp-weather/wp-weather.php on line 33

    Fatal error: require_once() [function.require]: Failed opening required ‘/home/incog/public_html/blog/wp-admin/upgrade-functions.php’ (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/incog/public_html/blog/wp-content/plugins/wp-weather/wp-weather.php on line 33

    I noticed that I do not have the file “upgrade-functions.php” in that folder and suspect this is the problem.

    What is that file for, and why don’t I have it?

    I’m running WP 2.0.5.

    Thanks in advance.

  7. Rhon Fitzwater
    Rhon Fitzwater |

    What code do I need to enter in my sidebar.php file to get this working? I installed the plugin and configured it without problems. But now I am stuck with how to get it up and running on my site. I have WP 2.1 installed along with PHP5. Any help would be appreciated.

  8. Rhon Fitzwater
    Rhon Fitzwater |

    So their is no using this theme without having a widget compatible theme? I would really like to use the theme I hacked together and just be able to add some code to my sidebar.php file.
    Any chance this can happen? Thanks…

  9. Lindsey
    Lindsey |

    What code do I use to get it to show on my site? I’m using WP

  10. John Boyd
    John Boyd |

    Ditto to what Rhon said. I hate widgets and there are still a whole lot of people who avoid them like the plague. Would be nice if this didn’t require a “idget” ready theme. I’m sure there is a work around and just a matter of time before somebody posts it. If I were talented enough, I would.lol

  11. 1988er
    1988er |

    Fatal error: Cannot instantiate non-existent class: simplexmlelement in /srv/www/vhosts/sunsonic.de/subdomains/ardiem/httpdocs/1988er/wp-content/plugins/wp-weather/wp-weather.php on line 204

    thats what happens when i try to display the plugin on my blog :(

  12. Marc
    Marc |

    Hi,
    Is there any possibility that the temperature will be shown in Celsius as well.

    Thanks in advance,
    Marc

  13. Rhon Fitzwater
    Rhon Fitzwater |

    Any chance the next version could have a 2-3 day forecast. It would be great if an effect like Yahoo.com has for their weather display could be used. I.E.: When you mouseover the current weather, it animated down to reveal the 3 day forecast.

  14. Rhon Fitzwater
    Rhon Fitzwater |

    Please add the option to view the forecast for the next few days.

  15. Mike
    Mike |

    Marc: it is actually very easy to add whatever you want to this and change to metric.
    Just specify more in the $forecast_url
    $forecast_url = 'http://xoap.weather.com/weather/local/' . $location_id . '?cc=*&dayf=' .$forecast_length .'&prod=xoap&par=' . $partner_id . '&key=' . $license_key . '&ut=C&ud=k&us=k&up=m&ur=m';

    I am also working on localizing this for Chinese right now, the xml is fairly straight forward for how to add things you want

  16. Mike
    Mike |

    Hey Matt, (or anyone who can help with this one)
    I am getting annoying errors, which range from annoying to admin-panel destroying.

    Here’s my code for the translations, as you may notice, it is not complete yet due to a lack of a full list of what each graphic actually represents (that would be helpful)
    http://www.notaclue.ktcs.net/dev/wp-weather.txt

    The error I am getting is this:
    Warning: Cannot modify header information – headers already sent by (output started at /PATH/public_html/wp-content/plugins/wp-weather/wp-weather.php:1) in /PATH/public_html/wp-includes/pluggable.php on line 329

    I am stumped as I am not great with php and have been away from coding for a few years, any help is greatly appreciated.

    Thanks

  17. Mike
    Mike |

    welp, i’m an idiot.
    if anyone else is getting this problem, edit .htaccess and throw in
    PHP_FLAG output_buffering on

  18. Sharon
    Sharon |

    I’m trying to get the weather widget working, and keep getting this error:

    WordPress database error: [Table 'hawaiibnb_com_2.wp_weatherxml' doesn't exist]

    Where can I find information on setting up this table in my database?

  19. yabbox
    yabbox |

    Hi,

    Do you have a time schedule for making this work for PHP Version 4.3.11? I have the same error on line 204 as 1988er.

    As it isn’t working on my server, is it worth the wait – does the service work for places outside the US?

    Thanks,
    Andy

  20. Paul
    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

  21. yabbox
    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

  22. Mitchell
    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.

  23. andy
    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?

  24. andy
    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 )
    )
  25. daniel
    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

  26. buffawhat
    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

  27. piecealava
    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?

  28. DesiTech
    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

  29. DesiTech
    DesiTech |

    I’m using Version: 0.2.1

  30. Richard Brown
    Richard Brown |

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

  31. Tony Kawakawa
    Tony Kawakawa |

    when i use wp-weather (downloaded from your site) the following error appears

    Local Weather
    Warning: strtotime() [function.strtotime]: Called with an empty time parameter. in /home2/tonykawa/public_html/wp-content/plugins/wp-weather/wp-weather.php on line 177

    TIA

  32. Marissa
    Marissa |

    I was able to get this working. I could still see WP-Weather after moving my WordPress installation to a different directory, however, it wasn’t actually installed. I removed and re-added it through the WordPress panel and it worked.

  33. Nita
    Nita |

    I was able to download and add the widget. however when I click on configure, the only option i get is Title: Local Weather. What am I missing?

  34. Nita
    Nita |

    hello:
    I was able to install this on my first blog. Now I have added this in the second blog on the sidebar. It is showing up fine, however the sidebar for this theme has background for each set(archive, category, etc..) and this background does not get applied to this plug-in.Which file do i have to alter so i can apply class to this plugin too so that it blends with the rest of the other stuff on the sidebar. unfortunately my blog is internal and am not able to post the link here.
    The theme link(Green Bug 1.1):
    http://themes.wordpress.net/page/7/?cats0=25&sortby=date&order=DESC&andor=OR&submit=Show
    Source code: Weather plugin has:

    Local Weather

    The other sidebar calendar has:

    Calendar…..

    Thanks for the help.

  35. Flahute
    Flahute |

    I’ve been getting the same “Table does not exist” error as Sharon (see comment dated May 28).

    When I enter the SQL query into myPHPadmin as below:

    CREATE TABLE flahute_com.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)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1;

    I get the following error:

    MySQL said:

    #1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'last_updated datetime NOT NULL DEFAULT '0000-00-00 00:00:00',

    Any ideas? What am I missing?

  36. Todd
    Todd |

    Hey there….I’m trying to get the widget to jive with the CSS of my WordPress theme, but I nothing I do is changing the text color. Is there a trick to this? I have a theme with a black background and I can’t get the text in the widget to be anything other than black.

  37. Veronica
    Veronica |

    I installed and activated the plugin. However, if I add it to the widget sidebar or edit the sidebar php file, an insane amount of errors appear down the page… how can I fix this?

  38. Taryn
    Taryn |

    I have the plugin widget running on my site, but can’t seem to get the css right so that it looks like the other widgets in my sidebar. Can you guide me in the right direction. Nothing I do to the css seems to make any difference. Thanks!

  39. me
    me |

    thank you for all your hard work, people should understand you are doing this for free and not expect the world! in any event, i just want to fix this: “The data from weather.com is cached in the database for one half hour to avoid unnecessary calls to the web service.” we live in a severe weather zone and 30 minutes can literally make the difference between life and death! thanks for your contribution!

  40. swiss420
    swiss420 |

    Hi first off thanks allot for your hard work. Works great on allot of my Blogs. On my sites I changed the weather pictures maybe someone is interessted? Found them to be more appealing to my site. http://start.swiss420.ch In that sense how about a theme collection on your site of different Weather Pictures to fitt the different Webstyles? Also language translations would be interessting. Always have to go in and change everything around with each new version. Would it be possible to share the work on your site? No Problem if you dont have time. Allready happy with all the work you put in. Just giving some Feedback from little old Switzerland. Note to everyone with Problems. Try Firefox with Firebug it will help you solve many format etc. related Problems.

  41. Alicia
    Alicia |

    What code would I need to insert to add this to a static page on my blog?

  42. AnotherPerson
    AnotherPerson |

    Great plug-in! Just a couple of suggestions:

    1. You might want to use .gif files instead of .png for the weather icons. Due to an error in IE 6 (and, I think earlier versions), .png files don’t display transparencies. I had to convert the files to .gifs (with photoshop) in order for them to display properly.

    2. It would be great to have the ability to display two different cities.

    Thanks!

  43. Alicia
    Alicia |

    Is there any way to place the three day forecasts side by side?

  44. stefan
    stefan |

    Was working fine for months, then suddenly, overnight, I’m running into the same error that DesiTech refers to above…
    Fatal error: Call to a member function on a non-object in …/wp-content/plugins/wp-weather.php on line 313
    So I updated to the most recent version of your plugin but I’m still getting the problem, only now it points to line 366 as the culprit. Was this ever resolved? I don’t understand why it would happen overnight like that. I’ve deactivated all the other plugins, but I’m still getting the error. Please help!

  45. PB
    PB |

    Same thing here as Stefan, all was fine yesterday and today I get the same error. Nothing has changed on the page.

    Fatal error: Call to a member function on a non-object

  46. PB
    PB |

    I updated and still get the error:

    Fatal error: Call to a member function on a non-object in /wp-content/plugins/wp-weather/wp-weather.php on line 366

  47. stefan
    stefan |

    yes, currently php 4.3.11, host reports no recent changes on the server side, so still baffled as to why it should work fine for months, then suddenly stop working… could be a weather variable that hasn’t occurred for the past several months?

  48. stefan
    stefan |

    woops, sorry — didn’t see that you had responded — but yes, I’m using version 0.2.7, and its still not working.

  49. Cassie
    Cassie |

    I’m getting the same error as stefan. Worked monday, stopped tuesday. At first on version 0.2.6, then updated to 0.2.7…same line is calling the error “$days = $day_forecast->children();” on line 366.

  50. PB
    PB |

    Thanks for the suggestion Matt, this was my problem.
    I had a ID and key, but forgot how I got them, so signed up fresh and all is good now.
    Except I have a stray bullet under the city name that I don’t remember seeing before.

  51. stefan
    stefan |

    Same here, thanks Matt, its working now. Great plugin, by the way, works with WordPress Mu allowing multiple city weather forecast from one install (where each sub-blog localized for a different city), out of the box, no tweaking required. Thanks again

  52. Dave
    Dave |

    Is there way of putting the weather into the body of a single page? I like it on the side pane but it takes up too much room so I wanted to create a weather page so I can have a long range forecast as it would have the space of the whole page.

    Also, I tired putting in the short php code mentioned at the top of this page but it removed all the data from my side panel and put it in the bottom of the body of the page.

  53. jay
    jay |

    hi ,
    i have one issue please help me to sort it out

    i have installed wpmu in my server for each place in india i have created one blog ,now i want to display the weather report of each blog (i.e weather report of a place corresponding to that particular blog )

    how to do this dynamic display of weather report in wpmu ?

    Thanks in advance

  54. GrillSgt
    GrillSgt |

    My server recently upgraded to PHP 5.2.5 and disabled fopen functionality. As such, this plugin no longer works for me. Has anyone rewritten the Get XML Query Results section (starts on line 238) using cURL functons? If so, can you please post the code snippet? Thanks.

  55. Erick
    Erick |

    I am getting this error too.
    Warning: fopen() [function.fopen]: URL file-access is disabled in the server configuration in …/blog/wp-content/plugins/wp-weather/wp-weather.php on line 237

    PHP version = 5.2.6
    Webserver = Apache

  56. John Deszell
    John Deszell |

    I recently developed a WP site locally on my machine running v 2.5 of WP. I just made the site live today using v 2.6 and when the plugin is activated I get this error:

    Invalid query: Table ‘db251978689.wp_weatherxml’ doesn’t exist.

    Table db251978689 is the name of my hosts database. I uploaded the plugin, activated it, added in all the Weather.com information and added the “” to my sidebar and that’s the error I get. I’m not sure if there is something I’m not doing right or what.

    Thanks for the help.

  57. David Ryder
    David Ryder |

    Nice plugin Matt! I wrote about it at teh blog telling my friends about the coolness :)

    Thanks!

  58. Rich
    Rich |

    Is there a way to have this add this to a page instead of template?

    Like:
    [weather_display]

  59. Rich
    Rich |

    Wow Matt thats great, thanks for the update. I did notice that if you use inlinephp method, it displays where you place the code on the page, the new version [weather_display] pushes it to top of page. I have looked yet at the styles yet.

  60. baron
    baron |

    hi. Thanks for plugin

    perfect.

    Regards

  61. John Leschinski
    John Leschinski |

    Is there a way to have the weekday name shown in the short form rather then long form?

  62. Matt Doran
    Matt Doran |

    I’ve signed up to weather.com’s XML service and have entered myu reg info into wp-weather, but the widget is displaying ,

    Currently: Ëš
    Feels Like: Ëš
    Hi: Ëš, Lo: Ëš

    rather than the actual info.
    All of the reg info is in correctly.
    Any suggestion?

  63. Matt Doran
    Matt Doran |

    Ignore me!
    I wasn’t using a valid city code.

    Great plugin!

  64. Jason
    Jason |

    I get this too often and it prevents the posts from loading, so unfortunately I am giving up this plug until I see an update roll out. :parse(): expat: not well-formed (invalid token) [4/4/1]

    Fatal error: Call to a member function on a non-object in /home/upfishin/public_html/wp-content/plugins/wp-weather/wp-weather.php on line 392

  65. Infinite Loop
    Infinite Loop |

    $fp = fopen($forecast_url,”r”); //do not check for success
    while (!feof ($fp)) //look for end of file, that may not exist
    $xml .= fgets($fp, 4096);
    fclose ($fp);

  66. wp-weather - WP Plugin Archive

    [...] WordPress Plugin wp-weather von Matt Brotherson holt Wetterdaten von weather.com per XML in das Blog. Zum Betrieb wird eine [...]

  67. Wordpress Weather Widgets for Local Blogs | Top Blogger

    [...] WP-Weather – I saved the best for last. This plugin harnesses the true power of weather.com to display a beautiful widget with all the weather information you could ever want. And I mean that. Out of all the plug-ins, this is the one I would use on my blog. [...]

  68. webosb
    webosb |

    Is there a way to make this plugin more dynamic in serving the weather… if I have several blog posts about several different locations, can I create a custom field called “Location” – where in the sidebar will check if the custom field is set, if so… display the weather for that location… I think that would be an awesome addition to this plugin.

  69. Charles Nibbana
    Charles Nibbana |

    Great widget, Matt! I added in geolocation to the widget so it will display the weather of visitors to my website, not the city or location I choose. If you would like a copy of the code let me know.

  70. BJJ
    BJJ |

    I am using your widget, installed, signed-up all fine. But it doesn’t really show the information my widget looks like this:
    *

    ,

    Currently: Ëš
    Feels Like: Ëš
    Hi: Ëš, Lo: Ëš

    weather feed courtesy of weather.com – thanks!

    While I have inserted th city code: ITXX0067 for Rome in Italy.

    Please help?

  71. Gus Lee
    Gus Lee |

    hey mate, i´m using your widget, it´s working fine.. thanks for giving us this..
    i have a question, my site is in spanish and i could translate a few words like HI, LO, FEELS LIKE.. but is there anyway i can replace the date and eg.MOSTLY CLOUDY? or that part comes from weather.com…? Thanks in advanced..

  72. Math
    Math |

    Hi,

    I have added wp-weather to my homepage but where do i find the ‘location id’ or the ‘city code’ for my city (Gothenburg, Sweden)?

    Thank you!
    BR
    Mathias

  73. bandicoot
    bandicoot |

    This probably ranks as the most stupid question here, but is there a simple way to download this plugin as a complete package? I went to http://svn.wp-plugins.org/wp-weather/trunk/ but all I find is a list of files and folders, and the only apparent way to get them seems to be to download them individually and then recreate the folder structure again before uploading to my site.

  74. ron
    ron |

    Just downloaded the plugin and installed and then registered at weather.com but did not receive an email with the keys from them. Is there anything I need to do to receive the keys?

    thanks

  75. Karen
    Karen |

    Great plugin ! Works perfectly.

    I was able to make a modifications to it to meet a need on my site – I have very limited coding knowledge – basic HTML, no php.

    Is there a way to add additional fields to the wp-weather manager page? I would like to be able to add text which needs to be updated weekly. Rather than go into the code each time to make the change, I was hoping there would be a way to add a field on the manager page for a date and a status.

    Any suggestions on how to do this would be greatly appreciated. My blog is beadsrock.com/blog where you can see your weather widget titled “Training Walks” and the first 2 lines which are the ones I would like to be able to update.

    Thank you very much for any help you can provide.
    K-

  76. mat
    mat |

    Hi
    I have installed the plugin, but I can’t see the admin page anywhere…how can I access it?
    Thanks

  77. Jos
    Jos |

    Hi,

    Great Widget, works just fine.
    How can i center the text in my sidebar?

    thanks,

    Jos

  78. Pat
    Pat |

    Where may I see it working? Can visitors select their city weather (ie) by zip code or is it set permanently by admin?

  79. Harish
    Harish |

    Matt,

    Is there a way to change the width of the output? I thought I could just update the width field on line 507 which reads:
    <input style=”width: 250px;” id=”weather-title” name=

    However, even when I changed 250px to something else…nothing happened. Any ideas?

    Thanks in advance.
    Harish

  80. Harish
    Harish |

    sorry about last post…found my issue. user error. ;-)

  81. pacdi
    pacdi |

    hi, everything was working fine, then all the sudden I get this error:

    WARNING isterxmlexpatnonvalid->parse(): expat: no element found [-1/0/1]

    Fatal error: Call to a member function on a non-object in /home/content/sitesite/html/site/wp-content/plugins/wp-weather/wp-weather.php on line 392

  82. lisa
    lisa |

    Yes, I too am looking for how to include multiple cities. I haven’t found one single solution for any type of weather widget. Could anyone help us with this? Thanks in advance!

  83. skee
    skee |

    Matt, I installed this plug in and it worked well till last week. Now I notice that the data is not refreshing unless we click on the “update options” button on the plugin page.

    Do you know why this might be happening? Should I try changing the refresh rate to .1 instead of .5 and see?

    Let me know how I can fix it.

  84. Trent Harlan
    Trent Harlan |

    This widget crashes on me every once in a while and I can’t figure out why, it takes out all of my other widgets that are beneath it on the sidebar and my footbar – big long exception code. I can fix it immediately by going into the admin settings and just refreshing the settings – then it’s fine. Any idea why this happens?

  85. Lincoln
    Lincoln |

    I love this plug in, its the most elegant solution for adding weather to a site. I want to add it to my template and want it to be Horizontal instead of vertical, any suggestions for updating the css it make that work?

    (If you view my site, im hoping to feature it across the very top of the page and fit it to the same width as my template.)

    Later ill change the graphics to match my theme.

  86. Lincoln
    Lincoln |

    Now, after reading it may not be as simple as a css update to display horizontal, any suggestions will be appreciated. Looks like paragraph and line break tags are what puts this in line, not sure how i could make it sidways…

  87. Andy Jackson
    Andy Jackson |

    Just wanted to second what Trent said. Around ever 4/5 loads/refresh my site will crash out and it replaces wp-weather with this:

    —-
    Warning: fsockopen() [function.fsockopen]: unable to connect to xoap.weather.com:80 (Connection timed out) in /home/SITENAME/public_html/wp-includes/class-snoopy.php on line 1142
    alert(‘Could not connect to lookup host.’)
    —–

    Any ideas?

  88. Kevin
    Kevin |

    I’ve installed this plugin on WP 2.7 and WP 2.8 and am not able to change the title of the widget – no matter what I put in the widget title area it always displays “The Weather” – any ideas of how I can get this to say something else?

  89. Kevin
    Kevin |

    I’ve tried it on 3 WP installs – one totally fresh – installing plugin right after wordpress. This is the only widget it happens to.

  90. Windforce
    Windforce |

    There is a bug in your code. When you use $query = “INSERT INTO $table_name VALUES (‘$xml_url’, ‘$xml’, ‘$datetime’)”;
    $result = $wpdb->query($query) or die(‘Invalid query: ‘ . mysql_error());
    to insert the weather data into mysql, you should notice that there may be “‘” in the $xml(on example is Xi’an, which is the city I am now at), so you should replace all “‘” in $xml with “\’”.

  91. Joe
    Joe |

    Hey Matt!

    Thanks!! The wp-weather is amazing.
    Can i make a question!? I hope so!!
    I’m using the wp-weather and I translate a few words. Just Hi, Lo, Feels Like… ok.. so, i wanna know if i can replace the date and the weather , translate monday, tuesday… cloudy…
    Thank you man!!
    Great job!!

  92. Derek
    Derek |

    Hi Matt

    I added wp-weather and now have :

    Fatal error: Call to a member function on a non-object in /usr/www/users/theoar/wp/wp-content/plugins/wp-weather/wp-weather.php on line 394

    Advice?

  93. Kev
    Kev |

    The config link to setup this widget does not work.

    I have the partner ID and the license key but no idea how to set this up now. I also know the City code.

    Please help or link to a config page for this widget.

    Cheers,
    Kev

  94. Anz
    Anz |

    Hi Matt !
    Great plugin. Just what I was looking for
    But there is a small problem. I live outside the USA and some times weather.com doesnt display weather and so for my city it shows N/A

    However the plugin doesn’t display the N/A image which is bundled with the other plugin files (just like how it does for sunny and cloudy)
    So the widget just displays this:

    Currently: Ëš C
    Feels Like: Ëš C
    Hi: Ëš, Lo: Ëš

    It looks very odd on my sidebar..Any ideas ??

  95. Lucian
    Lucian |

    Multiple cities function would be really great.

  96. DGH
    DGH |

    I have PHP 5 and wordpress 2.8.1, will this widget work? Thanks!

  97. DGH
    DGH |

    Signing up to weather.com’s XML service is nothing short of ridiculous. Where are the codes for the service? They provide zero instruction as to what happens after they throw 10 or more + ads at you!

  98. DGH
    DGH |

    I forgot to mention that I checked my email for the info as well, and nothing.

  99. kosma
    kosma |

    How can I get the partner_id and licence key?

  100. laerte
    laerte |

    Hi there,

    I just wanna know why sometimes show this message:

    Fatal error: Uncaught exception ‘Exception’ with message ‘String could not be parsed as XML’ in /public_html/site/wp-content/plugins/wp-weather/wp-weather.php:306 Stack trace: #0 /public_html/site/wp-content/plugins/wp-weather/wp-weather.php(306): SimpleXMLElement->__construct(”) #1 /public_html/site/wp-content/plugins/wp-weather/wp-weather.php(295): parseSimpleXml(”) #2

    Please, if you know.. mail me.
    Thanks again :)

  101. Lauro Roger
    Lauro Roger |

    Hi, I’m looking for where I can edit the alt texts for Rain, Farly… etc.
    can you halp me?

  102. Steven
    Steven |

    Hi,
    I’ve installed this plug-in but the weather only shows the information from when it is last refreshed.
    Is there a way to set this to automatically refresh whenever someone loads the page, or automatically in the background every 10 minutes or so?

    Thanks

  103. Pad
    Pad |

    Laerte, I had the same issue, didn’t have time to invest though, I just switched off the plugin. Maybe the provided xml format has changed, I don’t know. If anybody has a clue…

  104. Pad
    Pad |

    Thanks for the answer, i must confess i haven’t taken time to investigate this issue so far ;)

  105. Barb
    Barb |

    Hi, sorry to be stupid, but I’ve signed up with weather.com and for the life of me I can’t figure out where to find the Id and license number. Can you help me?

  106. Barb
    Barb |

    Thanks Matt, I did receive the email, but it says nothing about the key. I’ve found a number in what they sent me I think is the id – it says PID=XXXXXXXXXX, but nothing that says it’s a license key. How many digits is it and does it have a prefix.

    Thanks

  107. Barb
    Barb |

    Oops, sorry Matt, must have been a glitch at weather.com, received yet another email tonight (two days after registering) with the license. Thanks for your help.

  108. paul
    paul |

    I’m working on an inherited web site that uses this plugin, and it’s been working great, but we’ve now had a request to include wind information (we’re an outrigger paddling club and wind has a huge impact on our practices). Is there an easy way to add that bit of information? Otherwise, the plugin is great.

    aloha.

  109. Maurizio Delladio
    Maurizio Delladio |

    I can’t use Celsius. I select “metric” in setting but the temperature is F…

  110. Paul
    Paul |

    Before the update I was able to display the weather in a template using,

    weather_display();

    but no longer.

    Is there a way to display the weather in a template without Widgets?

  111. Paul
    Paul |

    Excellent! Thanks Matt, great plugin.

  112. Benjamin
    Benjamin |

    Hey Matt, Thanks for making this for everyone. Can you help me to change the color of the text inside the widget? My users are complaining it’s hard to see (because of my theme the grey writing is on black)
    http://www.buttebasinduckclub.com Thank you!

  113. Benjamin
    Benjamin |

    Thanks for the info! Could you tell me where those 3 lines of code should go in the css template? Thank you very much Matt.

  114. Noah
    Noah |

    matt, what am I doing wrong? The plugin is installed, obviously, with the Partner ID and License Key from weather.com. I’ve placed the widget on my sidebar and this is what the sidebar displays instead of the forecast:

    Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: Entity: line 1: parser error : Start tag expected, ‘<' not found in /home/content/h/i/c/hickoryridge1/html/wordpress/wp-content/plugins/wp-weather/wp-weather.php on line 254

    Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: HTTP/1.1 200 OK in /home/content/h/i/c/hickoryridge1/html/wordpress/wp-content/plugins/wp-weather/wp-weather.php on line 254

    Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: ^ in /home/content/h/i/c/hickoryridge1/html/wordpress/wp-content/plugins/wp-weather/wp-weather.php on line 254

    Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML'

  115. Noah
    Noah |

    Matt,
    You were right, I just waited the 30 minutes. Looks really good – - now to css to customize. Thanks and nice work.

  116. Matija
    Matija |

    Hi Matt –

    Thank you for the excellent work making this plugin, and maintaining it so that it works! Truly great.

    I’m wondering if there is any documentation on how to add / remove types of data (ie. high temp, low temp, etc..) in the widget?

  117. Matija
    Matija |

    ps. I realize Hi and Lo are already on there, but I meant stuff like P.O.P. (it’s for a golf course, so probability of precipitation is important :)

  118. Matija
    Matija |

    Matt – thanks for the very fast response.

    I just looked at the XML file, and it looks pretty straightforward. For example, adding:

    $xml->dayf->day->part->ppcp

    ..to the php file gives me precipitation as a number. I can format it myself. The only problem, of course, is if there are any updates to the plugin in the future (likely). Anyway, this is a good stopgap temporarily.

  119. Gerge
    Gerge |

    please i mean that how i can have wp-weather in french

  120. Cynthia
    Cynthia |

    I’ve signed up with weather.com but it has been 6 hours and I’ve not received a message from them with the key and ID numbers. Does this plugin still work with their feed or are they just very slow to respond? We’re expecting a big snow storm here tonight and I’d like to get this up on a community blog.

  121. Arlindo Pinto
    Arlindo Pinto |

    Hi!
    I’ve translated the plugin to Portuguese, but cant make it work!
    Whats the secret?
    TX
    Merry Christmans!

  122. shoaib
    shoaib |

    thnx a lot for such a nice plugin,m collecting cool things for my new design and this plugin is really cool .

  123. Csaba
    Csaba |

    Hi,

    I use wp-weather, but I set only cities with ZIP like Frisco. I would like to set Pecs/pogany, Hungary but dosen’t work. Why?

  124. Diyana
    Diyana |

    Added the plugin widget, it appears on my website, but no weather details. Where do I insert my country in order to make it appear?

    Thanks!

  125. diyana
    diyana |

    Is there no location ID for Kuala Lumpur, Malaysia?

  126. Diyana
    Diyana |

    Ahh, it works!

    Coolness!

    Thanks very much!

    :)

  127. Chris
    Chris |

    Hi Matt

    I ‘m wanting to use you plugin but in a different way to how it is currently designed, and wondered if you could tell me whether its possible.

    I have a blog that reviews walking locations, and therefore I don’t want to set a location as such. I want the location to be different for every post. Is it therefore possible to call the function with a different location setting…
    - show the weather for Somerset here http://tr.im/LRCY
    - show the weather for Sheffield here http://tr.im/LRD9

    Much appreciated

  128. Chris
    Chris |

    Thanks Matt

    I’ve already tried playing around a bit, removing the Location ID in the settings menu, and then trying to add it in the post directly using:
    [weather_display location_id=UKXX0446]

    Excuse my lame attempts… but it didn’t work :(

  129. Elena Coen
    Elena Coen |

    Please tell me where I can download the two plugins. The Analytics folder is empty and I can’t find the Weather one. Thanks so much, Elena.

  130. Craig
    Craig |

    Hey Matt! Great plugin/widget! Just one thing though! I’m wanting the 64×64 graphic to be placed to the right of the forecast and not below it. Is this possible? Could you tell me how to do this? Much appreciated!

  131. Rodger Gallagher
    Rodger Gallagher |

    Until the last two recent upgrades to the plugin, everything worked fine.

    Now it starts showing the weather one day in the past.

    If I go to the settings page and click on ‘Save Changes’, without changing anything then the correct weather day is shown.

    My website is in the Pacific/ Auckland time zone and my server is Dreamhost in the US.

  132. Craig
    Craig |

    Thanks, Matt. I found the line of code of the small graphic, but how do I change the position of the graphic to the right of the forecast? Do I add properties inside the img tag? I’m not too familiar with PHP :-/

  133. Chris
    Chris |

    Matt

    Since the last upgrade (3.6 I think), I’ve started getting errors. Annoyingly I copyed the error but I’ve since copied some other text :(

    From memory it said something like:
    Duplicate location UK0000044 Invalid XML

    To fix it, I went back into the plugin, and re-svaed the details, but this has to be done everytime I add a new post.

  134. Chris
    Chris |

    Matt

    Got the error code as for some reason its just started showing again, without any updates or changes since I thought I’d fixed it:

    Invalid query: Duplicate entry ‘UKXX0446′ for key 1

    Depending which page I load, the UKXX0446 changes according to the location.

    I’ve had to disable the plugin for now so my site continues to work.

  135. Rodger Gallagher
    Rodger Gallagher |

    Hi Matt

    Thanks for doing the lates update. As per the comment for Chris, I have the same rror message:
    Invalid query: Duplicate entry ‘NZXX0013′ for key 1

    When I go to the Settings page and click, ‘Save’ without updating anything, it then works OK.

    Regards,

    Rodger

  136. Ali
    Ali |

    Hi. I’m working on a WordPress site and I’l like to use your widget. I obtained the partner id and license key from Weather.com, but get this in place of where the widget should be…

    WARNING isterxmlexpatnonvalid->parse(): expat: no element found [-1/0/1]
    Incomplete forecast XML received.
    Please refresh your browser.

    Any thoughts on how to resolve this?
    Thanks!

  137. leo b
    leo b |

    is there php code to hard code the weather applet?

  138. PeSi
    PeSi |

    I installed wp-weather plugin, create an account on weather.com and got PartnerID and License Key. But I still see a message: “Incomplete forecast XML received.
    Please refresh your browser.” You know what I am doing wrong?

  139. Velnias
    Velnias |

    Hi, what about the localisation features? I trabnslated the files in Localisation folder, but still, i can’t see my translation.

  140. Fehim TaÅŸtekin
    Fehim TaÅŸtekin |

    Thank you for fantastic plugin
    i have allready translated files in to turkish (localisation folder) but i can see anything
    thank you

  141. Velnias
    Velnias |

    Hi, again. Translation works fine now. But there are some Things that are not in translation file, like Wind information. :)
    Also is it possible to get Wind speed in km/h instead oh MPH?

  142. Velnias
    Velnias |

    Or You could add POT file, so i could add those strings that are missing by myself.

  143. Fabrice
    Fabrice |

    Hello,

    I am looking for a plugin able to save the weather in a mysql table each hour (for example). Is your plugin easily updatable do do that ?

    Thanks a lot.

    Fabrice

  144. kopulex
    kopulex |

    Hi, I’ve made Czech translation of your localization file WP-Weather’s plugin.

  145. pedro
    pedro |

    Where can I find the Location id (zip code or city code) of my city (montevideo, Uruguay)

  146. Velnias
    Velnias |

    Hi, i found a little bug in this plugin. When switching betweeen Metric and standard units, it does not change MPH to km/h. The acctual data is changed but the name of the units are not.

    Also, it shoud be not “standard” but “imperial” i suppose.

  147. Velnias
    Velnias |

    A suggestion, it would be nice if plugin could select the weather information by reader location. :)

  148. John
    John |

    Hi,

    I’m getting this message frequently, not all the time. Any ideas on what maybe causing this?

    Thanks,

    Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 500001 bytes) in /home/fleafm/public_html/wp-includes/class-snoopy.php on line 894

  149. Lincoln Barbour
    Lincoln Barbour |

    Is there anyway to add the weather in the WordPress Loop. I want it to be in the header file, not in a post or page. The short tags don’t work in the template files.

    Thanks!

    Lincoln

  150. Triple Moons Exotic
    Triple Moons Exotic |

    alert(‘Could not connect to lookup host.’)

    This is the error I’m getting when using the widget. I have entered the Partner ID & License Key three times and no change. It is currently disabled on my website as it breaks the page.

  151. Leif
    Leif |

    Any idea why I get two copies of the plug-in listed in the wordpress plugin admin page? One shows as activated and one not. Both are the same version ,and if I uninstall wp-weather both disappear. WP 3.0.4 with wp-weather 0.3.11

  152. George
    George |

    Would be successful if it shows a way to improve the graphics using CSS

  153. Gfisk
    Gfisk |

    Hello I updated to 0.4 (1,358 files – 11.5megs) today using WP Auto-upgrade and get errors. I’m running WordPress 3.05, Arras Theme 1.4.3.1.

    I’ve deactivated, installed and re-installed and still get errors:

    +++++++++++++
    Warning: closedir(): supplied argument is not a valid Directory resource in /home/site/public_html/wp-content/plugins/wp-weather/wp-weather.php on line 163

    Warning: sort() expects parameter 1 to be array, string given in /home/site/public_html/wp-content/plugins/wp-weather/wp-weather.php on line 164
    +++++++++++++

    I de-installed and rolled back to .3.8 successfully (171 files 1.7megs)

    Probably just me or my config but I’ve been running the plug with no issues until this release.

  154. Jim Clark
    Jim Clark |

    I’m getting the exact same error as the previous poster. How can I get beck to the previous version? Eek!

  155. Gulliver
    Gulliver |

    Hey Matt,

    with 0.4 I get the same error:
    Warning: closedir(): supplied argument is not a valid Directory resource in …/wp-content/plugins/wp-weather/wp-weather.php on line 163

    Warning: sort() expects parameter 1 to be array, string given in …/wp-content/plugins/wp-weather/wp-weather.php on line 164

    Could you release a fix or shall we rollback?

    Kind regards,
    Gulliver

  156. Jim Clark
    Jim Clark |

    How can I rollback? I need this to work. Please answer.

  157. Bob Sapp
    Bob Sapp |

    Hello! I am having a problem with the new update. When I try to set the weather to display 2 days, it shows 5 days. I have tried this on 4 different themes, it appears to be the WordPress 3.1 update that it is conflicting with.

    Thank you for your time, and great plugin btw!

  158. Bob Sapp
    Bob Sapp |

    Thanks for the quick response! You are the (weather) man!

  159. Gfisk
    Gfisk |

    Thanks, just did .4.3 and it worked great!

  160. Jorge
    Jorge |

    Excellent plugin, but the only thing missing is that when the weather is not available in any city to display a message and an image “not available at this time”, because for example in my city when there is no result I get tornado weather and could be cause for some misunderstanding.
    The rest is fine successes.

  161. Rodger Gallagher
    Rodger Gallagher |

    Upgraded to 4.3 and using [weather_display] in page now shoots plugin output to top of page not matter where I have it on the wordrpress page. I’ve changed back to 3.8 which works as it should. Thanks.

  162. Ryan
    Ryan |

    I recieved the following error activating the plugin:

    Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in /hermes/web10/b2544/pow.rbickel/blog/wp-content/plugins/wp-weather/wp-weather.php on line 951

  163. Ryan
    Ryan |

    I did an automatice update and got the following when I tried to activate the plugin:
    Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in /hermes/web10/b2544/pow.rbickel/blog/wp-content/plugins/wp-weather/wp-weather.php on line 957

    I’m going to download the new version and try doing it manually.

  164. Ryan
    Ryan |

    I deleted the auto update and uploaded manually. When I activated the plugin I got this fatal error:

    Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in /hermes/web10/b2544/pow.rbickel/blog/wp-content/plugins/wp-weather/wp-weather.php on line 951

  165. Ryan
    Ryan |

    Ignore the last comment. I accidently uploded .3. When I uploaded .4 I recieved the same error as when I did an automatic update “….line 957″

  166. Louis
    Louis |

    I just upgraded to .4.4 and get this error on reactivation:

    Fatal error: Call to undefined function home_url() in /home/content/88/5919788/html/vip/wp-content/plugins/wp-weather/wp-weather.php on line 265

  167. alghero
    alghero |

    Hey, nice plugin. I am using on my wordpress website. I’d like to ask if there’s a possibility of adding translations.
    Thank you very much.

  168. Gabriel Yeung
    Gabriel Yeung |

    Can it show Hong Kong weather…

  169. Carlos Giles
    Carlos Giles |

    Hello Matt,

    Thank you for this awesome plugin, it is really useful. I have 2 questions:

    How the translation works? I have created my own files wp-weather-es_ES.po/mo version and copied to wp-weather/localization (my wordpress is configurated in this language) but nothing happens all remain the same.

    The seccond question: Is that is there any way to call the function directly by php? I want to add it directly to the sidebar of my theme without using widgets. Just one more: Is there anyway to output only the icon and the currently temperature?

    Thank you for all your support

  170. Carlos Giles
    Carlos Giles |

    @Matt, about the translation, after some experiments I have figured out how it works, I still have the other Question pending about the php direct call, and where to customize the output to only show the image/icon of the current conditions and the current temperature. I dont need any other info because I’m going to put it at the top of the page. I can put the thank you to weather tag under the icon.

    Thank you for your kind support

  171. Carlos Giles
    Carlos Giles |

    Ty Matt, I’m going to make a donation as soon as I get payed :) . Just 1 thing the function that you are making reference in PHP5 parseSimpleXml is on line 599.

  172. Saba
    Saba |

    Hi Matt,

    I’m trying to center the widget on my site http://discoversaba.com.

    How can I do that? I tried just using the call codes instead of the widget though no luck.

    Hope to hear from ya soon.

    Cheers!

  173. Kusadasi
    Kusadasi |

    I am trying to put this on my site. but I can not get it to work.

  174. Hiroaki Sakurada
    Hiroaki Sakurada |

    Hello Matt,
    Thank you for this awesome plugin.
    I tried to translate your static contents to Japanese.
    But I could not translate all of the weather and the moon phase information that aggressively change from weather.com. (I translated a few words and success in my site. (Only Japanese display))
    Do you have all these information? if you have, I would like to translate it to Japanese.
    Regards!

  175. Merlin Mason
    Merlin Mason |

    Hi Matt,

    Thanks for all your effort in the development and support of this plugin! Was wondering if you could help me.

    I’m trying to get your plugin up and running on a site I’m working on otesports.com.au – had everything working fine on MAMP and trasfered it over and I’m getting this error message:

    Fatal error: Cannot use object of type WP_Error as array in /home/otesport/public_html/wp-content/plugins/wp-weather/wp-weather.php on line 273

    I thought perhaps I couldn’t use the same ID and key on MAMP and the live site, but I got new versions and it’s still not working. Any ideas?

    Thanks for your time!

  176. Andrew
    Andrew |

    How do I customize it?

  177. betsy21
    betsy21 |

    Is there anyway to output only the icon and the currently temperature?

  178. Jeff Frey
    Jeff Frey |

    Hi Matt – I’ve been using your plugin on my site for many years and I must say that it has been great! I just moved from Delaware to Illinois and when I change Zip Codes or area codes in my local area I get an Invalid Query message. I’ve tried the following codes: 61856, 61821, USIL0209, and USIL0794. As soon as I change to other zip codes in areas I used to live it works fine. Can you see what may be causing these errors? Thanks for your help!

  179. sardegna
    sardegna |

    This wordpress plugin is just great! I am wondering how I can use it with multiple locations (I need 4 main cities) on the same page.
    Thanks for your help.

  180. Hank22077
    Hank22077 |

    I still have found nothing to make it display horizontally, instead of vertically.

  181. Crys
    Crys |

    Hi Matt..

    How does one go about centering weather graphics and text within the widget? Everything gets pushed to the left side and looks wonky. Or, alternatively maybe there’s a way in which the graphics of sun/moon can be moved to the right hand side adjacent to the text for a more balanced feel?

    Love the widget otherwise!

    Cheers…

  182. Miss M. Turner
    Miss M. Turner |

    Please don’t let the plug-in die! I really like having the weather on my blog and will miss it. :(

    Thanks for a great plug-in and please consider making a new one now that weather.com is being greedy.

  183. Len S
    Len S |

    We’d like to see the plugin re-written, too.
    Thanks for the past months of usage!

  184. stefan
    stefan |

    great plugin while it lasted. Hope it gets resurrected!

  185. Phillip
    Phillip |

    Hello, is there some way of making this plugin work if I signup for the API?
    Is there somewhere in the plugin where I can replace a URL, or a key?

    Thanks for any help

  186. Vietnam Travel Blog
    Vietnam Travel Blog |

    Why I can not show it on my site? after a period of connection problem with weather.com I decided to deactive this plugin, some recent days, I active it back but no date show on. Any advice? thanks.

  187. Andrew
    Andrew |

    What? It’s working again?

Comments are closed, but trackbacks and pingbacks are open.