Page 27 of 54

Re: Now available: AJAX/PHP multilingual website templates

Posted: Sat 27 Aug 2011 9:08 pm
by n9mfk
hi ken
these are missing
there beta in 1008
<#ConsecutiveRainDays> The number of days up to (but not including) today where it has rained every day. The threshold amount of rain required to determine a rain day is configurable via the RainDayThreshold setting in cumulus.ini

<#ConsecutiveDryDays> The number of days up to (but not including) today since it last rained. The threshold amount of rain required to determine a rain day is configurable via the RainDayThreshold setting in cumulus.ini

<#LongestDryPeriod> All time longest dry period (days)
<#LongestWetPeriod> All time longest wet period (days)


Longest Dry Period <#MonthLongestDryPeriod> <#MonthLongestDryPeriodD> date
Longest Wet Period <#MonthLongestWetPeriod> <#MonthLongestWetPeriodD> date


Longest Dry Period <#YearLongestDryPeriod> <#YearLongestDryPeriodD> date
Longest Wet Period <#YearLongestWetPeriod> <#YearLongestWetPeriodD> date

beau

Re: Now available: AJAX/PHP multilingual website templates

Posted: Thu 01 Sep 2011 6:48 am
by vpokroglo
I got many date issues some time ago, but then i corrected some code and all dates seems to show ok. But now when i update to the new cu-defs file the date showing month gust data its wrong (Gust Month: 8,6 km/h Jan 1). My site is http://www.okroglovreme.com. Any sugestions?

Thanks!

Re: Now available: AJAX/PHP multilingual website templates

Posted: Thu 01 Sep 2011 10:10 am
by nitrx
vpokroglo wrote:I got many date issues some time ago, but then i corrected some code and all dates seems to show ok. But now when i update to the new cu-defs file the date showing month gust data its wrong (Gust Month: 8,6 km/h Jan 1). My site is http://www.okroglovreme.com. Any sugestions?

Thanks!
There is definitely something wrong with your CUtags.php http://www.okroglovreme.com/index.php?sce=view , but I don't know what...

Re: Now available: AJAX/PHP multilingual website templates

Posted: Thu 01 Sep 2011 11:11 am
by gemini06720
nitrx wrote:There is definitely something wrong with your CUtags.php ... but I don't know what...
Ron, it appears that you are using an older version of "gen-CUtags.php" (version 1.04) and an older version of the "tags.txt" file, both dated 22 February 2011 - both the "gen-CUtags.php" script and the "tags.txt" file were updated August 29, 2011 - latest release of the Cumulus Plugin

You might want to also upgrade the web page templates as many changes and improvements have been over the past months - the latest release of the World Templates is dated August 27, 2011

Re: Now available: AJAX/PHP multilingual website templates

Posted: Thu 01 Sep 2011 11:14 am
by nitrx
gemini06720 wrote:
nitrx wrote:There is definitely something wrong with your CUtags.php ... but I don't know what...
Ron, it appears that you are using an older version of "gen-CUtags.php" (version 1.04) and an older version of the "tags.txt" file, both dated 22 February 2011 - both the "gen-CUtags.php" script and the "tags.txt" file were updated August 29, 2011 - latest release of the Cumulus Plugin

You might want to also upgrade the web page templates as many changes and improvements have been over the past months - the latest release of the World Templates is dated August 27, 2011
I will have a look at it, but I've other date tags (made by you) and I see no problems at this moment when I've time I setup a testsite

Thanks anyway

Re: Now available: AJAX/PHP multilingual website templates

Posted: Sat 03 Sep 2011 11:04 pm
by saratogaWX
vpokroglo wrote:I got many date issues some time ago, but then i corrected some code and all dates seems to show ok. But now when i update to the new cu-defs file the date showing month gust data its wrong (Gust Month: 8,6 km/h Jan 1). My site is http://www.okroglovreme.com. Any sugestions?

Thanks!
Your version of CU-defs.php has a bug (on some PHP installations) that results in being unable to process some dates. Viewing your homepage (with view source) shows
<!-- CU_getAlltimeDate input inDate='at 15:38 on 23 avgust 2011' -->
<!-- CU_getAlltimeDate after tstr='$2 $1' -->

<!-- CU_getAlltimeDate result ltime='1 1 1970 01:00' -->
<!-- CU_getAlltimeDate input inDate='at 0:17 on 17 december 2010' -->
<!-- CU_getAlltimeDate after tstr='$2 $1' -->
<!-- CU_getAlltimeDate result ltime='1 1 1970 01:00' -->
That's why the 1-Jan-1970 date is shown for some items.

I suggest you update with http://saratoga-weather.org/wxtemplates/updates.php using 1-Aug-2011 as the selection date.

Best regards,
Ken

Re: Now available: AJAX/PHP multilingual website templates

Posted: Tue 06 Sep 2011 8:00 am
by vpokroglo
Thanks Ken for your reply.
I have done al the updates You say and some things are realy better, but Month gust date in dashboard is still wrong. its showing Gust Month: 32,4 km/h Jan 6 . But this gust was today on 6 sep, not jan 6.

Thanks!

Re: Now available: AJAX/PHP multilingual website templates

Posted: Tue 06 Sep 2011 12:32 pm
by WoodburyMan
Thanks for sharing your amazing work!

I keep getting and error though...

On the Advisories page and top header of main page, I get the following
Advisory Information Unavailable, error fetching or reading data from the NOAA advisories server.
My current zone is "CTZ013", Southern Litchfield County.
Here is my lines in Settings.php

Code: Select all

