WordPress.org

Ready to get started?Download WordPress

Forums

Weather Forecast - WP Wunderground
[resolved] icons-ecast hosed (34 posts)

  1. dmh123c
    Member
    Posted 1 year ago #

    http://icons-ecast.wxug.com/ no longer serves images, or anything. I've updated wunderground.php to use icons-ak which fixes it, but it's probably not where you want us to link.

    http://wordpress.org/extend/plugins/wunderground/

  2. montygothic
    Member
    Posted 1 year ago #

    My icons have been impacted to as has everyones I guess. Can you elaborate how you updated the wunderground.php to use different icons?

  3. wdesousa
    Member
    Posted 1 year ago #

    Hey dmh123c.

    Good work on finding a fix. I'm struggling to find the icons.ak server you mention. I tried: http://icons-ak.wxug.com/ but not available for me?

    any tips? thanks

  4. LingoSam
    Member
    Posted 1 year ago #

    You need to edit the WP Wunderground plugin, or wait for an official plugin update.

    If your impatient like myself:

    Log into the back of your site WordPress login.
    Select "Plugins>Editor".

    The file you need to edit is wunderground.php (After selecting 'WP Wunderground').

    Find all instances of http://icons-ecast.wxug.com/ and replace them with http://icons-ak.wxug.com/

    This is easier done if you copy and paste the code into a code editor, Sublime text for instance as you can use the 'find and replace' feature. (then you can just paste the code back in browser, and save.)

  5. wdesousa
    Member
    Posted 1 year ago #

    Thanks for the tip LingoSam.

    I'm impatient lol

    Tbh I'd already replaced all instances of the URL with the new URL - in TextCrawler.

    Problem is that http://icons-ak.wxug.com/ doesn't work either - just generating 403 and 404's.. :-)

    Do we know if this is a temporary issue? Or if Wunderground are discontinuing hosting of the icon-sets?

    thanks again mate

    w

  6. dmh123c
    Member
    Posted 1 year ago #

    The root page is not available there, but the "helen" icons that I use are. http://icons-ak.wxug.com/i/c/i/partlycloudy.gif for instance.

  7. LingoSam
    Member
    Posted 1 year ago #

    No problems!

    In my above comment, I might not have explained it very well.
    I didn't mean replace it with the root folder, I mean't just replace that particular part of the url.

    So as you say in your follow up comment as an example:

    http://icons-ecast.wxug.com/i/c/k/chancerain.gif

    becomes

    http://icons-ak.wxug.com/i/c/k/chancerain.gif

    I've done this to mine, and all the images have restored.

    I don't know the actual cause.
    Could be they are simply re-organising their server, or it could be they've realised how much bandwidth is being swallowed up by plugins such as this directly linking to their hosted images.

    Ideally the plugin should install local copies of the images to avoid this.

  8. wdesousa
    Member
    Posted 1 year ago #

    Hi LingoSam,

    No i did understand you :-) and made the correct entries.

    I've actually used the short-codes option with custom formatting although this should still work.

    EDIT: Re-installed the plugin made the changes again and it's now working..

    Bizzare..

    Agree with your comment - free bandwidth is probably the issue - I may just re-code the PHP to use local images - as this new server may go offline soon as well.

    Thanks for all your help mate - appreciated :-)

  9. Jeff
    Member
    Posted 1 year ago #

    Thanks dmh and Sam for your input on this.
    I made the changes and my icons now appear. However, the "incredible" set of icons are not appearing. That was my selection so I just changed to default.
    Anyone else trying "incredible"?

  10. fuzzie
    Member
    Posted 1 year ago #

    Can I just download these icons and serve them up from my WP install?

  11. racer x
    Member
    Posted 1 year ago #

    Thanks for the link to the new icons. I also worry these will soon be not available so hoping that this gets resolved.

    If anyone is still having issues after this new icon path is in place, you can try un-checking the "Use Cache" field.

    I have to say, looking at this plugin I am a little surprised that:
    a: they hard code every image path like that (why not define a URL path for the icons?)
    b: they don't just have the icons in the plugin file itself?

    Oh well. I am certainly not complaining. I know it's a free plugin.

  12. LingoSam
    Member
    Posted 1 year ago #

    Not a problem. I've got to say like most people once i've fixed my problem, i'm outta there.

    I made the changes and my icons now appear. However, the "incredible" set of icons are not appearing. That was my selection so I just changed to default.
    Anyone else trying "incredible"?

    I am using the 'incredible' theme. (Others looked rotten in my humble opinion!)
    It must be being cached somewhere, like what racer x has noted.

    Either the plugin cache, or you might possibly have a WordPress site cache plugin like W3 total cache etc.

    I completely agree racer x. I'm much happier using my own servers bandwidth than essentially hotlinking the original site. I would happily add them to my own if I could get access to the full set.

  13. wdesousa
    Member
    Posted 1 year ago #

    Good tip Racer.

    The icons disappeared again but cache=false fixed it.

    This may fix your issues as well Jeff.

    Lingo the following page has a full list of icon-sets: http://www.wunderground.com/weather/api/d/docs?d=resources/icon-sets

    Shame they're not zipped - pain to have to save as image each one - but they are correctly named so...

    good luck all...

  14. johnbchrise
    Member
    Posted 1 year ago #

    How about just using the option of uploading your own icon set and allowing to pull form sever in which your site resides? In the wp-wunderground text file, it gives "instructions" how to do this, but it doesn't make entire sense to me. here is what the text doc says:

    If you want to use your own icons, you would add a filter to the bottom of your theme's functions.php file:

    <h3>Version 1.2+</h3>

    add_filter('wp_wunderground_forecast_icon', 'use_custom_wunderground_icons');
    
    function use_custom_wunderground_icons($content=null) { 
    
    	$myIconFolder = 'http://www.example.com/images/';
    
    	$myFileType = '.gif';
    
    	$content = preg_replace('/http\:\/\/icons\-ecast\.wxug\.com\/i\/c\/[a-z]\/(.*?)\.gif/ism', $myIconFolder.'$1'.$myFileType, $content);
    
    	return $content;
    }
    

    <h3>Version 1.1</h3>

    add_filter('wp_wunderground_forecast', 'use_custom_wunderground_icons');
    
    function use_custom_wunderground_icons($content=null) { 
    
    	$myIconFolder = 'http://www.example.com/images/';
    
    	$myFileType = '.gif';
    
    	$content = preg_replace('/http\:\/\/icons\-ecast\.wxug\.com\/i\/c\/[a-z]\/(.*?)\.gif/ism', $myIconFolder.'$1'.$myFileType, $content);
    
    	return $content;
    }
    

    Can anyone make better sense of this? What do I name the actual icons?

    Also, from the Wunderground site, vague reference is given here to adding a set of icons. Click here to view the post.

  15. wdesousa
    Member
    Posted 1 year ago #

    Hi John,

    Just add the code to your theme's functions.php file. Change the $myIconFolder path to your image path.

    Basically this code just tells the plugin to replace the path to the Wunderground icon server to your own local folder.

    As to icon names - if you grab them from http://www.wunderground.com/weather/api/d/docs?d=resources/icon-sets they are already correctly named to correspond to the different weather events.

    hope that helps.

  16. racer x
    Member
    Posted 1 year ago #

    @wdesousa - You beat me to it! I was just about to answer! hehe.

    This is a very strange method IMO. Why do all that preg_replace before output when there could have been one simple field in the settings for your own image path that would override the default path?

    Oh well. Maybe next version. I do like the plugin.

  17. wdesousa
    Member
    Posted 1 year ago #

    haha... though you're quite right Racer. It's a very roundabout way of doing things and generally I'm not a big fan of my users messing around with core theme files.

    An override in the plugin itself makes much more sense.

    Plugin is good though - about the only one I've found that allows you to use shortcodes and custom formatting....

  18. racer x
    Member
    Posted 1 year ago #

    @wdesusa - Yes, it is a good plugin. It saved me when Google dropped their support for their weather API! I wrote my own custom weather widget for that and many of my sites had to be fixed so this plugin really saved me some time.

    I also agree about users not messing with code.

  19. madblues
    Member
    Posted 1 year ago #

    I used the above suggestion at the top that LingoSam posted. Edited the wunderground.php file. It's working great now.

    I also followed Wdesousa's advice and downloaded my icon set. I plan redirect the PHP to find them hosted locally at some point.

    But for now, this is working.

    Thanks all!

  20. johnbchrise
    Member
    Posted 1 year ago #

    You guys rock for taking the time to share such detailed and great info! I will try your suggestion wdesousa as soon as I have a few minutes to dedicate to it.

  21. wdesousa
    Member
    Posted 1 year ago #

    Thanks to LingoSam, dmh123c and Racer really. They set myself and everyone on the right path..

    However, I will of course take FULL credit for everything...

    haha :-)

  22. sweettart301
    Member
    Posted 1 year ago #

    Thank you, thank you, thank you!!! To each & every one of you!

    I was actually able to fix this by following LingoSam's instructions...well, not exactly the 1st time because I didn't scroll down enough but then I went back in, found the places I missed, replaced all of the "ecast" with ak & got it to work!

    I'm a total newbie to anything code, it makes me super nervous & I worry that I'm going to break something. I just got the plugin working a couple of days ago, please that I managed to figure out how to do it then pretty bummed early today when it was all messed up. But happy now & thanks so much for helping to achieve my first successful attempt with code. (I say successful because I've tried doing a child theme but so far haven't gotten it to work right. And oh, if you click on my profile the quote "I make my living with WP" well I didn't click that box & have no idea why that's there!)

    Thanks!!!!

  23. susannetamir
    Member
    Posted 1 year ago #

    I have the same issue and om all sites i will try to replace the path, thanks for that advice,
    @sweettart iam also afraid breaking something when changing the code and
    Childthemes are much easier to do then all the complicate explanations i understand it after a long time trying with this great explanation. May be its helping you too
    http://bueltge.de/wordpress-child-themes-verstehen/1192/
    Good luck!
    Susanne

  24. pxrmx
    Member
    Posted 1 year ago #

    Thank you @johnbchrise for the filter in functions.php advice, worked perfectly for me after removing the cache="true" from the shortcode and republishing the page to get it work.

  25. susannetamir
    Member
    Posted 1 year ago #

    Cool it works!!!! Thanks a lot i could fix it on all sites indeed its a great plugin and i didn t find an alternativa so good to know that its working again!
    It seems that the iconset you used until its braked is not working , i used simple and only this one dosn t work. Incredible works for me. May be thats from the cache i will try later again.
    Anyhow this advice to change ecast to ak saved me hours trying to find something else!Have a great weekend!
    Susanne

  26. insin
    Member
    Posted 1 year ago #

    Here's a list of icons (Daytime) with URL to icons-ak if anyone wants to use it in a .txt file to batch download and then switch to local as per the FAQ. Not positive if it's complete for this set because I couldn't get a list from the API.

    Pastebin: http://pastebin.com/1XVAcZf6

    It's using /k/ in the URL for the 'Incredible' icon set but you can easily just find/replace to grab others.

    wget -i filename_with_urls.txt

  27. Floydfan
    Member
    Posted 1 year ago #

    Hi.... I replaced the old URL with http://icons-ecast.wxug.com as suggested above and yes, the icons reappeared. However, it seems that regardless of the descriptor the icon is the same, e.g today in a two-day display I have "partly cloudy" and "chance of rain", but I am getting the same icon. In this case the "partly cloudy" icon for both forecasts. I've tried changing icon sets and it makes no difference. Assuming its my error, where did I screw up in replacing the icon location string?
    (Here's the site: http://www.goring-roadrunners.org.uk/ )

  28. kjy112
    Member
    Posted 1 year ago #

  29. johnbchrise
    Member
    Posted 1 year ago #

    It's working after utilizing LingoSam's (Find all instances of http://icons-ecast.wxug.com/ and replace them with http://icons-ak.wxug.com/) fix.

    Thanks again everyone for the crucial time-saving input!

  30. kjy112
    Member
    Posted 1 year ago #

    I was thinking, perhaps, this plugin should have the icons stored locally?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic