Sandaysoft

Support forum for Cumulus weather station software
It is currently Sat May 25, 2013 8:59 am
Please click here before posting. Help me to help you!
Useful Links: Cumulus FAQ • Enhancement requests • Wiki (documentation)
Please put your approximate location into your profile
Add your web site to the Cumulus user map
Vantage Pro2 users with firmware 3.00 should upgrade to fw 3.12 and Cumulus 1.9.4

All times are UTC




Post new topic Reply to topic  [ 796 posts ]  Go to page Previous  1 ... 36, 37, 38, 39, 40, 41, 42 ... 54  Next
Author Message
 Post subject: Re: Now available: AJAX/PHP multilingual website templates
PostPosted: Sat Jan 21, 2012 10:50 pm 
Offline
User avatar

Joined: Wed May 06, 2009 5:02 am
Posts: 428
Location: Saratoga, CA, USA
Weather Station: Davis Vantage Pro Plus
Operating System: Windows XP SP3
Toddi wrote:
Hi
Tanks ken. have done that, but still no update and the date is still wrong.

http://kystvind.no/wxindex.php


I think it runs deeper than just the ajaxCUwx.js .. neither the ajax-dashboard nor the ajax-gizmo currently support '.' delimited dates, only '/' or '-' delimited dates.

Looks like I have some more coding to do :)

I'll release an update which should support the '.' delimited date format, and an update to the CUtags file for Cumulus 1.9.2 build 1028 likely tomorrow.

I'll post when it's ready.

Best regards,
Ken


Top
 Profile  
 
 Post subject: Re: Now available: AJAX/PHP multilingual website templates
PostPosted: Sat Jan 21, 2012 11:22 pm 
Offline
User avatar

Joined: Wed May 06, 2009 5:02 am
Posts: 428
Location: Saratoga, CA, USA
Weather Station: Davis Vantage Pro Plus
Operating System: Windows XP SP3
Toddi wrote:
Hi
Tanks ken. have done that, but still no update and the date is still wrong.

http://kystvind.no/wxindex.php


Ok.. I've made the changes to ajax-dashboard, ajax-gizmo and ajaxCUwx.js to support the dd.mm.yy date formats.

Would you mind trying the attached and see if it fixes the issue on your site?

Don't forget to re-customize the ajaxCUwx.js .. the version I sent was for English units :)

Thanks,
Ken


You do not have the required permissions to view the files attached to this post.


Top
 Profile  
 
 Post subject: Re: Now available: AJAX/PHP multilingual website templates
PostPosted: Sun Jan 22, 2012 12:17 am 
Offline

Joined: Wed Jan 18, 2012 11:51 am
Posts: 11
Location: Norway
Weather Station: http://kystvind.no/wxindex.php
Operating System: Windows XP SP3
Hi!
The date on the gismo and dashboard is god. on my status it still wrong and on sun/moon almanac the moon got wrong date.
Thanks for all the help Ken.

Regard Toddi


Top
 Profile  
 
 Post subject: Re: Now available: AJAX/PHP multilingual website templates
PostPosted: Sun Jan 22, 2012 12:47 am 
Offline
User avatar

Joined: Wed May 06, 2009 5:02 am
Posts: 428
Location: Saratoga, CA, USA
Weather Station: Davis Vantage Pro Plus
Operating System: Windows XP SP3
Toddi wrote:
Hi!
The date on the gismo and dashboard is god. on my status it still wrong and on sun/moon almanac the moon got wrong date.
Thanks for all the help Ken.

Regard Toddi


Thanks for testing Toddi.

I've added fixes to include-wxstatus.php and wxastronomy.php pages in the .zip attached (the ajax-dashboard, ajax-gizmo and ajaxCUwx.js are unchanged from the prior .zip).

Please try those two (include-wxstatus.php and wxastronomy.php on your site.


You do not have the required permissions to view the files attached to this post.


Top
 Profile  
 
 Post subject: Re: Now available: AJAX/PHP multilingual website templates
PostPosted: Sun Jan 22, 2012 1:04 am 
Offline

Joined: Wed Jan 18, 2012 11:51 am
Posts: 11
Location: Norway
Weather Station: http://kystvind.no/wxindex.php
Operating System: Windows XP SP3
status site and sun/mon site and all of det date issue is ok :)
The only ting no is the update of the site.

Toddi


Top
 Profile  
 
 Post subject: Re: Now available: AJAX/PHP multilingual website templates
PostPosted: Sun Jan 22, 2012 1:12 am 
Offline
User avatar

Joined: Wed May 06, 2009 5:02 am
Posts: 428
Location: Saratoga, CA, USA
Weather Station: Davis Vantage Pro Plus
Operating System: Windows XP SP3
Toddi wrote:
status site and sun/mon site and all of det date issue is ok :)
The only ting no is the update of the site.

Toddi

Great! Now we're getting somewhere.

which page and what is "the update of the site"?


Top
 Profile  
 
 Post subject: Re: Now available: AJAX/PHP multilingual website templates
PostPosted: Sun Jan 22, 2012 1:17 am 
Offline

Joined: Wed Jan 18, 2012 11:51 am
Posts: 11
Location: Norway
Weather Station: http://kystvind.no/wxindex.php
Operating System: Windows XP SP3
It just count, not updating the dashboard.
http://kystvind.no/wxindex.php


Top
 Profile  
 
 Post subject: Re: Now available: AJAX/PHP multilingual website templates
PostPosted: Sun Jan 22, 2012 1:32 am 
Offline
User avatar

Joined: Wed May 06, 2009 5:02 am
Posts: 428
Location: Saratoga, CA, USA
Weather Station: Davis Vantage Pro Plus
Operating System: Windows XP SP3
Toddi wrote:
It just count, not updating the dashboard.
http://kystvind.no/wxindex.php


The issue is a JavaScript error causing the ajaxCUwx.js (and all the rest of the scripts to stop).

Quote:
Error: missing ] in index expression
Source File: http://kystvind.no/wxindex.php
Line: 228, Column: 25
Source Code:
langTransLookup['Today's & Yesterday's Weather Data'] = 'Dagens & Gårsdagens Værdata';


It's caused by an entry in your language-no.txt
Code:
langlookup|Fog|Tåke|
#
# wxcudata.php language strings
which should read as
Code:
langlookup|Fog|Tåke|
conditions|end||
#
# wxcudata.php language strings


Because of the missing conditions|end|| flag, it was trying to put everything else in a JavaScript array for translation of conditions, and ran into the line later in the file that said

langlookup|Today's & Yesterday's Weather Data|Dagens & Gårsdagens Værdata|

and the ' in Today's created a JavaScript Error.

Make sure the conditions translation entries start with

conditions|begin||

and end with

conditions|end||

to avoid this issue :)

Best regards,
Ken


Top
 Profile  
 
 Post subject: Re: Now available: AJAX/PHP multilingual website templates
PostPosted: Sun Jan 22, 2012 2:27 am 
Offline

Joined: Wed Jan 18, 2012 11:51 am
Posts: 11
Location: Norway
Weather Station: http://kystvind.no/wxindex.php
Operating System: Windows XP SP3
Hi!
Took a cleanup, got rid all errors (I believe) but still I have no update on dashboard.

Toddi


Top
 Profile  
 
 Post subject: Re: Now available: AJAX/PHP multilingual website templates
PostPosted: Sun Jan 22, 2012 4:04 am 
Offline
User avatar

Joined: Wed May 06, 2009 5:02 am
Posts: 428
Location: Saratoga, CA, USA
Weather Station: Davis Vantage Pro Plus
Operating System: Windows XP SP3
Toddi wrote:
Hi!
Took a cleanup, got rid all errors (I believe) but still I have no update on dashboard.

Toddi

Yes..now no JavaScript errors. It looks like the commaDecimal=true is stopping the update. More debug needed to fix.


Top
 Profile  
 
 Post subject: Re: Now available: AJAX/PHP multilingual website templates
PostPosted: Sun Jan 22, 2012 5:05 am 
Offline
User avatar

Joined: Wed May 06, 2009 5:02 am
Posts: 428
Location: Saratoga, CA, USA
Weather Station: Davis Vantage Pro Plus
Operating System: Windows XP SP3
I was correct.. the decimalComma=true was causing the issue. I changed to use a new function ajax_set_obs_noDCR() for the date/time replacements and it works with/without decimalComma enabled.

Please try the ajaxCUwx.js in the attached .zip .. other files are unchanged from the prior version posted.

Best regards,
Ken


You do not have the required permissions to view the files attached to this post.


Top
 Profile  
 
 Post subject: Re: Now available: AJAX/PHP multilingual website templates
PostPosted: Sun Jan 22, 2012 7:58 am 
Offline
User avatar

Joined: Thu Dec 04, 2008 12:15 am
Posts: 298
Location: Tortosa-Baix Ebre- Catalonia
Weather Station: Davis Vantage Pro2 Plus
A lot of thanks, I think now is allright

:clap:

saratogaWX wrote:
meteotortosa wrote:
Hi,
I think something is wrong..

In "Home" tab, we can find: Gust Month: 62,8 km/h January 1

but, this is wrong, you can see in NOAA reports (http://www.meteotortosa.cat/web3/wxnoaa ... eports.php)

Gust Month was on 3th Junary.

How can I fix it?

A lot of thanks


Your NOAA report shows the 62,8 km/h gust was on the 4th of January.

The ajax-dashboard.php has the following code to display the max gust for the month
Code:
              <tr>
                <td colspan="2" class="data1" align="center">
              <?php langtrans('Gust Month'); ?>: <?php echo $mrecordwindgust. " $uomWind"; ?>
                  <?php if(isset($mrecordhighgustday)) { ?>
              <?php echo $monthname . " " . $mrecordhighgustday; ?>
                  <?php } // $mrecordhighgustday ?>
            </td>
              </tr>
and the CU-defs.php has the following mappings
Code:
$mrecordwindgust = $WX['MonthGustH'];
list($mrecordhighgustday,$mrecordhighgustmonth,$mrecordhighgustyear)=CU_getRecordDate($WX['MonthGustHD'],$WX['year']); // calculated value


Looking at your CUtags.php?sce=dump shows
Code:
$WX['MonthGustH'] = '62,8';
$WX['MonthGustHT'] = '21:44';
$WX['MonthGustHD'] = '04 enero';
$WX['year'] = '2012';


So it appears that the CU_getRecordDate() function in CU-defs.php is not able to parse the date of '04 enero 2012' since it is not in English (which is what your PHP is running). The function uses the $SITE['monthNames'] to translate from local language to English for PHP processing.

In your Settings.php, you have set the month names as
Code:
$SITE['monthNames'] = array(
'Gener',
'Febrer',
'Marc',
'Abril',
'Maig',
'Juny',
'Juliol',
'Agost',
'Setembre',
'Octubre',
'Novembre',
'Desembre',
);


which should handle your local month names v.s. English month names. Missing is the month 'enero' used in your tags.
Is your weather software uploading a different language for the months than you have included in the $SITE['monthNames'] array in Settings.php? If so, that setting should match what your weather PC language is using.

I'd suggest using
Code:
$SITE['monthNames'] = array(
"Enero",
"Febrero",
"Marzo",
"Abril",
"Mayo",
"Junio",
"Julio",
"Agosto",
"Septiembre",
"Octubre",
"Noviembre",
"Diciembre"
);
(the Spanish names) instead of the Catalan names you're currently using.

Best regards,
Ken

_________________
Weather in Tortosa (NE Spain), updated every 15'
Image Image


Top
 Profile  
 
 Post subject: Re: Now available: AJAX/PHP multilingual website templates
PostPosted: Sun Jan 22, 2012 10:03 am 
Offline

Joined: Wed Jan 18, 2012 11:51 am
Posts: 11
Location: Norway
Weather Station: http://kystvind.no/wxindex.php
Operating System: Windows XP SP3
saratogaWX wrote:
I was correct.. the decimalComma=true was causing the issue. I changed to use a new function ajax_set_obs_noDCR() for the date/time replacements and it works with/without decimalComma enabled.

Please try the ajaxCUwx.js in the attached .zip .. other files are unchanged from the prior version posted.

Best regards,
Ken


Hi!
Thank you for all the help Ken, I appreciate it.
but slill no update.
Hmm! can this bee a host issue, my php test was ok but still..

edit! allow_url_fopen is disabled on server/webhoster. can it mean something?


Top
 Profile  
 
 Post subject: Re: Now available: AJAX/PHP multilingual website templates
PostPosted: Sun Jan 22, 2012 9:13 pm 
Offline
User avatar

Joined: Wed May 06, 2009 5:02 am
Posts: 428
Location: Saratoga, CA, USA
Weather Station: Davis Vantage Pro Plus
Operating System: Windows XP SP3
Toddi wrote:
saratogaWX wrote:
I was correct.. the decimalComma=true was causing the issue. I changed to use a new function ajax_set_obs_noDCR() for the date/time replacements and it works with/without decimalComma enabled.

Please try the ajaxCUwx.js in the attached .zip .. other files are unchanged from the prior version posted.

Best regards,
Ken


Hi!
Thank you for all the help Ken, I appreciate it.
but slill no update.
Hmm! can this bee a host issue, my php test was ok but still..

edit! allow_url_fopen is disabled on server/webhoster. can it mean something?


No, wasn't a PHP issue, and yes, you can probably leave allow_url_fopen off on a Base-World website .. none of the support scripts use that function. It is requred on the Canada (for ec-radar.php) and USA (NOAA IOD) templates.

So.. finally found the last thing that was preventing the ajaxCUwx.js from running on your site. Sorry it took so long, but
it was changing
Code:
    var cupattern=/\d+(\/|-)\d+(\/|-)\d+ \d+:\d+:\d+/; // looks for 'dd/dd/dd' date string followed by 'hh:mm:ss'
to
Code:
    var cupattern=/\d+(\/|-|\.)\d+(\/|-|\.)\d+ \d+:\d+:\d+/; // looks for 'dd/dd/dd' date string followed by 'hh:mm:ss'
in ajaxCUwx.js .. try doing that on your copy.. it should work then :)

Best regards,
Ken


Top
 Profile  
 
 Post subject: Re: Now available: AJAX/PHP multilingual website templates
PostPosted: Sun Jan 22, 2012 9:31 pm 
Offline

Joined: Wed Jan 18, 2012 11:51 am
Posts: 11
Location: Norway
Weather Station: http://kystvind.no/wxindex.php
Operating System: Windows XP SP3
Hi! Ken
Jippy! Thank You it was good. :D :clap:
Thank you for the great support Ken. You are really good.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 796 posts ]  Go to page Previous  1 ... 36, 37, 38, 39, 40, 41, 42 ... 54  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group