WordPress.org

Ready to get started?Download WordPress

Forums

weather plugin icon's not working (56 posts)

  1. Keely
    Member
    Posted 9 years ago #

    I use the Weather Icon plugin. Are you sure you followed this instruction?
    "Then edit the weather.php file to point to the
    'wicons' folder and set the other options listed there.
    make sure you set write access on the cache folder."
    My icons are in a folder with 755 permissions also, so you should be fine there. I used the full http path to the icons folder in the weather.php file.

  2. zoblue
    Member
    Posted 9 years ago #

    Wait, what cache folder? Does the plugin create a cache folder? Like the CG FeedRead plugin does? I don't see any cache folder related to weather anywhere on my site. Could that be my problem?
    The full path in the php file is: 'http://blog.zoblue.com/wp-images/wicons/';
    If you try: http://blog.zoblue.com/wp-images/wicons/0cloud.png the image does show up so that works. Arrgghghhg!!

  3. Keely
    Member
    Posted 9 years ago #

    I have a weather_cache subfolder in my plugin folder, set with write access. I *think* this has to do with updating the weather to current conditions, tho, and not the icon display. Also, did you set the use_icon_status to 'yes' in the weather.php file?
    as an example, my icon path in weather.php is set to http://www.sportfolio.sportsintel.net/images/gif-wicons-black-background/ and I have the icon extension set to 'gif' (yours would be the png extension, apparently) and the abs path to my weather cache is /home/sportsin/public_html/sportfolio/wp-content/plugins/weather_cache
    All that is set in the weather.php file.

  4. dss
    Member
    Posted 9 years ago #

    i had trouble getting the whole thing working until i sorted out the folder and file permissions (all the icons are unreadable, you have to set them all to 755) and creating and setting permissions correctly for the cache folder.
    now it's a workin just fine.
    : )

  5. zoblue
    Member
    Posted 9 years ago #

    Ok, I have tried all of the above to get the WeatherIcon plugin to work.
    The icon folder is set to 755 permissions on the folder AND the images themselves. The code in weather.php is:
    $icon_location = 'http://blog.zoblue.com/wp-images/wicons/';
    and the cache folder I created since it wasn't there and set permissions to 755 and the code is (with line breaks for clarity):
    $cache_path = '/home/zobluec/public_html/blog/wp-content/
    plugins/weather_cache';

    The permissions on weather.php itself is 644.
    The icon extension is correct '.png' and the icon status is set to 'yes'
    I bet it's the smallest, dumbest thing.... if anyone has any other tips for me, please share! Otherwise, I'll be banging my head against the wall while I keep troubleshooting. :'(

  6. Keely
    Member
    Posted 9 years ago #

    Going with the smallest thing ... you did activate the plugin in your admin panel? I'm not seeing the weather output on your blog at all.
    If so, all I would try is going through weather.php again and checking that you've set all the options (there's many to set -- he's included commentary throughout the file on what/how it should be set)

  7. zoblue
    Member
    Posted 9 years ago #

    Sorry, the test page I set up is here:
    http://blog.zoblue.com/a-weather.php
    Both the weather plugins I'm trying are activated.

  8. Beel
    Member
    Posted 9 years ago #

    Change the permissions for the image folder so that we may get a directory listing of what is there.

  9. zoblue
    Member
    Posted 9 years ago #

    Ok, I hadda edit my .htaccess file. Directory listing is now open on the images folder:
    http://blog.zoblue.com/wp-images/wicons/

  10. Jeremiah
    Member
    Posted 9 years ago #

    zoblue:
    interesting problem.
    have you tried a different location code?
    it's possible that the METAR data for "Chicago, IL" is not in the formated the way the plugins are expecting, and that might be causing the plugin some confusion as to which icon to use.
    I can't really think of anything else that would cause the problem that you're having, since you seem to have everything in order.
    --Jeremiah

  11. zoblue
    Member
    Posted 9 years ago #

    Jeremiah,
    I have tried other codes, even the default code that comes with the plugins. I got the city name, temp, everything, except the icon. :(
    As a test, I added NYC, NY to my test weather page, and same thing (see the bottom half):
    http://blog.zoblue.com/a-weather.php
    Arrghghg!!

  12. lawtai
    Member
    Posted 9 years ago #

    hmm, is it possible to make a reference call inside of the weather.php file to a pngfix.js file instead of doing it in the index.php file?

  13. zoblue
    Member
    Posted 9 years ago #

    huh what? u lost me, I'm lost, where am I?
    Well, I supposed anything's possible... but I wouldn't know what needs to be fixed.

  14. Jeremiah
    Member
    Posted 9 years ago #

    http://www.sonicpling.net/weather/weather-KORD.php
    well, the METAR data must be ok, the icon is showing up fine for me.
    do you know what version of php you are running?
    have you checked your server's error log?
    --Jeremiah

  15. zoblue
    Member
    Posted 9 years ago #

    This shows up in today's error log:
    File does not exist: /home/zobluec/public_html/blog/wp-images/weather-icons/.png
    I'm not sure how to read the raw log file. I can see GET 404.shtml lines for my a-weather.php test page, but it doesn't say what the 404 error page is for.
    The PHP version my host runs is no.: 4.3.8.

  16. Beel
    Member
    Posted 9 years ago #

    Assuming the metar data doesn't change before you do this, try finding the line:
    $wxInfo['CONDITIONS_SEVERITY']=='0') && $wxInfo['CLOUDS_STATUS']=='1')
    and change the severity to =='' and see if an image pops up. This is not a fix, just a test.

  17. zoblue
    Member
    Posted 9 years ago #

    I changed it, and still got nothing. This is getting to be very strange. *cue twilight zone music*
    blog.zoblue.com/a-weather.php
    Let me check it again when I get home from work just in case. I'll edit this post either way.

  18. Jeremiah
    Member
    Posted 9 years ago #

    What's really odd to me is that Weather Icon, and Get Weather are both failing here.
    As far as I know there's not any code shared between the two.
    Strange.
    (Actually, I just took a look at the code for get weather, and it's pretty impressive, and definitely not borrowing code from weather icon)
    --Jeremiah

  19. zoblue
    Member
    Posted 9 years ago #

    What's really odd to me is that Weather Icon, and Get Weather are both failing here.

    I know! That's why I'm trying both over here, cuz I wanted to see if it was just one plugin that didn't work, but both of them don't work.
    GetWeather doesn't have a debug mode from what I can tell.
    I put the '0' back in that line you asked me to change. Should I just give up?

  20. Jeremiah
    Member
    Posted 9 years ago #

    whether you want to give up or not is your call.
    I would like to try and figure this out, but it's just Dependant on your tolerance for frustration.. lol
    I do have a slightly newer version you can try if you want to.
    there are quite a few things I would like to change about the way the plugin works, but I haven't had time to make the changes lately.
    I've changed the Icon Alt and title tags to reflect the Cloud Status, and I'm wondering if those will work correctly on your server.
    I'll have a link to the new code in just a sec.
    --Jeremiah

  21. Jeremiah
    Member
    Posted 9 years ago #

    here you go:
    http://www.sonicpling.net/weather/weather.phps
    version 1.1.3
    I got rid of some redundancy in the code that I had introduced with the addition of the $icon_extension bit. (I don't know what I was thinking there. now it only appears in 2 places instead of 10+)
    made the condition status debug part of the full debug group and controlled by the cache_debug variable.
    Made the Icon Alt and Title tags reflect the icon that should be chosen rather than a generic status.
    no real substantial changes, and I doubt that it will make a difference, but it might be worth a try anyway.
    --Jeremiah

  22. Anonymous
    Unregistered
    Posted 9 years ago #

    I've udpated the weather.php file and I still get no icon. But I'm going to give it a few hours, just in case.
    I do get the title attribute to show up:
    <img src='http://blog.zoblue.com/wp-images/wicons/.png' alt='' title='mostly cloudy'/> So at least that works. :-S
    Like I said, I'm going to wait a few hours to see if it fixes itself (I can wish can't I?).

  23. zoblue
    Member
    Posted 9 years ago #

    The above post was made by me, just forgot to log in.

  24. Beel
    Member
    Posted 9 years ago #

    I suspect you are going to have to look elsewhere for solving your problem - like some setting in php.ini

  25. Jeremiah
    Member
    Posted 9 years ago #

    I wonder why just that one bit of code is failing though.
    It's really not doing anything that the rest of the code isn't doing.
    this (to my untrained eye) is a very odd case.
    maybe we can put some debug information into the icon choosing code and give that a shot.
    let me see what I can come up with.
    --Jeremiah

  26. zoblue
    Member
    Posted 9 years ago #

    Ok, cool. Thanks :D

  27. Jeremiah
    Member
    Posted 9 years ago #

    Try this:
    http://www.sonicpling.net/weather/weather.phps
    version 1.1.4
    I've changed the way it writes out the icon info and added a little more debug information.
    --Jeremiah

  28. lawtai
    Member
    Posted 9 years ago #

    are any of these 2 versions worth using if you currently don't have any problems and are using an older version?

  29. Beel
    Member
    Posted 9 years ago #

    No

  30. Jeremiah
    Member
    Posted 9 years ago #

    Beel is far more industrious than I ;-)
    I'm just a hack. (know just enough to get myself into trouble).. lol
    --Jeremiah

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.