Page 3 of 3

Re: WU-forecast.php

Posted: Fri 18 May 2018 8:05 pm
by Mapantz
I seem to suffer so badly with the WU problem. For weeks now, it is breaking 30+ times a day. I check yours, Simon, and it's working for you. I just don't get it?! :(

Re: WU-forecast.php

Posted: Sun 20 May 2018 1:25 am
by ConligWX
Mapantz wrote:I seem to suffer so badly with the WU problem. For weeks now, it is breaking 30+ times a day. I check yours, Simon, and it's working for you. I just don't get it?! :(
i added a bit of code as I found either my ./cache/WU-forecast-json-0-en.txt would be 0 bytes of incomplete. it still happens from time to time, but is much more stable.

top of my WU-Forecast.php Version 3.04 - 27-Feb-2018

Code: Select all

<?php 
$filename = './cache/WU-forecast-json-0-en.txt';

if (file_exists($filename)) {

$zerosize = filesize('./cache/WU-forecast-json-0-en.txt');

if ($zerosize < 23000) {
// if ($zerosize == 0) {
unlink('./cache/WU-forecast-json-0-en.txt');
} } 
// WU-forecast.php script by Ken True - webmaster@saratoga-weather.org
//
// Version 1.00 - 02-Sep-2007 - initial release
I found the cache when complete is about 25/26kb in file size and have had incomplete files of upto 20kb in size. its just WU as usual.

Re: WU-forecast.php

Posted: Sun 20 May 2018 2:02 pm
by Mapantz
Toxic17 wrote:
Mapantz wrote:I seem to suffer so badly with the WU problem. For weeks now, it is breaking 30+ times a day. I check yours, Simon, and it's working for you. I just don't get it?! :(
i added a bit of code as I found either my ./cache/WU-forecast-json-0-en.txt would be 0 bytes of incomplete. it still happens from time to time, but is much more stable.
Thank you Simon. I've added that to the top, let's see how she holds up?! :D

Re: WU-forecast.php

Posted: Tue 22 May 2018 10:57 am
by Mapantz
Quick update. Everything much better. I still get an empty forecast now & then, but instead of 30 times a day, it's just a couple. :)

Re: WU-forecast.php

Posted: Tue 22 May 2018 1:55 pm
by ConligWX
Mapantz wrote:Quick update. Everything much better. I still get an empty forecast now & then, but instead of 30 times a day, it's just a couple. :)
yep its not perfect, but then again WU is the issue, not our scripts.

Re: WU-forecast.php

Posted: Sat 26 May 2018 7:06 pm
by Mapantz
Normal service resumed! :(

It doesn't seem to make any difference for me. The file is some times 0 bytes, 18KB, 19KB, 21KB, 23KB and even 50KB. Damn WU.

Re: WU-forecast.php

Posted: Mon 25 Jun 2018 10:36 pm
by Mapantz
Hi Ken!

I use: $maxForecastLegendWords = 5; just to keep the wording small under the icons. Obviously, this will also only show a maximum of 5 words in the tooltip when you hover over the icon. Is there an easy change I could make where I keep the words to 5 under the icon, but show the full forecast sentence when I hover over the icon?

Nice fix in 3.05 by the way, much more stable. :)

Regards.