Viewing 15 replies - 31 through 45 (of 56 total)
  • We bothed hacked, just differently ??
    By adding the option to debug the conditions I was able to find what the conditions were when an image did not show up (ie, “Drizzle”) and added it to elseif statements (the image I chose is the same as light rain)

    Thread Starter zoblue

    (@zoblue)

    Jeremiah,
    Wonderful! Beautiful! Stunning! Thank you so much!
    https://blog.zoblue.com/a-weather.php
    Yay!! Now to add the function to all my other pages ??
    Thanks again, I am in awe.

    Now I guess I am going to have to look at the code to see what is different that enabled you to get the image name…

    I see absolutely no reason why your images should show up with the difference in code changes – are you sure, zoblue, that you didn’t tweak something else ??

    Thread Starter zoblue

    (@zoblue)

    I’m pretty sure I didn’t tweak anything else. I did a straight copy & paste into the weather.php file. I entered the url for the image icons (line 50) and the url for the weather-cache folder (line 53).
    I edited two more lines: line 214
    ._BAROMETER." ".$wxInfo['BAROMETER'].
    became this:
    ._BAROMETER."</span> <span class='weather_info'>".$wxInfo['BAROMETER'].
    and the same for line 217 for visibility. That way the words “barometer” and “visibility” could be bolded and the values show up as normal. ??
    But I didn’t touch anything else, as far as I can remember. I didn’t change anything in the images folder, or change the permissions, or in WP’s control panel. ??

    I noticed that the last debug set that I had offered had listed the title attribute, but not the alt attribute, even though both were calling the exact same variable ($wxInfo[‘CLOUDS’]) and they were both working on my server.
    plus, the image selection code must have been working, or the image name variable would have been null and none of the img tag would have been written out at all.
    so my assumption is that there is something broken in zoblue’s php
    thats causing multiple calls to the a variable on a single line to fail.
    so I just broke the img tag apart so that it was written on seperate lines:
    if ($use_icon_status == 'yes' && $wxInfo['ICON']<>''){
    $weather .= '

    • <img src="';
      $weather .= $icon_location;
      $weather .= $wxInfo['ICON'];
      $weather .= $icon_extension;
      $weather .= '" alt="';
      $weather .= $wxInfo['CLOUDS'];
      $weather .= '" title="';
      $weather .= $wxInfo['CLOUDS'];
      $weather .= '"/>
    • ';
      }
      In other word’s I didn’t fix whatever problem you have with php, I just worked around it.
      –Jeremiah

    I had this same problem when I installed this plugin… Never did find the problem, but when I cut up the code to replace the

    • s with a heading and definition list it all fixed itself :\
      Jeremiah – Glad you took my suggestion about alt text.
      If anyone wants a version of Jeramiah’s plugin that outputs half as much markup to display exactly the same info, it’s available here:
      https://leftjustified.net/wp-content/code-snippets/weather_php.txt
      …but is based on version 1.1.2 of the plugin.
      Cool plugin – weird bug ??

    just realized that I reversed the quote marks as well. trading each ‘ for a ” and vis-a-versa
    that may have been what changed it.
    I’m far too lazy to research it further.
    MindlessLemming:
    I like the idea of the definition list, but once again, you’re exposing my laziness.. lol
    one of these days (I was going to join procrastinators anonymous, but I keep putting it off) I will find a way to integrate your definition list and still have it flow into the list items in wordpress the way I wanted it to.
    –Jeremiah

    Thread Starter zoblue

    (@zoblue)

    Yeah, a def list would be cool, then again, a def list for CG-Feedread would be coo too. But, eh, it’s no biggie. I’m lazy too ??

    I’m also having a small problem with the weather plugin icons. Here’s the debug info:
    Cache Timeout: 1800
    Cache File Age: 366
    Hour: 03Condition status:
    Cloud Status: 3
    Condition Severity:
    Icon Should Be: n_3cloud_norain
    Toronto, Canada
    Temp: 10?°C
    Clouds: mostly cloudy
    Cache Timeout: 1800
    Cache File Age: 366
    Hour: 03Condition status:
    Cloud Status: 3
    Condition Severity: 1
    Icon Should Be: n_
    Tokyo, Japan
    Temp: 19?°C
    Clouds: mostly cloudy
    Conditions: light drizzle
    As you can see it’s not showing the ‘conditions’ for the first entry and then it’s not showing the picture for the second entry. You can see it at https://www.noemitm.ca

    N/m about the problem above. After reading the ‘other’ thread related to this plugin it seems like it’s just the problem with unknown condition. It seems like the icon is showing up ok now. Thanks for the great plugin.

    Yeah, “drizzle” does not have an image. I just tweaked the code to add it and used the image for light rain. Another alternative for conditions for which there are no images is to just make an “n_.jpg” and create your own catchall image (maybe which says, “no image available”)
    Right now I am trying out xoapWeather to see if I like the forecast, etc. provided by The Weather Channel.

    I have this same problem. my .pngs under the wicons folder won’t display. I keep getting a text msg “vertical visibility to 100 ft”, and i am using the newest version of this. (2.0) or whatever it is. so for now im using .pngs…..can anyone help me solve this problem?

    Getting this error:

    Warning: fopen(httpdocs/wp-content/plugins/weather_cache/metar_cache_EGLL.txt): failed to open stream: No such file or directory in /home/httpd/vhosts/greatblighty.com/httpdocs/wp-content/plugins/weather.php on line 315

    Any ideas?

    Is there a weather_cache directory inside your plugins directory? Is it writeable by the server?

Viewing 15 replies - 31 through 45 (of 56 total)
  • The topic ‘weather plugin icon’s not working’ is closed to new replies.