wp-weather
PLEASE READ!
It looks like weather.com will cease to offer free forecast feeds as of November 15. I had a look at the ‘offerings’proposed in the email I received below, but I’m not paying $20/month for weather data. Looks like I’ll have to find a new provider for weather information and re-write the plugin to use that….or let it die.
Dear Registrant:
We are writing to you because our records indicate that you are a registered user of the weather.com® XML Data Feed (http://xoap.weather.com.)
As a valued subscriber, we want to let you know that our data feed service offerings are changing. Beginning the week of October 10th, 2011, we will be launching a new subscription service, The Weather Channel® API.
The Weather Channel® API is a subscription offering created by The Weather Channel specifically to provide developers with access to an easy to use weather data feed that they can use to power commercial applications across a variety of technology platforms.
Key Features include:
• access to the most comprehensive global forecast set available anywhere
• white label solution (no logo; no links)
• weather data provided by weather.com®
• data may be accessed in either XML or JSON format
• leverages a world class cloud-based Infrastructure
• product support for the world wide web, the mobile web, downloadable web / PC applications, and downloadable mobile phone / smart phone applications
• multi-language support for English, Spanish, French, German, & Portuguese
What this means to you:
In order to have access to an XML data feed from The Weather Channel, you will need to subscribe to The Weather Channel® API. This letter serves as formal notice to you that your access to the weather.com® XML Data Feed will terminate at midnight Eastern time on November 15, 2011. To evaluate The Weather Channel® API as an alternative to the weather.com® XML Data Feed, please go to http://portal.theweatherchannel.com.If you have questions concerning this notice, you can call The Weather Channel at (770) 226-2329 or e-mail us at theweatherchannelapi@weather.com.
We look forward to continuing our relationship with you.
Best Regards,
Scott H. Zucker
Director, Revenue Management & Optimization
The Weather Channel, LLC
Phone: (770) 226-2329
Facsimile: (770) 226-2966
E-mail: theweatherchannelapi@weather.com
Web: http://portal.theweatherchannel.com
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:

- 月光沼泽-MoonSwamp
- WordPress Plugins Database » Plugin Details » wp-weather widget
- WP Plugins March 27, 2007 « PolarityII
- daveryder.com [the official dave ryder website] » Blog Archive » WP-Weather Manager
- wp-weather - WP Plugin Archive
- Wordpress Weather Widgets for Local Blogs | Top Blogger
- En.nicuilie.eu Blogs » Top 1000 WordPress Plugin Authors
- Top 1000 WordPress Plugin Authors « Metode de promovare
LinkedIn
#1 by moonswamp on March 2, 2007 - 4:25 pm
Thanks for your plugin,I ‘ve collected it on my blog here
http://www.tearsea.com/?p=632
#2 by Fred Greco on March 2, 2007 - 11:12 pm
Is there any possible work around to use this plugin if your server only has PHP4?
#3 by Matt Brotherson on March 3, 2007 - 8:45 am
I will look into a way to parse the xml that will work under PHP4. Hopefully, there is an easy was to do so as SimpeXML really makes x-path navigation easy. Stay tuned for updates.
#4 by Jim on March 3, 2007 - 4:40 pm
Is there a way to show more than one city location?
#5 by Matt Brotherson on March 3, 2007 - 5:15 pm
Not currently. I’m sure it is rather simple to do so, but how to display it might be a challenge.
#6 by Hex on March 4, 2007 - 9:16 am
Is there any way..to use this plugin without widgets?
#7 by BeStMaker on March 4, 2007 - 3:54 pm
Nice, i gonna try this! thanks!
#8 by BeStMaker on March 4, 2007 - 6:47 pm
i have a problem with this plug, i have the ID number and the licence key but not the other required fields… and when i update the options my blog “crash”.
Check in this pls
http://img95.imageshack.us/img95/4548/clipboard01fl2.jpg
thanks
#9 by Matt Brotherson on March 4, 2007 - 6:55 pm
Looks like you’re using this plugin on PHP4. I’m currently investigating a solution for PHP4 users, but at this moment, the plugin only works on PHP5 with SimpleXML.
#10 by BeStMaker on March 5, 2007 - 1:38 am
#11 by Rusty Miller on March 7, 2007 - 3:41 pm
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.
#12 by Matt Brotherson on March 7, 2007 - 4:00 pm
Rusty: That file is included in later versions of WP. I am utilizing it to create the database table that stores the weather data. The WP reference for the methods I am using is here. I suggest you upgrade to 2.1.2 as I can not support below 2.1 and there are many security fixes in the new code.
Cheers.
#13 by Rhon Fitzwater on March 15, 2007 - 9:30 am
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.
#14 by Matt Brotherson on March 15, 2007 - 10:33 am
Rhon – you need a widget compatible theme. Upon selecting a widget compatible theme from the presentation tab, you should see a new option on that page for Sidebar Widgets. This is where you drag and drop the wp-weather widget to your sidebar.
Cheers.
#15 by Rhon Fitzwater on March 15, 2007 - 6:19 pm
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…
#16 by Lindsey on March 20, 2007 - 3:04 pm
What code do I use to get it to show on my site? I’m using WP
#17 by John Boyd on March 20, 2007 - 6:32 pm
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
#18 by Matt Brotherson on March 20, 2007 - 7:43 pm
I found a simple solution – if you’d like to include this, assuming you’ve already done the configuration part, insert this anywhere in your template.
<?php if ( function_exists('weather_display')) weather_display(); ?>#19 by 1988er on April 13, 2007 - 6:46 am
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 204thats what happens when i try to display the plugin on my blog
#20 by Matt Brotherson on April 13, 2007 - 3:51 pm
1988er — you don’t have php5 if you get that error. The next release of this plugin will check for it upon activation and not allow you to activate if the host is not compatible.
#21 by Marc on April 15, 2007 - 1:30 pm
Hi,
Is there any possibility that the temperature will be shown in Celsius as well.
Thanks in advance,
Marc
#22 by Rhon Fitzwater on May 1, 2007 - 1:22 pm
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.
#23 by Rhon Fitzwater on May 7, 2007 - 9:17 am
Please add the option to view the forecast for the next few days.
#24 by Mike on May 19, 2007 - 2:16 am
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
#25 by Mike on May 22, 2007 - 7:10 am
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
#26 by Mike on May 22, 2007 - 7:17 am
welp, i’m an idiot.
if anyone else is getting this problem, edit .htaccess and throw in
PHP_FLAG output_buffering on
#27 by Sharon on May 28, 2007 - 9:02 am
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?
#28 by Matt Brotherson on May 28, 2007 - 12:51 pm
Sharon – your wordpress version might not have the required dbDelta function. If you can log into your phpmyadmin and execute this sql, you should be set.
#29 by yabbox on June 15, 2007 - 11:30 pm
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
#30 by Paul on June 19, 2007 - 12:41 pm
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
#31 by yabbox on June 19, 2007 - 9:24 pm
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
#32 by Rolando on July 25, 2007 - 5:12 pm
Thanks for this cool plugin!
#33 by Mitchell on August 1, 2007 - 9:45 am
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.
#34 by andy on August 6, 2007 - 2:38 am
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?
#35 by Matt Brotherson on August 6, 2007 - 9:03 am
Andy, your wordpress version might not have the required dbDelta function. If you can log into your phpmyadmin and execute this sql, you should be set.
#36 by andy on August 6, 2007 - 8:24 pm
thanks again Matt. I got it working by adding the following SQL (excluding line 6).
#37 by daniel on August 7, 2007 - 11:59 pm
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
#38 by Matt Brotherson on August 8, 2007 - 10:23 am
Daniel,
I’ve updated this plugin to support metric units. Overwrite the old files with the version above and go to the options page for the plugin. Select metric for the units and save.
I do believe you can put any location code in the options page and have it display appropriately.
Cheers.
#39 by buffawhat on August 10, 2007 - 8:40 am
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
#40 by piecealava on August 10, 2007 - 11:09 am
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?
#41 by DesiTech on August 20, 2007 - 10:43 am
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
#42 by Matt Brotherson on August 22, 2007 - 10:00 am
I haven’t used WPMU for any testing. Which version of wp-weather are you using as my line numbers aren’t matching yours.
#43 by DesiTech on August 27, 2007 - 9:05 am
I’m using Version: 0.2.1
#44 by Richard Brown on September 13, 2007 - 9:13 am
Unfortunately I will have to decativate the plugin because I can’t get it working without widget support – a shame.
#45 by Tony Kawakawa on September 20, 2007 - 3:05 am
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
#46 by Marissa on September 26, 2007 - 9:42 pm
I’ve added the widget and selected all the options, but it’s just not showing up.
http://www.scwd.us
#47 by Marissa on October 14, 2007 - 2:00 pm
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.
#48 by Sabo on October 30, 2007 - 5:40 pm
Is there a way to make the plugin grab a variable, so lets say depending on the category of the site, it displays the weather, e.g.
http://www.domainexample.com/category/new-york/
Show the New York weather.
Regards!
#49 by Nita on November 20, 2007 - 1:33 pm
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?
#50 by Nita on December 7, 2007 - 11:22 am
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.
#51 by Flahute on January 2, 2008 - 6:53 am
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?
#52 by Todd on January 8, 2008 - 5:28 pm
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.
#53 by Veronica on February 5, 2008 - 7:48 pm
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?
#54 by Matt Brotherson on February 5, 2008 - 8:31 pm
Not sure what errors you’re getting so can you put up a link?
#55 by Taryn on February 7, 2008 - 11:15 am
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!
#56 by me on March 2, 2008 - 4:34 am
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!
#57 by Matt Brotherson on March 4, 2008 - 8:32 pm
Should you wish to modify the default cache age you will need to edit the plugin file. Line 218 should read:
Edit this interval to specify what portion of an hour to keep the data for.
#58 by swiss420 on April 3, 2008 - 2:37 am
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.
#59 by Gene on April 27, 2008 - 1:58 pm
Good idea for a plugin and widget but why not link to The Weather Network for users that live outside the US?
#60 by Matt Brotherson on April 27, 2008 - 5:37 pm
Weather.com can accommodate international cities. Just find your appropriate city code.
#61 by Alicia on April 30, 2008 - 1:36 pm
What code would I need to insert to add this to a static page on my blog?
#62 by AnotherPerson on May 5, 2008 - 12:48 am
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!
#63 by Alicia on May 5, 2008 - 9:44 am
Is there any way to place the three day forecasts side by side?
#64 by Matt Brotherson on May 5, 2008 - 5:24 pm
Alicia – out of the box this functionality is not supported. You can edit the file to remove the paragraph and line break tags.
#65 by stefan on May 6, 2008 - 2:28 pm
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!
#66 by Matt Brotherson on May 6, 2008 - 3:41 pm
Stefan – can you confirm if your host is running php 4? The author of the class i use in php 4 instances has mentioned this error in his documentation but i can not reproduce in my own environment.
#67 by PB on May 6, 2008 - 6:02 pm
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
#68 by Matt Brotherson on May 6, 2008 - 6:16 pm
weather.com changed their url parameter format this morning. Version 0.2.7 fixes this. Without this version of the plugin the forecast data will be missing from the weather.com xml feed. Please update to this version and report if it fixes your issue.
#69 by PB on May 6, 2008 - 8:02 pm
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
#70 by stefan on May 6, 2008 - 9:49 pm
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?
#71 by stefan on May 6, 2008 - 9:53 pm
woops, sorry — didn’t see that you had responded — but yes, I’m using version 0.2.7, and its still not working.
#72 by Cassie on May 7, 2008 - 3:19 am
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.
#73 by Matt Brotherson on May 7, 2008 - 9:11 am
Do you guys have a valid license key and partner id saved in the settings? I know previously they let you access the xml feed without one, but they clamped down on that Monday and require one now. Without these, you won’t get the full xml data which will cause the call to ->children() to fail.
#74 by PB on May 7, 2008 - 12:58 pm
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.
#75 by stefan on May 7, 2008 - 11:19 pm
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
#76 by Dave on May 19, 2008 - 11:43 pm
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.
#77 by jay on May 21, 2008 - 8:23 am
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
#78 by Matt Brotherson on May 22, 2008 - 2:59 pm
Jay, I haven’t set up an install of wpmu, so I’m not sure what to advise you. If you look at Stefan’s post a few above your’s his site is powered by wpmu and utilizes wp-weather. Perhaps he has a contact form and you can ping him about it?
#79 by Matt Brotherson on May 22, 2008 - 7:24 pm
Dave — to accomplish this in a page use a plugin to execute PHP within posts/pages. i tested this one: http://wordpress.org/extend/plugins/inline-php/
and placed this code on a page:
#80 by GrillSgt on June 19, 2008 - 11:00 pm
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.
#81 by Erick on July 13, 2008 - 8:50 am
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
#82 by Matt Brotherson on July 13, 2008 - 8:27 pm
That error is definitely an issue that more people are going to run into – hosts tightening up their php configuration. I need to add in a method of retrieving the xml via curl but have not had the time yet. Stay posted and I’ll try and add that soon. If anyone else wants to submit a patch that checks for fopen and on failure uses curl, feel free to send it my way and I will include it with kudos.
#83 by John Deszell on July 31, 2008 - 3:50 pm
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.
#84 by Matt Brotherson on August 15, 2008 - 2:31 pm
The plugin has been updated to use the snoopy class from wordpress to fetch the weather xml. This should solve issues with hosts not allowing fopen in PHP.
#85 by David Ryder on August 19, 2008 - 9:34 am
Nice plugin Matt! I wrote about it at teh blog telling my friends about the coolness
Thanks!
#86 by Rich on August 25, 2008 - 9:06 am
Is there a way to have this add this to a page instead of template?
Like:
[weather_display]
#87 by Matt Brotherson on August 25, 2008 - 2:11 pm
Rich – done. It may take a few minutes for the plugins page to update as I just committed the change to svn.
#88 by Rich on August 26, 2008 - 9:20 am
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.
#89 by baron on August 26, 2008 - 8:08 pm
hi. Thanks for plugin
perfect.
Regards
#90 by John Leschinski on August 26, 2008 - 11:55 pm
Is there a way to have the weekday name shown in the short form rather then long form?
#91 by Matt Doran on August 29, 2008 - 3:09 am
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?
#92 by Matt Doran on August 29, 2008 - 4:26 am
Ignore me!
I wasn’t using a valid city code.
Great plugin!
#93 by Jason on September 13, 2008 - 6:57 pm
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
#94 by Infinite Loop on September 22, 2008 - 12:35 pm
$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);
#95 by webosb on November 6, 2008 - 11:32 am
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.
#96 by Charles Nibbana on December 23, 2008 - 2:43 pm
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.
#97 by BJJ on January 14, 2009 - 12:09 pm
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?
#98 by Matt Brotherson on January 16, 2009 - 3:40 pm
BJJ – I noticed this on my family blog last week some time. It appears that there must have been an incomplete XML response from weather.com that was saved into the database. For a quick stop-gap fix either go into phpMyAdmin and truncate the table wptableprefix_weather_xml or give it a wait of thirty minutes when the plugin should request fresh data from weather.com.
#99 by Gus Lee on January 27, 2009 - 10:09 pm
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..
#100 by Math on February 11, 2009 - 2:33 am
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
#101 by Matt Brotherson on February 12, 2009 - 8:51 am
Mathias – I searched for your city on weather.com and this location id should work: SWXX0007
#102 by bandicoot on February 25, 2009 - 9:50 am
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.
#103 by Matt Brotherson on February 26, 2009 - 4:07 pm
Here’s the link for the official package via wordpress.org : wp-weather.
The svn is a version control repository for plugins.
Cheers!
#104 by Brandon on March 10, 2009 - 1:15 pm
Compatible with 2.7.1?
Thank you.
#105 by Matt Brotherson on March 11, 2009 - 6:51 pm
i run it on my family blog on 2.7.1 just fine.
#106 by ron on March 26, 2009 - 6:57 am
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
#107 by Karen on March 28, 2009 - 11:54 am
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-
#108 by mat on April 10, 2009 - 5:49 am
Hi
I have installed the plugin, but I can’t see the admin page anywhere…how can I access it?
Thanks
#109 by Jos on April 17, 2009 - 9:05 am
Hi,
Great Widget, works just fine.
How can i center the text in my sidebar?
thanks,
Jos
#110 by Pat on April 23, 2009 - 12:36 pm
Where may I see it working? Can visitors select their city weather (ie) by zip code or is it set permanently by admin?
#111 by Harish on April 28, 2009 - 10:21 pm
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
#112 by Harish on April 28, 2009 - 11:23 pm
sorry about last post…found my issue. user error.
#113 by pacdi on April 30, 2009 - 12:51 pm
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
#114 by james mcintosh on May 4, 2009 - 6:51 am
Having trouble trying to add a second city. Any clues for me?
#115 by lisa on May 22, 2009 - 5:05 pm
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!
#116 by Matt Brotherson on May 25, 2009 - 8:01 pm
Unfortunately as you’ve seen – this isn’t an option currently. Should i get some free time soon I’ll see what i can do!
#117 by skee on June 3, 2009 - 8:30 am
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.
#118 by Trent Harlan on June 7, 2009 - 6:25 pm
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?
#119 by Lincoln on June 9, 2009 - 5:11 pm
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.
#120 by Matt Brotherson on June 9, 2009 - 5:18 pm
@skee/Trent: Today’s update will fix this issue for you.
@Lincoln: You may have to dig into the code and change the html output. There are a few div’s/p’s in there that you may want to re-arrange.
#121 by Lincoln on June 9, 2009 - 5:18 pm
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…
#122 by Andy Jackson on June 14, 2009 - 4:05 pm
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?
#123 by Matt Brotherson on June 15, 2009 - 2:17 pm
I can’t tell if that error means your host couldn’t look up the DNS entry for xoap.weather.com or the actual connection from your host to xoap.weather.com timed out. I’ll see if there is any way to work around this should it be encountered, but I don’t believe it is possible as the table for the old forecast data is emptied before the new forecast data is retrieved. Perhaps there is a way.
#124 by Kevin on June 22, 2009 - 10:57 pm
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?
#125 by Matt Brotherson on June 23, 2009 - 12:48 pm
Kevin, I have not seen this issue before. I attempted to duplicate on a test install and am unable to. Do you have any additional information for this? Does it happen to any other widgets?
#126 by Kevin on June 23, 2009 - 7:37 pm
I’ve tried it on 3 WP installs – one totally fresh – installing plugin right after wordpress. This is the only widget it happens to.
#127 by Windforce on June 24, 2009 - 11:32 am
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 “\’”.
#128 by Joe on June 24, 2009 - 9:55 pm
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!!
#129 by Derek on July 1, 2009 - 6:57 am
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?
#130 by Kev on July 6, 2009 - 6:00 am
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
#131 by Anz on July 7, 2009 - 10:22 am
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 ??
#132 by Lucian on July 13, 2009 - 1:34 pm
Multiple cities function would be really great.
#133 by DGH on July 14, 2009 - 9:37 pm
I have PHP 5 and wordpress 2.8.1, will this widget work? Thanks!
#134 by DGH on July 14, 2009 - 10:00 pm
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!
#135 by DGH on July 14, 2009 - 10:07 pm
I forgot to mention that I checked my email for the info as well, and nothing.
#136 by kosma on July 31, 2009 - 5:13 am
How can I get the partner_id and licence key?
#137 by laerte on August 15, 2009 - 4:15 pm
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
#138 by Lauro Roger on August 17, 2009 - 6:15 am
Hi, I’m looking for where I can edit the alt texts for Rain, Farly… etc.
can you halp me?
#139 by Steven on October 7, 2009 - 9:48 pm
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
#140 by Pad on October 12, 2009 - 12:59 am
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…
#141 by Matt Brotherson on October 12, 2009 - 8:58 am
Steven – it is hardcoded in the plugin file to refresh every 30 minutes. This is required by weather.com.
Pad/Laerte – the issue here is that sometimes weather.com doesn’t return the full XML in their response. I’ve coded around this in one instance, but looks like I need additional checks.
#142 by Pad on October 12, 2009 - 4:55 pm
Thanks for the answer, i must confess i haven’t taken time to investigate this issue so far
#143 by Barb on October 14, 2009 - 5:56 pm
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?
#144 by Matt Brotherson on October 14, 2009 - 6:18 pm
Barb – you should have received an email from weather.com containing your details.
#145 by Barb on October 14, 2009 - 11:16 pm
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
#146 by Barb on October 15, 2009 - 9:14 am
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.
#147 by paul on November 15, 2009 - 11:33 pm
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.
#148 by Matt Brotherson on November 16, 2009 - 9:06 am
Yes, the weather.com xml feed includes wind information. I’ll email you so we can figure out which section to edit as there are two different xml parsers in use to support both PHP4 and PHP5.
#149 by Maurizio Delladio on November 17, 2009 - 1:40 pm
I can’t use Celsius. I select “metric” in setting but the temperature is F…
#150 by Matt Brotherson on November 17, 2009 - 2:23 pm
Ahh…I must have overlooked that in the code changes. Will put out an update. Thanks for the bug report.
#151 by Matt Brotherson on November 17, 2009 - 3:20 pm
New version out with fix for this and also added wind information in the settings as an option to display.
Version 0.3.2 is the latest. Sorry for the rash of updates. Thought I’d caught everything in the code upgrade — it was a major overhaul.
#152 by Paul on November 17, 2009 - 3:43 pm
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?
#153 by Matt Brotherson on November 17, 2009 - 3:59 pm
Crap. I left that out. I’ve now added legacy support for this template function.
Should be the last update in a good while I hope. Sorry everyone!
#154 by Paul on November 20, 2009 - 3:34 pm
Excellent! Thanks Matt, great plugin.
#155 by Benjamin on November 21, 2009 - 2:04 am
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!
#156 by Matt Brotherson on November 21, 2009 - 11:25 am
You should be able to add some css styling to your theme to accomodate this.
.weather_info { color: #fff; }#157 by Benjamin on November 21, 2009 - 11:44 am
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.
#158 by Noah on November 23, 2009 - 12:09 pm
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'
#159 by Matt Brotherson on November 23, 2009 - 3:33 pm
Sounds as if the full xml didn’t come across the wire. You can empty the weatherxml table via phpmyadmin to force it to request fresh data – otherwise wait 30 minutes. Let me know.
#160 by Noah on November 24, 2009 - 9:48 am
Matt,
You were right, I just waited the 30 minutes. Looks really good – - now to css to customize. Thanks and nice work.
#161 by Matija on December 2, 2009 - 3:15 pm
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?
#162 by Matija on December 2, 2009 - 3:17 pm
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
#163 by Matt Brotherson on December 2, 2009 - 3:55 pm
Matija – currently there isn’t any documentation on that. I could probably release a new version that includes the options to show the other items the xml contains. Let me see about that. The other items are humidity, barometer, chance of precipitation, dewpoint, UV and visibility.
#164 by Matija on December 2, 2009 - 4:08 pm
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.
#165 by Gerge on December 17, 2009 - 4:41 am
Hello
http://xoap.weather.com/weather/local/30339?cc=*&dayf=1&link=xoap&prod=xoap&
Please:
How to change en_US to fr_FR
Thank you !
#166 by Gerge on December 17, 2009 - 4:42 am
please i mean that how i can have wp-weather in french
#167 by Cynthia on December 18, 2009 - 4:49 pm
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.
#168 by Matt Brotherson on December 18, 2009 - 6:30 pm
Gerge – you are more than welcome to create a translation file to translate the phrases in the localization folder.
Cynthia – the feed won’t function without the key and partner id. Not sure what the delay is…usually the information is sent out instantly.
#169 by Arlindo Pinto on December 21, 2009 - 12:49 pm
Hi!
I’ve translated the plugin to Portuguese, but cant make it work!
Whats the secret?
TX
Merry Christmans!
#170 by shoaib on January 13, 2010 - 6:25 pm
thnx a lot for such a nice plugin,m collecting cool things for my new design and this plugin is really cool .
#171 by Csaba on January 22, 2010 - 7:02 am
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?
#172 by Matt Brotherson on January 22, 2010 - 2:03 pm
Csaba – have a look here and see if that answers your issue: http://wordpress.org/support/topic/199536
Arlindo – is it not picking up the localization file?
#173 by Csaba on January 25, 2010 - 9:29 am
Works. Thanks.
#174 by Diyana on January 25, 2010 - 10:45 pm
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!
#175 by diyana on January 26, 2010 - 12:37 am
Is there no location ID for Kuala Lumpur, Malaysia?
#176 by Matt Brotherson on January 26, 2010 - 9:26 am
Diyana, I show MYXX0008 as the location ID for Kuala Lumpur. Please let me know if this does not work.
#177 by Diyana on January 28, 2010 - 4:02 am
Ahh, it works!
Coolness!
Thanks very much!
#178 by Chris on January 28, 2010 - 5:35 am
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
#179 by Matt Brotherson on January 28, 2010 - 8:57 am
Chris – that functionality isn’t available currently. However, it shouldn’t be too hard to add a location id parameter to the shortcode that will render the weather. Let me see about getting an update out.
#180 by Chris on January 28, 2010 - 10:59 am
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
#181 by Matt Brotherson on January 28, 2010 - 3:54 pm
Chris, I did some major modifications and got the shortcode now handling different locations in a post or page.
Update your copy and try [weather_display location_id="UKXX0446"] — note the quotes around the actual location id.
Cheers.
#182 by Elena Coen on February 1, 2010 - 7:02 pm
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.
#183 by Craig on February 1, 2010 - 9:53 pm
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!
#184 by Rodger Gallagher on February 2, 2010 - 2:33 pm
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.
#185 by Matt Brotherson on February 2, 2010 - 3:08 pm
Elena – I’ve added the download link to the top of this page.
Craig – You’ll have to customize the output in the plugin file. If you’re on PHP5 then it will be around line 270, otherwise line 373.
Rodger – I tracked down the bug. When a stale forecast is in the database, I was deleting the row but the code still used that old forecast data for display. Usually a refresh of the page would fix it, but that’s a bug so I’ll be releasing another update to take care of that. Thanks for the heads up!
#186 by Craig on February 2, 2010 - 3:58 pm
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 :-/
#187 by Chris on February 3, 2010 - 9:52 am
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.
#188 by Chris on February 3, 2010 - 1:32 pm
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.
#189 by Rodger Gallagher on February 3, 2010 - 1:41 pm
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
#190 by Matt Brotherson on February 3, 2010 - 2:46 pm
All, I think I have a fix worked out as I’ve identified an issue with a sql query. Once I receive word back from a tester, I’ll push out the update to wordpress.org. Hopefully this will be the last one for a while.
#191 by Rodger Gallagher on February 3, 2010 - 7:47 pm
Thanks Matt. Last lot of fine tuning has it fixed.
#192 by Ali on February 4, 2010 - 11:30 am
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!
#193 by Matt Brotherson on February 4, 2010 - 11:37 am
Ali — this error means that there is no forecast data to display. Did a refresh of the browser work? Have you set the appropriate location code, license key and partner id in the settings?
#194 by leo b on February 4, 2010 - 11:54 am
is there php code to hard code the weather applet?
#195 by Matt Brotherson on February 4, 2010 - 11:58 am
Leo – you can use the shortcode [weather_display] in your posts/pages or use
in your sidebar/footer/etc.
#196 by PeSi on February 8, 2010 - 11:04 am
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?
#197 by Matt Brotherson on February 9, 2010 - 2:08 pm
Do you have a valid location id entered in your settings?
#198 by Velnias on February 15, 2010 - 6:34 am
Hi, what about the localisation features? I trabnslated the files in Localisation folder, but still, i can’t see my translation.
#199 by Fehim TaÅŸtekin on February 15, 2010 - 6:18 pm
Thank you for fantastic plugin
i have allready translated files in to turkish (localisation folder) but i can see anything
thank you
#200 by Matt Brotherson on February 16, 2010 - 3:37 pm
I’ve released a new version that successfully allows translations.
#201 by Velnias on February 17, 2010 - 5:23 am
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?
#202 by Velnias on February 17, 2010 - 5:44 am
Or You could add POT file, so i could add those strings that are missing by myself.
#203 by Fabrice on February 21, 2010 - 10:48 am
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
#204 by kopulex on February 23, 2010 - 3:45 pm
Hi, I’ve made Czech translation of your localization file WP-Weather’s plugin.
#205 by pedro on February 24, 2010 - 5:28 pm
Where can I find the Location id (zip code or city code) of my city (montevideo, Uruguay)
#206 by Velnias on March 2, 2010 - 3:57 pm
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.
#207 by Velnias on March 2, 2010 - 4:04 pm
A suggestion, it would be nice if plugin could select the weather information by reader location.
#208 by John on March 6, 2010 - 3:05 pm
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
#209 by Matt Brotherson on March 6, 2010 - 10:26 pm
Pedro – Montevideo is UYXX0006.
Velnias – I’ll look into correcting that info. Thanks for the heads up.
John – sent you email.
#210 by Lincoln Barbour on March 9, 2010 - 5:36 pm
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
#211 by Matt Brotherson on March 9, 2010 - 7:14 pm
Lincoln, use the following:
#212 by Triple Moons Exotic on March 15, 2010 - 7:32 pm
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.
#213 by Matt Brotherson on March 16, 2010 - 3:23 pm
Sounds like your host doesn’t allow fsock connections to pull data from external locations. I’d consult with them to see if they’ll open it up.
#214 by Leif on February 1, 2011 - 6:23 pm
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
#215 by George on February 18, 2011 - 10:02 am
Would be successful if it shows a way to improve the graphics using CSS
#216 by Matt Brotherson on February 22, 2011 - 7:56 pm
I’ve added some options for different image sets.
#217 by Gfisk on February 22, 2011 - 10:31 pm
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.
#218 by Jim Clark on February 23, 2011 - 12:38 am
I’m getting the exact same error as the previous poster. How can I get beck to the previous version? Eek!
#219 by Gulliver on February 23, 2011 - 6:14 am
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
#220 by Jim Clark on February 23, 2011 - 6:38 am
How can I rollback? I need this to work. Please answer.
#221 by Matt Brotherson on February 23, 2011 - 8:11 am
I’ve just committed a change that should fix this for everyone. Version 0.4.1
My apologies.
#222 by Bob Sapp on February 23, 2011 - 4:02 pm
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!
#223 by Matt Brotherson on February 23, 2011 - 4:38 pm
Drat. I was testing some changes for an ‘extended forecast’panel flyout and hard-coded the forecast to 5 days. 0.4.2 should fix. Argh…sorry about all the updates.
#224 by Bob Sapp on February 23, 2011 - 4:42 pm
Thanks for the quick response! You are the (weather) man!
#225 by Gfisk on February 23, 2011 - 10:32 pm
Thanks, just did .4.3 and it worked great!
#226 by Jorge on March 4, 2011 - 5:14 am
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.
#227 by Rodger Gallagher on March 24, 2011 - 4:35 pm
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.
#228 by Ryan on March 26, 2011 - 9:54 pm
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
#229 by Matt Brotherson on March 29, 2011 - 1:15 pm
Rodger – I’ve fixed the issue with 0.4.4
Ryan – I can’t seem to duplicate the issue. Please let me know if the latest version fixes it…I’ve drastically reduced the file size in hopes of helping out users that use the automatic install/upgrade functionality.
#230 by Ryan on March 30, 2011 - 12:57 pm
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.
#231 by Ryan on March 30, 2011 - 2:36 pm
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
#232 by Ryan on March 30, 2011 - 2:47 pm
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″
#233 by Louis on March 30, 2011 - 10:42 pm
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
#234 by Matt Brotherson on March 31, 2011 - 10:05 am
Louis, I suspect you are on a wordpress version prior to 3.0 and thus I can not support any version below 3.0 as I strive to keep my code up to the latest standards and avoid deprecation. I have changed the required version in the readme for the next release.
#235 by alghero on March 31, 2011 - 3:46 pm
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.
#236 by Matt Brotherson on April 1, 2011 - 9:02 am
Yes, you can add translations to all of the static content displayed by creating a translation file and uploading it to the localization folder of the plugin. http://codex.wordpress.org/Translating_WordPress
However, I don’t have any way of translating the information that comes from the weather.com feed and they don’t have any option for changing the language.
#237 by alghero on April 2, 2011 - 5:21 am
Ok, thank you very much. Have a fine day.
#238 by Rodger Gallagher on April 2, 2011 - 1:20 pm
Thanks Matt. Version 4.4 works great for me.
#239 by Gabriel Yeung on April 2, 2011 - 11:20 pm
Can it show Hong Kong weather…
#240 by Matt Brotherson on April 3, 2011 - 5:13 pm
Yes, the location code for Hong Kong is CHXX0049
#241 by Mike @ Utah Premier Services on April 5, 2011 - 6:40 pm
Is there anyway to make a horizontal forcast? LOVING your plugin! Thanks a billion! I will donate soon!
#242 by Carlos Giles on April 6, 2011 - 12:14 am
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
#243 by Carlos Giles on April 8, 2011 - 1:23 am
@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
#244 by Matt Brotherson on April 8, 2011 - 8:22 am
Carlos, glad you got the localization working. You can call the weather function in php directly:
If you need to customize the output, this can be done. Depending on if your host is php5 or php4 the output is generated by two functions. PHP5: parseSimpleXml on line 300. PHP4: parseIsterXml on line 385.
#245 by Carlos Giles on April 8, 2011 - 12:41 pm
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.
#246 by Matt Brotherson on April 8, 2011 - 2:07 pm
It may vary depending on what version of the plugin you’re running. No worries – I don’t accept donations for this. I’m just glad people are able to make use of it!
#247 by Carlos Giles on April 8, 2011 - 9:56 pm
Matt, you rock!
If you want to check the “almost done” thing that I’ve done with your plugin you can check it on: http://accesototalpuebla.com/accesototal
#248 by Saba on May 2, 2011 - 2:10 pm
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!
#249 by Matt Brotherson on May 3, 2011 - 11:02 am
I would try adding some CSS to the .weather_info element.
#250 by Kusadasi on May 9, 2011 - 6:04 am
I am trying to put this on my site. but I can not get it to work.
#251 by Hiroaki Sakurada on May 23, 2011 - 7:00 pm
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!
#252 by Merlin Mason on June 1, 2011 - 12:30 am
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!
#253 by Andrew on June 1, 2011 - 8:46 pm
How do I customize it?
#254 by Matt Brotherson on June 5, 2011 - 3:50 pm
Hiroaki – Unfortunately, weather.com does not provide all of the string values for conditions and this is rather frustrating as many people like yourself wish to translate that information. Sorry.
Merlin – I don’t have any references to WP_Error in my code. I’m wondering if something is going on upstream. Is your issue still presenting itself?
#255 by betsy21 on June 5, 2011 - 11:30 pm
Is there anyway to output only the icon and the currently temperature?
#256 by Jeff Frey on June 18, 2011 - 7:00 am
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!
#257 by sardegna on June 23, 2011 - 11:11 am
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.
#258 by Hank22077 on August 9, 2011 - 5:34 pm
I still have found nothing to make it display horizontally, instead of vertically.
#259 by Matt Brotherson on August 13, 2011 - 7:48 pm
I’m got a pretty hectic work schedule right now and will try to get to this soon.
#260 by Crys on October 4, 2011 - 7:16 pm
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…
#261 by Miss M. Turner on November 6, 2011 - 11:39 pm
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.
#262 by Len S on November 7, 2011 - 10:09 pm
We’d like to see the plugin re-written, too.
Thanks for the past months of usage!
#263 by stefan on November 9, 2011 - 9:41 pm
great plugin while it lasted. Hope it gets resurrected!
#264 by Andrew on November 28, 2011 - 8:51 pm
Don’t let it die
#265 by Andrew on December 8, 2011 - 8:03 pm
Any new updates on this?
#266 by Phillip on December 11, 2011 - 4:17 pm
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
#267 by Andrew on January 18, 2012 - 9:28 pm
Me wants WP-Weather BACK!!!!