Page 28 of 54
Re: Now available: AJAX/PHP multilingual website templates
Posted: Tue 06 Sep 2011 7:38 pm
by saratogaWX
josebp wrote:Hi Ken, from a few minutes ago I get the following message:
Warning: Division by zero in /htdocs/public/www/WU-forecast.php on line 533
I've changed nothing and this is what makes in the extended forecast:
http://www.tiempoensevilla.es/wxforecast.php
Do you know what can be?
Thank you.
Best regards
José
------------------------------------------------------------------------------------------------
Hola Ken, desde hace unos minutos me sale el siguiente mensaje:
Warning: Division by zero in /htdocs/public/www/WU-forecast.php on line 533
No he cambiado nada y esto es lo que pone en el pronóstico extendido:
http://www.tiempoensevilla.es/wxforecast.php
¿Sabés lo que puede ser?
Gracias.
Saludos,
José
Yes, the WU-forecast.php script is no longer working due to changes in the design of the WeatherUnderground website.
I'm working on an update which should be ready later today.. I'll post a note when it's available.
Best regards,
Ken
Re: Now available: AJAX/PHP multilingual website templates
Posted: Tue 06 Sep 2011 7:43 pm
by josebp
Thanks Ken.
Best regards,
José
Re: Now available: AJAX/PHP multilingual website templates
Posted: Wed 07 Sep 2011 3:10 pm
by n9mfk
Ken,
if you had a file that get uploaded 1 time a day
how wood you set wxstatus.php to check for it
thanks Beau
Re: Now available: AJAX/PHP multilingual website templates
Posted: Wed 07 Sep 2011 5:54 pm
by saratogaWX
Sorry Beau, that (as they used to say in math classes) "is an exercise for the student".
Here's a hint. How many seconds in a day? 60*60*24=86400
Re: Now available: AJAX/PHP multilingual website templates
Posted: Wed 07 Sep 2011 5:57 pm
by saratogaWX
Thanks, WeatherUnderground website elves for complicating things
There are two updated WU-forecast.php versions:
Download:
WU-forecast.php (SA) Version 1.13 - 07-Sep-2011 for
old WD/PHP/World template set
or standalone use)
Download:
WU-forecast.php (ML) Version 1.18 - 07-Sep-2011 for
old WD/PHP/World-ML or
V3 Base-World template set)
With the new WU website changes comes a bit of a problem for English and Spanish language versions. WU has become a LOT more verbose in the text description, so the short one or two word description under the icon is now (possibly) long sentences. I don't have a good way to automatically fix that while supporting multiple languages... Sorry.
Secondly, the words they use for High and Low temperatures do not have good consistency across the various languages which may result in truncated words in the High/Low temperature under the icon. I can't fix that either.
Do send your feedback to WeatherUnderground to have them improve the specific language you are interested in.
I've attached some screenshots of the English, Spanish and Danish forecasts to show how it works with their updated website design.
Best regards,
Ken
Re: Now available: AJAX/PHP multilingual website templates
Posted: Wed 07 Sep 2011 6:17 pm
by nitrx
Thank Ken works fine for The Netherlands, maybe time to look for other forecasts like yr.no, wunderground is getting annoying
Re: Now available: AJAX/PHP multilingual website templates
Posted: Wed 07 Sep 2011 6:43 pm
by josebp
Hi Ken, running smoothly.
The translation to Spanish sure that it can be improved... but surely using a translator as I do for the English language.
Thank you very much for your work.
Best regards,
José
-----------------------------------------------------------------------------------------------------------------------------------------
Hola Ken, funcionando sin problemas.
La traducción a Español seguro que se puede mejorar... pero seguro que utilizan un traductor como yo para el idioma inglés.
Muchas gracias por su trabajo.
Saludos,
José
Re: Now available: AJAX/PHP multilingual website templates
Posted: Wed 07 Sep 2011 8:06 pm
by SouthUistWX
Hi Ken, many thanks for your grand effort in fixing this

Re: Now available: AJAX/PHP multilingual website templates
Posted: Wed 07 Sep 2011 9:39 pm
by miki41254
Hi Ken, thank you very much for the solution very fast.
Mick
Re: Now available: AJAX/PHP multilingual website templates
Posted: Thu 08 Sep 2011 12:07 am
by JennyLeez
and many thanks from me for fixing this so fast. I had a big hole on my page
You are correct with the much longer short description. When running a coupler of cycles it is now basically repeating itself.
C'est la Vie guess removing the text description will fix that.
Thanks again

Jenny
Re: Now available: AJAX/PHP multilingual website templates
Posted: Thu 08 Sep 2011 9:28 pm
by miki41254
Hi all, my website, between 23.00 and 00.00 always shows 01:00
foto.jpg
How can I fix?
Mick
Re: Now available: AJAX/PHP multilingual website templates
Posted: Fri 09 Sep 2011 1:25 am
by saratogaWX
miki41254 wrote:Hi all, my website, between 23.00 and 00.00 always shows 01:00
foto.jpg
How can I fix?
Mick
I think the issue is with your time format in your weather PC. The tags are showing
Code: Select all
$WX['date'] = '09/09/2011';
$WX['time'] = '00.02 on 09 settembre 2011';
$WX['timehhmmss'] = '00.02.26';
Generally, both the PHP and the ajaxCUwx.js expect the time formatted as HH:MM:SS and not HH.MM.SS
I'd not encountered this mode of displaying time without the colon (:) before, but I can work up fixes to accommodate it.
Best regards,
Ken
Re: Now available: AJAX/PHP multilingual website templates
Posted: Fri 09 Sep 2011 1:35 am
by saratogaWX
Try this for a quick fix in CU-defs.php in the function CU_fixupTime() change
to
Code: Select all
$t = explode(':',$tfixed);
if(!isset($t[1])) { $t = explode('.',$tfixed); }
and let me know how that works out.
ajaxCUwx doesn't process the time at all.. just uses it from realtime.txt (which is in hh:mm:ss format already).
Best regards,
Ken
Re: Now available: AJAX/PHP multilingual website templates
Posted: Fri 09 Sep 2011 7:42 pm
by saratogaWX
I've updated the CU-tags, CUdefs to have the time hh.mm fix, and beta tags current to 1.9.2beta Build-1011.
Also have fixed the 'duplicate-of-first-day' forecast issue with an update to WU-forecast.php
Updates from:
update utility
Best regards,
Ken
Re: Now available: AJAX/PHP multilingual website templates
Posted: Fri 09 Sep 2011 8:20 pm
by miki41254
I changed time format, on Windows control panel, from HH.mm.ss to HH:mm:ss
I'm waiting 23:00 to see if the problem is solved. If no, i try to change code or replace CU-tags, CUdefs.
I'll let you know how it works.
Cheers, Mick.