Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080

Now available: AJAX/PHP multilingual website templates

Discussion of Ken True's web site templates

Moderator: saratogaWX

User avatar
saratogaWX
Posts: 1238
Joined: Wed 06 May 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows 10 Professional
Location: Saratoga, CA, USA
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Post 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
josebp
Posts: 65
Joined: Tue 13 Apr 2010 11:37 am
Weather Station: Davis Vantage Pro2
Operating System: WINDOWS 10
Location: Sevilla, España
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Post by josebp »

Thanks Ken.
Best regards,
José
Image
n9mfk
Posts: 845
Joined: Sun 10 May 2009 8:52 pm
Weather Station: davis vp2 Serial datalogger
Operating System: Windows 7 64-bit
Location: Springfield, IL

Re: Now available: AJAX/PHP multilingual website templates

Post 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
User avatar
saratogaWX
Posts: 1238
Joined: Wed 06 May 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows 10 Professional
Location: Saratoga, CA, USA
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Post 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
User avatar
saratogaWX
Posts: 1238
Joined: Wed 06 May 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows 10 Professional
Location: Saratoga, CA, USA
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Post 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
You do not have the required permissions to view the files attached to this post.
User avatar
nitrx
Posts: 1297
Joined: Sun 13 Dec 2009 1:21 pm
Weather Station: WH1080
Operating System: Windows 10
Location: Apeldoorn The Netherlands
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Post by nitrx »

Thank Ken works fine for The Netherlands, maybe time to look for other forecasts like yr.no, wunderground is getting annoying
josebp
Posts: 65
Joined: Tue 13 Apr 2010 11:37 am
Weather Station: Davis Vantage Pro2
Operating System: WINDOWS 10
Location: Sevilla, España
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Post 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. :lol:
Thank you very much for your work. :clap:
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. :lol:
Muchas gracias por su trabajo. :clap:
Saludos,
José
Image
SouthUistWX
Posts: 12
Joined: Wed 08 Dec 2010 8:15 pm
Weather Station: Davis VP2
Operating System: Windows 7
Location: Isle of South Uist
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Post by SouthUistWX »

Hi Ken, many thanks for your grand effort in fixing this :clap:
---------------------------------------------------------------------------------------------
Image
miki41254
Posts: 20
Joined: Tue 20 Jan 2009 7:31 pm
Weather Station: W-8681
Operating System: Windows XP SP3
Location: Telese Terme Italy
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Post by miki41254 »

Hi Ken, thank you very much for the solution very fast.
Mick
User avatar
JennyLeez
Posts: 336
Joined: Wed 16 Dec 2009 2:32 am
Weather Station: La Crosse WS3083
Operating System: Windows XP, Win7 & Win 10
Location: Wairoa, Hawkes Bay. New Zealand.
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Post 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
Wairoa, Hawkes Bay, New Zealand Weather Station:
http://wairoa.net/weather/index.htm
Cumulus Topsites:
http://cumulussites.net/
Image
miki41254
Posts: 20
Joined: Tue 20 Jan 2009 7:31 pm
Weather Station: W-8681
Operating System: Windows XP SP3
Location: Telese Terme Italy
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Post by miki41254 »

Hi all, my website, between 23.00 and 00.00 always shows 01:00
foto.jpg
How can I fix?

Mick
You do not have the required permissions to view the files attached to this post.
User avatar
saratogaWX
Posts: 1238
Joined: Wed 06 May 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows 10 Professional
Location: Saratoga, CA, USA
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Post 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
User avatar
saratogaWX
Posts: 1238
Joined: Wed 06 May 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows 10 Professional
Location: Saratoga, CA, USA
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Post by saratogaWX »

Try this for a quick fix in CU-defs.php in the function CU_fixupTime() change

Code: Select all

  $t = explode(':',$tfixed);
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
User avatar
saratogaWX
Posts: 1238
Joined: Wed 06 May 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows 10 Professional
Location: Saratoga, CA, USA
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Post 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
miki41254
Posts: 20
Joined: Tue 20 Jan 2009 7:31 pm
Weather Station: W-8681
Operating System: Windows XP SP3
Location: Telese Terme Italy
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Post 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.
Post Reply