WeatherIcon 2.0
Update Friday July 20th:
For those of you looking for the download, check here:
WeatherIcon Download
Exciting news for WeatherIcon (a plugin for wordpress that shows the current weather conditions for your location with a pretty icon)
Thanks again to Garett for his hard work we are now at version 2!
This release adds these features (I’m sure I’ve forgotten some):
- an options page in wordpress 1.5
- better localization support
- automatically linking to the cache (if you place it in the recommend location)
- automatically linking to the icons (if you place them in the recommended locations)
- several contributed bug fixes (including one from Bob Crispen Thanks Bob!)
This release will only work with wordpress 1.5 so I’m going to leave the older version up for those who still need it.
Get it here: http://www.viper007bond.com/wordpress-plugins/weathericon/
If you’re interested in creating localizations for WeatherIcon please contact me.
Here’s some additional info from Garett:
It should be noted that the language files in the languages directory were intended as a sample. While French (francais) is the same as the French language php file that was available for download before (and should thus work the same as before), it doesn’t have the localization for the configuration page and the German (Deutsch) language file only localizes the configuration page and I’m not overly confident in the translation thereof (I’m not a native German speaker with a limited vocabulary).
In any case, it might make more sense to download language files separately, should they be need. The script should work fine without the additional language files (unless I really screwed up the configuration page). Also while both the po and mo files should be offered for download, it should be noted that the po files are only needed if changes/fixes/additions need to be made to the translation. PO’s by themselves are useless to wordpress (and thus this plugin) and have to be compiled into a mo file before they can be used (msgfmt -o language.mo language.po in unix or using poedit). More information on localization is available on the wordpress wiki.
Update: New version is available (2.0.1) - (it’s in the same location)
Changes are:
- Fixed Missing Descriptor for visibility.
- Removed border attribute from image
- Fixed fread error on initial creation of cache file.
March 13th, 2005 at 12:23 am
Looks nice, I’ll probally end up using it.
March 13th, 2005 at 5:41 am
Thanks - installed and working.
March 13th, 2005 at 7:26 am
The plug is very nice, but please, tell me how can I change mph to km/h, miles to km, °F to °C etc.? I was trying change it in the part “$weather_default_settings = array (…)” in WeatherIcon.php but it doesn’t work.
And the second question: where is the part of script where I can disable Dew Point, Visibillity, Clouds etc.?
Sorry for this lamer question, but I’m not good in php.
March 13th, 2005 at 8:16 am
I’m blind.
I can’t see that options are in WP menu. Sorry for disturb.
March 13th, 2005 at 11:03 am
Jeremiah, I can’t get your link to start a download - it just takes me to a 404 not found error page….
March 13th, 2005 at 12:26 pm
Thanks for emailing it to me…. I just now realized what the problem is: I have referrer logging off by default; usually I remember to set it on when I’m going to download something - or go to my bank, but I haven’t been feeling very well, so spaced it this morning. Sorry!
March 13th, 2005 at 3:05 pm
CAn’t see the options page neither!
March 13th, 2005 at 5:25 pm
The options page is under “options” not “plugins”.
if you click on options you should see a new one listed beside:
General : Writing : Reading : etc.
it will be labeled “WeatherIcon”
–Jeremiah
March 17th, 2005 at 8:19 am
Great plugin! Thanks!
March 17th, 2005 at 10:40 am
Great plugin, thanks! FYI for anyone else, if you don’t know your weather station codes you can look them up here:
http://weather.gov/tg/siteloc.shtml
March 18th, 2005 at 4:05 am
I noticed that my icon never changed. So I tested with changing to alternative icons under the options meny, now I dont get an icon at all. Not even if I change it back. Also, every time I update the options I get another / in my chache dir. Really strange, so after updateing twice it looks like this C:\Program Files\Apache Group\Apache2\htdocs/wp-content/plugins/WeatherIcon/cache.
Any idea?
March 20th, 2005 at 5:13 pm
that was awesome. so much easier to configure. i was actually doing it the original (difficult way). thanks for the Options feature! =)
March 21st, 2005 at 1:59 am
I really like this plugin and had no problems with it in my WP 1.2 blog. Now I installed a new 1.5 and I just don’t find out where to switch to german language. I downloaded the “deutsch.mo and po” files. In the weathericon.php I added “$weather_settings[’language’] . ‘deutsch.mo’);”, but this doesn’t seem to be correct, as nothing changed. Any hints?
March 22nd, 2005 at 1:57 am
Can someone tell me how to add international cities?
March 25th, 2005 at 2:24 am
Thanks for the great plugin! FYI, a small typo … Line 800 reads: (’ENE,_EtherIcon’) should be: (’ENE’, ‘WeatherIcon’)
March 25th, 2005 at 12:11 pm
aude all these guys (and gals) who do this out of love for their work. For Wordpress 1.5 this is a fast to install and well put together thing to try to add. Earier versi […]
March 26th, 2005 at 9:30 am
Wind direction bug
Problem regarding wind direction. (’ENE,_WeatherIcon’)
Text is being displayed when ENE is called up.
Bug Fix should be (’ENE’, ‘WeatherIcon’)
March 27th, 2005 at 3:03 pm
The plugin works great but I’m in France and I get this rather than the appropriate symbols. Blank spaces would be better.
# Temp: 11?C
# Humidity: 94%
# Wind: W at 6 km/h
# Dew Point: 10?C
# Barometer: 29.77″ Hg (1008 hPa)
# Clouds: mostly cloudy
# Visibility: 10 km
Also, I don’t get the same images in Firefox or IE. Stange.
March 29th, 2005 at 1:08 am
分類 10縣市 周五起開罰
[WP] WeatherIcon2
改用 WeatherIcon2 一陣子看看。GetWeather 好像各有千秋,所以還是先保 […]
March 29th, 2005 at 10:26 am
Linda: Languages are best controlled through the settings page under options. While one could hard code it with a $weather_settings[’language’] = “deutsch”; in the right area in the code, but I don’t recommend doing that since it completely overrides the configuration page. In addition, the German translation is merely an example, and I’m not sure overly functional (unless someone has fixed that).
March 29th, 2005 at 10:26 pm
Jeremiah,
Which file should I change to display the weather information. Currently is display
San Francsico,
* scattered clouds
* Temp: 52°F
* Wind: NW at 16 mph
* Clouds: scattered clouds
* Visibility: 10 miles
I like it to display in a single line like this.
Current weather in San Francsico * scattered clouds * Temp: 52°F * Wind: NW at 16 mph
Can you show which file I should change, I am not very php literate so please help me.
Thanks in advance.
Rocky
March 29th, 2005 at 11:37 pm
[…] therIcon 2.0
Published on 29 Mar 2005 at 9:37 pm.
No Comments.
Filed under Main.
Sonicpling - Jeremiah’s Blog » WeatherIcon 2.0 If you don�t want to download […]
March 30th, 2005 at 10:31 pm
Jeremiah: excellent and brilliant plugin! Really spruced up my site. By the way, it took me awhile to figure out that the “removing bullets” issue that some people have is related this statement in the default Kubrick theme that ships with Wordpress 1.5:
/* BEGIN ENTRIES */
.entry ul li:before, #sidebar ul ul li:before {
content: "0BB 020";
}
If you remove
#sidebar ul ul li:before
from the statement it will remove all of your bullets. Cheers!
March 30th, 2005 at 10:32 pm
Well, the escaped characters didn’t render quite properly, but I think it’s enough info to help other people with this problem. Sorry for the double post.
April 1st, 2005 at 5:42 pm
Jeremiah,
I too have problems with my weather icon never seems to change. Is there something I can do to fix this?
Thanks for such a great plugin.
April 1st, 2005 at 8:16 pm
Never mind… It’s working fine now.
April 5th, 2005 at 9:17 pm
[…]
I have added my local weather to the left sidebar with a WordPress plugin called WeatherIcon 2.0. It’s a neat little plugin. It displays temperature, humidi […]
April 6th, 2005 at 3:44 pm
[…] « Tema WordPress: Tulip Plugin WordPress: WeatherIcon 2.0 WeatherIcon 2.0 è un plugin che mostra in forma di icona, le attuali condizioni me […]
April 6th, 2005 at 6:32 pm
How would one display weather for 3 different cities?
Would I have to copy the wp-content/plugins/WeatherIcon.php script to 3 different names, change the PluginName line in each file to correspond to where I am want, activate them separately in the admin panel and then do somethine like:
<?php NewName1('City_Code'); ?>
<?php NewName2('City_Code'); ?>
<?php NewName3('City_Code'); ?>
Or is there (hopefully) an easier way?
Thanks.
April 6th, 2005 at 9:17 pm
Curious George:
all you have to do is call the function again:
<?php WeatherIcon('City_Code'); ?>
<?php WeatherIcon('City_Code2'); ?>
<?php WeatherIcon('City_Code3'); ?>
–Jeremiah
April 7th, 2005 at 12:52 am
[…] tions given. Other than that, installation was a snap. WeatherIcon can be downloaded at:
No comments have been added to this p […]
April 7th, 2005 at 6:47 am
What does this mean? “chmod the “cache” folder inside the “WeatherIcon” folder to “777″”
April 7th, 2005 at 9:05 am
[…]
« Understanding Blog Speak
WeatherIcon 2.0
WeatherIcon 2.0 — погодный плагин для WP (пример вн […]
April 7th, 2005 at 11:24 am
[…] thing new, which says Weather, is up in the sidebar. This is powered by the plug-in called WeatherIcon by Jeremiah. WeatherIcon shows weather information of the location you […]
April 7th, 2005 at 11:22 pm
Z, I had troubles with that too, since I am new to this stuff. chmod the cache folder doesnt mean rename it. chmod means to set the permissions on the folder to read and write for everyone, or the code 777. Easiest way is to do it from your c-panel from your website..file manager kind of thing..find the folder there, click on it and find where it says change permission and change it to 777.
April 8th, 2005 at 6:57 am
[…] stly this is a note to myself). One-Click Backup of WP Database Optimize your database Have a icon showing the local weather. Here’s another note to myself : remin […]
April 8th, 2005 at 8:52 am
Thanks for a great plugin!
I was wondering why the wind direction no longer shows up in my report.
I’m comparing Get Weather and Weather Icon on my page - weather icon is at the bottom of the sidebar http://www.juicygeography.co.uk/blog
April 8th, 2005 at 11:55 am
add to the above post that wind direction works intermitently
April 8th, 2005 at 1:10 pm
[…] s, and skills into categories that suit your campaign." Tagged as: online rpg tools Sonicpling - Jere […]
April 8th, 2005 at 2:24 pm
[…] to do Version Control for my theme (especially since I don’t have a shell) - install WeatherIcon 2.0 - optimize my databases And now I’m off to pick up my comput […]
April 9th, 2005 at 9:03 am
[…] 17;s definitely on the chilly side today. Now I even know how cold it is having added the WeatherIcon plug-in to my site. Bumped into my cousin Elaine and her husband while […]
April 9th, 2005 at 5:01 pm
Hey, is there any way for the weather icon to show in IE? It works fine in Firefox, but nothing comes up in IE other than the text.
April 10th, 2005 at 4:27 am
[…]
How’s the weather?
I’ve found a great weather plugin for Wordpress called WeatherIcon 2.0 by Jeremiah. You can see it in operation on the right hand side on […]
April 10th, 2005 at 2:11 pm
[…] theme is titled Falling Dreams 1.0 and made by Razvan Teodorescu. I’ve also added an Weather Icon on the right hand side of this blog. So, if you are interested in to se […]
April 11th, 2005 at 6:29 am
I am unable to download new weather data — cache directory and CHMOD are correct, weather debug option results is this, any thoughts? Station is KNBC, KLFK gave same error …
Cache Debug
o Cache Timeout: 1200
o Cache File Age: 0 (note: this resets to 0 upon page refresh, timeout is 1200)
o Fetching New Metar Data
* Weather data not available
April 12th, 2005 at 5:03 pm
im having troubles with this plugin. Although its great, the pngs won’t show up. All the locations are correct. All i get is white area above the text
also, i get the “no weather data available” message more then i would like.
any solutions to these problems
April 13th, 2005 at 12:19 pm
I have the same problem.
April 13th, 2005 at 2:17 pm
I installed the plugin today with WordPress 1.5 and like it a lot. Thank you!
April 17th, 2005 at 9:37 pm
[…] ave yet to test on this site. CGFeed — http://www.chait.net/index.php?p=85 5 stars WeatherIcon — http://www.sonicpling.net/archives/2005/03/12/weathericon-20/ 5 […]
April 18th, 2005 at 6:15 am
Hi,
When I activate the program I get
Fatal error: Call to undefined function: load_textdomain() in /home/jfsccom/public_html/blog/wp-content/plugins/WeatherIcon.php on line 119
but I can’t see what is wrong with the line in question as I have not changed it. The line is
load_textdomain(’WeatherIcon’, ABSPATH . ‘wp-content/plugins/WeatherIcon/languages/’ . $weather_settings[’language’] . ‘.mo’);
Any help would be appreciated.
Also will you be setting up a forum for this?
April 18th, 2005 at 6:44 am
Adrian:
it looks like you’re using Wordpress 1.2.1
this plugin will only work with wordpress 1.5 and higher, but there is an older (not as nice) version of the plugin still available here
I would recommend upgrading wordpress, rather than downgrading the weather-plugin though.
–Jeremiah
April 18th, 2005 at 6:49 am
Ennis:
looks like you got it working. sorry that it took me so long to reply.
prerona:
it looks like the folder you have the icons stored in is protected.
you need to change the permissions (chmod) on the ‘wicons’ folder to allow anyone to view it. that should make the icons appear.
–Jeremiah
April 21st, 2005 at 12:40 pm
[…] ol Witty Text Plugin. You will always know the weather in Paris thanks to Jeremiah’s Wheather Icon Plugin. My posts are made printer-friendly by Chan Hong Wei’s W […]
April 21st, 2005 at 1:47 pm
Thanks for your wonderful plug-in! I’ve been messing with customizing it all day and can’t seem to find a way to not have a bullet display just next to the image icon. I’m pretty new to CSS, but I’ve tried just about every combination I can think of and I still get a bullet based on the #sidebar li definition. Is there some sort of trick that I’m missing or is there no way to override just the first li in an ul?
Thanks for your time!
Cheers, DK
April 23rd, 2005 at 7:22 pm
[…] but for now I’m just having way too much fun with the plugins. I’ve added the WeatherIcon2 plugin to show the local weather and other information […]
April 23rd, 2005 at 9:32 pm
Hey, thanks. I did get it working, but i noticed one small problem. With firefox the two images 1cloud_fog.png & 2cloud_fog.png ( i believe its them too) don’t show up, all is there is a white space. Might be something u wanna look at. I know its not just mine, i’ve noticed it on others as well.
April 23rd, 2005 at 9:33 pm
btw, is there a way to do a X day forecast, where x equals a number of days (Example: Extended 5 day forecast, where in this case x=5)
April 26th, 2005 at 10:43 am
I need some help man.. I just can’t seem to find the right place to insert this weather code and get it nice and pretty like on your site without totally mucking up the xhtml validation. will you go check out my site and tell me if you know what im doing wrong? i’ll give you my login info if you need to look at the actual templates. let me know!
thanks,
dan
April 26th, 2005 at 1:16 pm
who you talkin to dan….if you want me to help i can…just lemme know.
April 26th, 2005 at 1:21 pm
nm looks like u got it working.
April 26th, 2005 at 5:31 pm
Dan:
it looks like you just need to add a UL around the code.
like this:
<?php if (function_exists('WeatherIcon')) : ?>
<ul>
<li class="weather">Lufkin, Texas
<ul>
<?php WeatherIcon('KLFK'); ?>
</ul>
</li>
</ul>
<?php endif; ?>
April 26th, 2005 at 5:57 pm
Ennis:
The national Weather service does make forcast information available for some stations, but the WeatherIcon doens’t look for or parse that information.
there was a plugin that someone was working on that did pull forcast data, but I can’t locate it now. you might ask in the wordpress forums.
I think Beel was the one who pointed it out to me.
Jeremiah
April 26th, 2005 at 6:29 pm
Thanks dude. just askin out of curiosity.
April 26th, 2005 at 11:18 pm
Hola.. Tengo un problema con el plugin. La temperatura ni la imagen cambian en ningún momento. Quedan fijos en:
# Temperatura: 15°C
# Humedad: 42%
# Viento: ESE a 6 km/h
# Nubes: cubierto
# Visibilidad: 10 km
con la imagen “4cloud_norain.png”
No se actualizan! Por favor si alguien me pudiera ayudar estaria agradecido.
Bye
April 28th, 2005 at 2:55 pm
Removing the bullets from each list item is so easy once you know what to do!
I tried hacking my style sheet as suggested by #23 above but that removes all bullets in the sidebar. I read through the code of WeatherIcon.php and saw that there are three parameters to the WeatherIcon function. The first parameter is the Station code which we are all familiar with. The other two (optional) parameters are the before and after tags to each list item. (They default to opening and closing LI tags.) All you need to do is specify your custum Before and After tags when you make the weather call.
Here is how I’m making my call from the sidebar,php file:
<?php if (function_exists(’WeatherIcon’)) : ?>
<li class=”weather”><h2>The Weather</h2>
<ul><b>New York, NY</b><br /><?php WeatherIcon(’KLGA’, ”, ‘<br />’); ?></ul>
</li>
<?php endif; ?>
The second parameter (after ‘KLGA’) is blank, which means do not insert the default <LI> tag. The third parameter is a <BR /> tag which replaces the default </LI> tag.
May 2nd, 2005 at 6:10 am
Did they change the METAR-code?
I get “Weather data not available”, but the cache-file is filled with data that makes sense but can’t be parsed:
EHGG 021125Z 27007KT 230V310 3900 -RA NSC 18/15 Q1010 BECMG 5000 TEMPO -SHRA SCT030CB
May 3rd, 2005 at 5:17 am
Question about the weather icons updating from day to night. From the Options-Weather Icon menu in WP, you can adjust the sunrise and sunset times. However, is this information (system time) coming from the server or the local client accessing the icon? In other words, if your files are being hosted on a server in another time zone, you get the wrong day/night icons. Is this correct and if so is there a workaround to display your local time? Thank you for any suggestions.
May 3rd, 2005 at 9:03 pm
Great hack, thanks for posting this. I see above another commenter asked how to post all this info on one line. What if you want to say something like, “In New York it’s currently X degrees and conditions are X.”? How can insert text in between the data and post it as one string?
May 4th, 2005 at 7:41 am
[…] Put default value in search box and clear upon user selection WP: All Options Access Weather Icon Condensed Content *Deactivated QuickTags in Safari […]
May 7th, 2005 at 2:05 am
Three questions… (one which has been asked a few times):
1) Any way to change the display of the weather? I.E. on my web site (www.brianx.net) It might be cool to have the weather displayed in a horizontal fashion across the top banner instead of on the side bar… either in a graphics format or in a text format…
2) Any way to change to the order that the output is displayed? For instance, I am using:
Weather
Temp: 46°F
Wind: NNE at 8 mph
Clouds: overcast
I’d like to do:
Weather
Clouds: overcast
Temp: 46
Wind …
I tried changing it in the array, but that didn’t seem to work?
And last, but not least… Has anyone created any other weather icons? NOAA/NWS is looking at some new icons.. http://www.weather.gov/icon_comments/
Maybe we can, um, borrow theirs?
By the way, thanks so much to all the developers and contributors of this wonderful program.
Cheers,
Brian
May 11th, 2005 at 3:18 pm
Hello, u have a nice site!
http://webcams.jmkl.com/live/
May 11th, 2005 at 8:39 pm
[…] « Wohoo… New WordPress Change in Sidebar Add WeatherIcon 2.0 to it. Fi […]
May 14th, 2005 at 11:10 am
I’m getting fedup with this now.. I’ve tried both versions, i’ve tried everyones suggestions for getting rid of the bullets, but the last suggestion …
The Weather
New York, NY’); ?>
….
brought back an error message and messed up my site.
Is there PLEASE, just one simple solution that works. Or which theme must I use before this thing will start displaying properly!
Thank you in advance!
May 14th, 2005 at 11:30 am
Lee:
the solution you tried last should have worked.
you can call the weather function with 3 variables:
Weather Station, Before, After.
you would use it like this:
WeatherIcon(’Station’, ‘before’, ‘after’)
if you don’t include the “before” and “after” it uses “<li>” and “</li>”.
so if you leave a blank space for before (just empty quotes: ”) and make the “after” just a line break: ‘<br />’ that should work.
email me with your station code and I will email you back the exact code you should be using.
P.S. don’t copy and paste from here, wordpress is converting all the quotes into “smart” quotes, (the little curly left and right quotes) and you need straight quotes in the code. that’s most likely the problem you’re having with the New York Code. if you just retype it by hand it should work.
May 14th, 2005 at 11:32 am
Thanks Jeremiah. I’ve not used PHP for a long long time and it’s like looking at a foriegn language again. My station code is EGLC
May 14th, 2005 at 2:52 pm
DE asked:
WeatherIcon gets that information from the server, not the client.
the Wordpress GMT offset option is used to let WeatherIcon know how many hours off from Greenwich Mean Time Your server is.
you can turn on the “Cache Debug” to see what time Weather Icon currently thinks it is.
You can access the wordpress GMT offset option under the Wordpress Admin interface >> Options >> General.
May 16th, 2005 at 4:46 am
For some reason i’ve been getting Clear Skies and 14C reports, when it is most defianately cloudy with showers outside. I’ve gone back to using the free version of http://www.liveweatherfeed.com/ - i’ll keep popping back here to check on a new release. But for now i can’t be pluging it in and see if it works!
May 16th, 2005 at 11:42 am
dear jeremiah..
i used wp ver 1.5 but still have an error ; Warning: fopen(/home/../public_html/blog/wp-content/plugins/WeatherIcon/cache/metar_cache_LEBL.txt): failed to open stream: Permission denied in /home/../public_html/blog/wp-content/plugins/WeatherIcon.php on line 681
what shoul i do.. thanks
May 17th, 2005 at 3:47 am
please somebody help me how to change F to Celsius… thanks
May 17th, 2005 at 7:00 pm
Day:
you need to set the permissions on the “cache” folder to 777
and you can change from F to C on the options page.. under The Wordpress Admin interface.
May 26th, 2005 at 7:50 am
Thanks for the plugin - I like it a lot.
What I would wish for very much:
Couldn´t the plugin also show the local time? That is something I would appreciate.
And: Sunrise and sunset have to be manually corrected every now and then? Or is there a possibility to get that automatically done (I do not even know the correct dates usually)? How do you do that?
Thanks again, the plugin is very good! Kind regards
May 26th, 2005 at 7:51 am
Sorry, I forgot to add my personal data. I was the one asking about display of local time and automatic adjusting of sunrise and sunset times.
May 27th, 2005 at 1:47 am
[…] 折腾WP。 自从升级为WordPress 1.5.1以后,BAStats便不能再用。等安装完WeatherIcon之后,连OSA也挂了。所以,老板刚一走,便寻回这些插 […]
May 29th, 2005 at 2:33 am
Excellent plugin! Works great for me. I have a couple of questions, though:
1)Can anyone tell me how to center it. I tried to add:
.weather_title { font-weight: bold; }
.weather { text-align: center; }
.weather ul li { text-align: center; }
to my theme’s “style.css” file (I couldn’t find any “wp-layout.css” file, so I assumed that’s the one Jeremiah was talking about), but nothing happened.
2) Is there any way to make this work with the “polyglot” plugin? My blog is in three languages, so it would be nice if my readers could choose their prefered language.
May 31st, 2005 at 7:29 am
>Marchal
I second that motion. Seriously, a plugin showing the local time would be really great. I have been using a Java script on my old webpage thinking it was showing the time in Japan, when I realized YESTERDAY it was merely matching the clock of the computer I was using… (sigh)
June 3rd, 2005 at 1:05 pm
Will this work with Windows 2000 Professional? I haven’t been able to get this thing going with my IIS server.
June 3rd, 2005 at 3:09 pm
Marchal:
the local time is doable, but I haven’t had time to work on the weather plugin in a while. Sorry. ;-(
I will try and add that feature the next time a have a few moments to work on it.
Sylvian:
that should have worked. did you refresh the page after you added those lines?
Felicia:
if php works then it should work.. I don’t think I’m doing anything exotic in there.
I have it running on windowsXP, but I’m using Apache. I don’t have any experiance with IIS. Sorry.
–Jeremiah
June 3rd, 2005 at 3:14 pm
oh, forgot these:
Automatic adjusting of sunrise and sunset is probably doable, but difficult. I doubt that I will be trying that. I may look into it and see, but don’t hold your breath.
and I’ve never used the polyglot plugin. I will have to look at it and see if it can be made to work.
and unfortunantly, as with the other feature requests, I’m just short on time right now.
the code isn’t all that complicated. if you know someone with some php skills, they could probably add those features for you.
–Jeremiah
June 3rd, 2005 at 5:44 pm
I installed everything the way instructed, and am running WP 1.5, and I am getting this error when I turn on the plugged.
Warning: fopen(/home/.sagan/daria/dariaunplugged.com/wp-content/plugins/WeatherIcon/cache/metar_cache_KSMF.txt): failed to open stream: Permission denied in /home/.sagan/daria/dariaunplugged.com/wp-content/plugins/WeatherIcon.php on line 681
I am hosted on Dreamhost, and I remember them saying they were turning off a PhP function to eliminate security holes. Did they turn of my function? Can I run the plugin any other way if they did?
June 3rd, 2005 at 8:25 pm
Lisa: see comment number 80
–Jeremiah
June 5th, 2005 at 11:23 am
Hello i wait for the script start working but still nothing.
I got the chmod cache 777 folder.
I got there 0 size file:
metar_cache_EPWA.txt
This is Poland Warsaw.
See it yourself :
Warsaw, Poland
* Weather data not available
http://www.guistyles.com
June 5th, 2005 at 8:12 pm
>Jeremiah
It worked, thanx!
>Peter
Sometimes the weather station you’re requesting info from is not sending any, hence the “Weather data not available” message. The best way to test this is to use the original tag (i.e.
Lufkin, Texas
), and see if you get the same results as on Jeremiah’s page: If you don’t, then obviously your settings are wrong. If you do, then the problem is with the Warsaw station.
Hope this helps…
June 6th, 2005 at 1:09 pm
Well it doesn’t work.
I’ve test it from yesterday , with 3 region setup.
Still * Weather data not available
How to solve the problem ?
June 8th, 2005 at 5:15 am
i got an error,
”
Warning: fopen(/home/twenty4/public_html/24hrz/wp-content/plugins/WeatherIcon/cache/metar_cache_VHHH.txt): failed to open stream: No such file or directory in /home/twenty4/public_html/24hrz/wp-content/plugins/WeatherIcon.php on line 681″
how can i fix it? thx for help
June 9th, 2005 at 1:32 am
[…] for WordPress, to do all sorts of wonderful tasks. For instance, one of these plugins, the WeatherIcon, offers a nice little list with weather information, as you can see in […]
June 9th, 2005 at 12:12 pm
[…] Posted in WordPress at 11:11 am by Administrator I fixed my little problem with the WeatherIcon. I wanted to make the various weather icons I was using in my Weather a […]
June 9th, 2005 at 9:23 pm
how can i change my weather zone ??
June 13th, 2005 at 11:39 pm
failed to open stream: Permission denied
Error is caused by inability to connect to server and retrieve data. Usually this is server settings preventing the current retrieval method from working. I’m finding fopen/fsockopen are ‘going away’ but not instant-failing on my host, and curl doesn’t seem to be fairing much better. I might have to use my own HTML-retrieval class to make this work…
-d
June 15th, 2005 at 6:16 pm
Thanks for the great plugin! One little niggle, if you find the time to fix it (heh):
Since the plugin gets the time from the server, it isn’t quite accurate if you’re showing the weather from multiple time zones. For example, on my site, I show my weather in NYC, and my sister’s weather in Melbourne. If it’s night here, it’s day there, but the weather plugin displays the day (or night) icons for both cities. The ideal behaviour would be for the plugin to get the weather local’s time from the weather data, or elsewhere if it’s not in the weather data.
But it’s no biggie, it still tells me the weather! Thanks!
June 20th, 2005 at 12:37 am
I am just amazed at the work that went into this. Stunned. The way you made it coincide with the NOAA…I’m just, well, floored (I snuck a peek at that php code - all I can say is daaaaaaang) and, by golly, it works beautifully!!!!
Thanks for a really cool plug-in…the first I’ve been able to install without a single problem. I’m quite proud of myself
And my hat goes off to you guys for being so smart
Heh. Cool. Thanks.
June 24th, 2005 at 3:34 pm
Hey Jeremiah, excellent work. I’m not sure if youve fixed the PNG alpha transparancy issue in Internet Explorer, but if you havent, I wrote a fix for it back in October 2004. Keep in mind I wrote this back during WP1.2, and pre-Weather 2.0.
http://purelogik.com/personal/website/?p=3
Thats the URL, if you’re interested.
Also, I’m using the 1.5 Default theme, and as you may well know, the list items have a >> symbol next to them. This poses a problem for the weather icon itself, becasue it too is a list item.
I dont really know where to edit the HTML to change the inline CSS for only that list item. Im guessing its in WeatherIcon.php, but from what I can tell, most of it is code for the Admin options page. If you could tell me what to edit, that would be great.
Again, EXCELLENT WORK. I LOVE the options page.
June 24th, 2005 at 3:55 pm
UPDATE: I THINK Ive narrowed it down to lines 498 - 504 in WeatherIcon.php. Is that where I would somehow tell the images list item to not use the list items symbol (set in styles.css)?
June 24th, 2005 at 4:11 pm
Matthew:
You found it!
specifically lines 499 and 505
the $before and $after are defined as <li> and </li> respectivly.. just change those 2 lines and you should get the effect you’re looking for.
–Jeremiah
June 24th, 2005 at 4:19 pm
Yes, thank very much.
It makes sense now. Those “tags” are defined once (as and ) somewhere else in the code as “$before” and “$after”, and wrap around each list item (if it is checked to display).
Keep up the good work.
June 24th, 2005 at 4:20 pm
Darn parsed HTML
June 26th, 2005 at 9:26 pm
Hi,
I can’t seem to figure out how to display the stuff I want and stuff I don’t want. Like I only want “Temp, Clouds”. Nothing else. I checked the WeatherIcon.php and there was some bunch of stuff I was tempted to change, but didn’t as I didn’t wanna mess it up. Your help will be appreciated.
Regards,
Bilal
June 26th, 2005 at 9:28 pm
Also, how do I change the icons? Very sorry, forgot to add this question in the previous comment.
June 26th, 2005 at 10:51 pm
Ok I removed the stuff I wanted. So could you please answer 2 of my questions:
1. How to change the spacing?
2. How to change the icons? I want the other ones. The 2D ones.
Thank you.
June 27th, 2005 at 1:07 pm
Ok nevermind, I found out how to change the icons and the displaying stuff. I’m very sorry for posting these comments again and again.
My final question is how do I reduce the spacing? Check my site here : http://xeenat.com/wordpress
I want the icon to be centered, and temp and clouds with the bullets I have. Doesn’t work for me. >.
June 27th, 2005 at 3:09 pm
Well my plugins just say :
Weather data not available
But in the cache folder i have this :
metar_cache_EPWA.txt
I don’t know what is the problem , ale the configure things is good.
June 27th, 2005 at 5:26 pm
Peter, maybe your station isn’t working. The place where I live had 2 station codes and only one of them worked. =/
June 28th, 2005 at 9:55 am
No i try with the default , then change to another and nothing still that :
Weather data not available
June 28th, 2005 at 11:41 am
Try it again. Download the WeatherIcon2 again and follow the instructions.
July 3rd, 2005 at 4:15 pm
Hi. I have a REALLY dumb question here…
I just upgraded to Wordpress 1.5.1.3 today and I installed this WeatherIcon plugin. I am all ready to go…but I can’t figure out for the life of me what file to paste the code into if I want it to display at the top of the sidebar to my blog. It’s right on the main page. I thought it would be index.php, but that didn’t work. Can anyone help?
July 4th, 2005 at 10:53 am
Chris:
in the wordpress admin upder “presentation” choose “Theme Editor”
it’s the “Sidebar Template”
–Jeremiah
July 6th, 2005 at 2:11 am
Hi, I’m based in China and configured it ok. Problem is that it shows a night-time image when it’s really day time (I should know, I’m in the country!). I thought of swapping over the images from night to day, but wondered if there is an easier way to change the code?
Thanks
July 6th, 2005 at 11:02 pm
Current Weather Conditions
I just finished adding the current weather conditions for Charlotte on the sidebar (see right under categories). It is rather nice, seeing as it does not get any information from Weather.com or another 3rd party source. It receives its conditions from…
July 7th, 2005 at 8:32 am
Hi from Denmark
(i guess that also explains my poor english …)
I installed wordpress 4 days ago, and for the last 3 days i have been trying to install your weathericon plugin.
I have tryed everything, but it just won work.
When i see it on other blogs it looks great, and i would lige to put it on mine aswell. Actually the blog im setting up is for my little brother -he is moving to Irak, and it would be nice to have the weather in Irak to show on the page.
I tried placing the php code almost everywhere. either nothing happens or i cant see the blog …
Can anyone help me?
July 10th, 2005 at 12:15 am
The plug-in worked great, until I tried to set the options. All of the options were scrambled, and when I tried to save the options, the plug-in could no longer find my cache file, etc. because garbage data was written as its path.
After hours of futzing, I realized the problem — the current version (2.0.1) uses short open tags for echoing the options. Unfortunately, the PHP server at my university has short_open_tags set to false.
I did a find and replace in WeatherIcon.php, changing
July 10th, 2005 at 12:22 pm
#114:
I’m from Denmark too - just installed WordPress and WeatherIcon …. worked perfectly in the first try.
Please send me a mail, and I’ll help you (in Danish) - we might want to work on a Danish localization at the same time
July 12th, 2005 at 12:11 am
Hello
i like it very much,but i am not using WP. Could i use it in a different blog program?
Thank you very much!
Regards
July 18th, 2005 at 5:30 pm
Hi,
Thanks for your neat weather plugin. I would like to disply the wind speed in meter/second. Is there some way to make that happen, and if so where in the code should I make changes? cheers,
July 21st, 2005 at 4:03 pm
I’m getting this error but it still displays the info as you can see below. I’m running it on my IIS5.1 server at home. I’ve read the comments above and everyone keeps saying to chmod 7777. What is that? i don’t think thats something IIS5.1 words it.
————————–
Warning: fopen(c:\inetpub\wwwroot/wp-content/plugins/WeatherIcon/cache/metar_cache_KHWO.txt): failed to open stream: Permission denied in c:\inetpub\wwwroot\wp-content\plugins\WeatherIcon.php on line 681
Temp: 91°F
Heat Index: 100°F
Humidity: 56%
Wind: ESE at 13 kt, gusting to 16 kt
Dew Point: 73°F
Barometer: 30.04″ Hg (1017 hPa)
Clouds: partly cloudy
Visibility: 10 miles
—————————
thanks
July 21st, 2005 at 8:19 pm
never mind everyone I figured it out.
July 21st, 2005 at 8:43 pm
How do take off the black background from behind? I think it would be nicer looking if it was a transparency without the black.
thanks
July 22nd, 2005 at 7:21 am
Luis,
Glad you got it working. I don’t have any experiance with IIS.
for anyone else looking this was all I could find:
http://www.1planhost.com/support/s_CHMOD-tutorial.asp
the black background is caused by a flaw in internet explorer.
it looks correct in any other browser.
See comment #98 for an internet explorer fix.
–Jeremiah
July 25th, 2005 at 5:53 pm
RE: Comment #121
Luis: You’re probably using IE. IE doesn’t support PNG transparency because IE is a piece of junk. Either convert it to GIF or switch to a better browser.
July 25th, 2005 at 5:55 pm
Now for my comment:
Why are you using NOAA or whatever? They’re reporting 70F here according to your plugin while Weather.com, WeatherUnderground.com, my home thermometer, and me are all reporting temps in the mid-80’s. I’m in Portland, OR BTW.
You could also use Weather Underground’s RSS feed: http://www.weatherunderground.com/auto/rss_full/OR/Portland.xml
Just have the user like drop in that URL into the function.
I actually may decide to hack your plugin to use WU if NOAA keeps reporting the wrong temp.
July 26th, 2005 at 3:25 pm
Viper007Bond: Feel free to hack away. The main problem is that the data is already translated into human readable format, which would require rewriting about 80% of the plugin, since it is designed to translate METAR data.
Anders: Yes. First you’ll want to add a new wind_unit variable.
Add this line around line 146 (may be different on yours, I’m not sure how far off baseline my code is right now):
>Meters per Second
put it between km/h and mph. This will allow you to select meters per second. Before doing so, though, we’ll have to fix the function speed, defined in the function get_wind (around line 676) and … errr, wait a second, somethings not right here …
case ‘km/hMPS’:
return round($part * 1000) . ” $wind_unit”;
This line (around 713) is wrong. It should read
case ‘km/hMPS’:
return round($part * 3.6) . ” $wind_unit”;
I must have been drunk when that line was written … or someone else wrote it. In any case, getting back to the code, we we are adding the following case statements into speed:
// Convert to meters per second
case ‘m/sKT’:
return round(0.514 * $part) . ” $wind_unit”; // from knots
case ‘m/sMPS’:
return $part . ” $wind_unit”; // from meter/sec
case ‘m/sKMH’:
return round(0.278 * $part) . ” $wind_unit”; // from km/h
Voila. Meters per second.
July 26th, 2005 at 3:26 pm
Crap.
HTML.
Add this line around line 146 (may be different on yours, I’m not sure how far off baseline my code is right now):
<option value=”m/s” <?= ($weather_settings[’wind_units’]==’mps’)?”selected”:”" ?>>Meters per Second</option>
July 26th, 2005 at 3:32 pm
And there is a bug in the code *sigh* It should read:
>Meters per Second
PS: Sorry Michael for the short open tags, I completely forgot that that wasn’t standard PHP.
July 26th, 2005 at 3:43 pm
HTML again … I’m really slow some days.
<option value=”m/s” <?= ($weather_settings[’wind_units’]==’m/s’)?”selected”:”" ?>><?php _e(’Meters per Second’, ‘WeatherIcon’); ?></option>
July 26th, 2005 at 4:01 pm
Viper007Bond: Actually, thinking about it, the WU RSS feed and the NOAA metar might work nicely side by side. Basically you’ll have to write new get_metar & process_metar functions (call them say get_wu_rss and process_wu_rss) and rename the existing ones to say get_NOAA_metar and process_NOAA_metar. Then add an option on the option page to select between them. The hard part still exists, but at least it wouldn’t result in a plugin split.
July 26th, 2005 at 5:11 pm
Ooo, that’s not a bad idea combining the two. I had started work on just writing my own weather plugin, but I like your idea of combining the two.
And here’s what I have so far (I’m calling the function at the bottom of the script for dev purposes): http://www.viper007bond