// NOAA warning zone
$SITE['noaazone'] 		= 'CTZ013'; // used for NOAA advisories and advforecast2.php forecasts
$SITE['hurlURL']		= "wxadvisory.php"; // page to launch for details on NOAA advisories
// 
I believe I have done everything right... anyone point me to what might be wrong?
I have my site set up temporarily running on http://grudzien.no-ip.org:8080/weather/new/
(My site runs on grudzien.us that just forwards to a DYDNS site run locally rather than hosting remotely)

Re: Now available: AJAX/PHP multilingual website templates

Posted: Tue 06 Sep 2011 2:33 pm
by saratogaWX
WoodburyMan wrote:Thanks for sharing your amazing work!

I keep getting and error though...

On the Advisories page and top header of main page, I get the following
Advisory Information Unavailable, error fetching or reading data from the NOAA advisories server.
My current zone is "CTZ013", Southern Litchfield County.
Here is my lines in Settings.php

Code: Select all

// NOAA warning zone
$SITE['noaazone'] 		= 'CTZ013'; // used for NOAA advisories and advforecast2.php forecasts
$SITE['hurlURL']		= "wxadvisory.php"; // page to launch for details on NOAA advisories
// 
I believe I have done everything right... anyone point me to what might be wrong?
I have my site set up temporarily running on http://grudzien.no-ip.org:8080/weather/new/
(My site runs on grudzien.us that just forwards to a DYDNS site run locally rather than hosting remotely)
I ran check-fetch-times.php on your site, and it appears that none of the cache files stored in ./cache are writable. Make sure that directory is writable by PHP and the scripts should return to working :)

Best regards,
Ken

Re: Now available: AJAX/PHP multilingual website templates

Posted: Tue 06 Sep 2011 3:35 pm
by saratogaWX
vpokroglo wrote:Thanks Ken for your reply.
I have done al the updates You say and some things are realy better, but Month gust date in dashboard is still wrong. its showing Gust Month: 32,4 km/h Jan 6 . But this gust was today on 6 sep, not jan 6.

Thanks!
The code that generates the Gust Month display in ajax-dashboard.php is

Code: Select all

              <?php if(isset($mrecordwindgust)) { ?>
              <tr>
                <td colspan="2" class="data1" align="center">
				  <?php langtrans('Gust Month'); ?>: <?php echo $mrecordwindgust. " $uomWind"; ?> 
                  <?php if(isset($mrecordhighgustday)) { ?>
				  <?php echo substr($monthname,0,3) . " " . $mrecordhighgustday; ?> 
                  <?php } // $mrecordhighgustday ?>
				</td>
              </tr>
              <?php } // $mrecordwindgust ?>
and the code in CU-defs.php that fills those variables is

Code: Select all

$mrecordwindgust = $WX['MonthGustH'];
list($mrecordhighgustday,$mrecordhighgustmonth,$mrecordhighgustyear)=CU_getRecordDate($WX['MonthGustHD'],$WX['year']); // calculated value

# generate the separate date/time variables by dissection of input date/time and format
list($date_year,$date_month,$date_day,$time_hour,$time_minute,$monthname,$dayname)
  = CU_setDateTimes($date,$time,$SITE['WDdateMDY']);

Your CUtags.php?sce=dump has

Code: Select all

$WX['MonthGustH'] = '35,3';
$WX['MonthGustHT'] = '11:00';
$WX['MonthGustHD'] = '06 september';
Running your home page with ?debug=y and viewing the source shows

Code: Select all

<!-- CU_setDateTimes CUtime='2000--6.9.2011 16:55:00' assembled -->
<!-- CU_setDateTimes CUtime='1970 01 01 01 00 January Thursday' values set -->
So the issue is the date format in $WX['date'] = '6.9.2011';
is the underlying cause. So... change your CU-defs.php from

Code: Select all

  $d = explode('/',$indate);
  if(!isset($d[2])) {$d = explode("-",$indate);}
to

Code: Select all

  $d = explode('/',$indate);
  if(!isset($d[2])) {$d = explode("-",$indate);}
  if(!isset($d[2])) {$d = explode(".",$indate);}
and that should fix the date issue.

Sorry for the long post.. I just wanted to show the debug process so you could see how it all ties together.

I'll make the update to CU-defs.php for the next distribution.

Best regards,
Ken

Re: Now available: AJAX/PHP multilingual website templates

Posted: Tue 06 Sep 2011 5:47 pm
by saratogaWX
I've updated the tags files to support Cumulus 1.9.2 Beta 1010 tags, and CU-defs.php to have the fix for date in dd.mm.yyyy format.

http://saratoga-weather.org/wxtemplates/updates.php for the customized update .zip file

Best regards,
Ken

Re: Now available: AJAX/PHP multilingual website templates

Posted: Tue 06 Sep 2011 6:11 pm
by Ruxomar
Thank you so much for your incredible work keeping up with Cumulus :D

Best regards
Ruggero

Re: Now available: AJAX/PHP multilingual website templates

Posted: Tue 06 Sep 2011 6:34 pm
by josebp
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é

Re: Now available: AJAX/PHP multilingual website templates

Posted: Tue 06 Sep 2011 6:46 pm
by nitrx
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é
I've the same today seems something wrong by wunderground...

Re: Now available: AJAX/PHP multilingual website templates

Posted: Tue 06 Sep 2011 6:52 pm
by WoodburyMan
I ran check-fetch-times.php on your site, and it appears that none of the cache files stored in ./cache are writable. Make sure that directory is writable by PHP and the scripts should return to working :)

Best regards,
Ken
Thanks Ken, worked like a charm!