Sandaysoft

Support forum for Cumulus weather station software
It is currently Fri May 24, 2013 2:17 pm
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 ... 35, 36, 37, 38, 39, 40, 41 ... 54  Next
Author Message
 Post subject: Re: Now available: AJAX/PHP multilingual website templates
PostPosted: Thu Jan 19, 2012 2:44 pm 
Offline
User avatar

Joined: Thu Dec 04, 2008 12:15 am
Posts: 298
Location: Tortosa-Baix Ebre- Catalonia
Weather Station: Davis Vantage Pro2 Plus
beteljuice wrote:
That page seems to be working OK - did you fix it ?


Yes, i fix it. A little problem with the domain name :D

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


Top
 Profile  
 
 Post subject: Re: Now available: AJAX/PHP multilingual website templates
PostPosted: Thu Jan 19, 2012 2:44 pm 
Offline
User avatar

Joined: Thu Dec 04, 2008 12:15 am
Posts: 298
Location: Tortosa-Baix Ebre- Catalonia
Weather Station: Davis Vantage Pro2 Plus
beteljuice wrote:
That page seems to be working OK - did you fix it ?


Yes, i fix it. A little problem with the domain name :D

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


Top
 Profile  
 
 Post subject: Re: Now available: AJAX/PHP multilingual website templates
PostPosted: Thu Jan 19, 2012 3:54 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
gemini06720 wrote:
Toddi wrote:
Has tried to get the nice templates to work. It is a masterpiece , but may not get ajaxCUwx to work. Has tried in all possible ways. Can anyone please take a look.
Toddi did you make modifications to the files, other than the setting files, particularly to the files 'top.php' and 'include-style-switcher.php' - I am getting some PHP errors when I use the 'debug' command as in:
Code:
http://kystvind.no/wxindex.php?debug
I also noticed, in the 'ajaxCUwx.js' script, that you have not modified the 'decimalComma' variable:
Code:
var decimalComma = false;  // =false for '.' as decimal separator, =true for ',' (comma) as decimal separator
Your main page is already using the ',' (comma) as a decimal separator.


Thanks for haven a look!
Have set decimalComma = true;
I did not make modifications to the files. Trying to replace these.

Still the same!
At my Weather Station Status it say Cumulus weather data "not current". What is weather data?


Regard Toddi


Top
 Profile  
 
 Post subject: Re: Now available: AJAX/PHP multilingual website templates
PostPosted: Fri Jan 20, 2012 12:07 am 
Offline
User avatar

Joined: Tue Dec 09, 2008 1:37 pm
Posts: 1851
Location: Dudley, West Midlands, UK
Weather Station: None !
Operating System: XP SP3
The AJAX JavaScript(s) can't cope with your date delimiter !
Code:
      var tdate = ajaxdateraw.split("/");
      if(typeof(tdate[2])=='undefined') {tdate = ajaxdateraw.split("-"); }
      var ajaxdateformat = tdate[1]+"/"+tdate[0]+"/"+tdate[2];
The script is expecting / or -

Your date format is 20.01.12

_________________
Image
......................Imagine, what you will KNOW tomorrow !


Top
 Profile  
 
 Post subject: Re: Now available: AJAX/PHP multilingual website templates
PostPosted: Fri Jan 20, 2012 6:51 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
wow! beteljuice, thanks for seeing this.
Is there a way i can fix this.


Top
 Profile  
 
 Post subject: Re: Now available: AJAX/PHP multilingual website templates
PostPosted: Fri Jan 20, 2012 12:57 pm 
Offline
User avatar

Joined: Tue Dec 09, 2008 1:37 pm
Posts: 1851
Location: Dudley, West Midlands, UK
Weather Station: None !
Operating System: XP SP3
There is a simple fix, but I would rather wait for any comment by Ken True (the author) as then you would be running a non-standard script and if you attempted any script updates it would fail again.

Please wait another 24hr or so ...

_________________
Image
......................Imagine, what you will KNOW tomorrow !


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

Joined: Wed May 06, 2009 5:02 am
Posts: 426
Location: Saratoga, CA, USA
Weather Station: Davis Vantage Pro Plus
Operating System: Windows XP SP3
Thanks for finding this issue.. seems the internationalization for local date format was incomplete :(

I'll issue an update to the ajaxCUwx.js, but meanwhile, you can change ajaxCUwx.js from
Code:
      var tdate = ajaxdateraw.split("/");
      if(typeof(tdate[2])=='undefined') {tdate = ajaxdateraw.split("-"); }
      var ajaxdateformat = tdate[1]+"/"+tdate[0]+"/"+tdate[2];
to
Code:
      var tdate = ajaxdateraw.split("/");
      if(typeof(tdate[2])=='undefined') {tdate = ajaxdateraw.split("-"); }
      if(typeof(tdate[2])=='undefined') {tdate = ajaxdateraw.split("."); }
      var ajaxdateformat = tdate[1]+"/"+tdate[0]+"/"+tdate[2];

and that should get around the issue.

Best regards,
Ken


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

Joined: Thu Dec 04, 2008 12:15 am
Posts: 298
Location: Tortosa-Baix Ebre- Catalonia
Weather Station: Davis Vantage Pro2 Plus
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

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


Top
 Profile  
 
 Post subject: Re: Now available: AJAX/PHP multilingual website templates
PostPosted: Sat Jan 21, 2012 9:55 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
Tanks ken. have done that, but still no update and the date is still wrong.

http://kystvind.no/wxindex.php


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

Joined: Wed May 06, 2009 5:02 am
Posts: 426
Location: Saratoga, CA, USA
Weather Station: Davis Vantage Pro Plus
Operating System: Windows XP SP3
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


Last edited by saratogaWX on Sat Jan 21, 2012 11:33 pm, edited 1 time in total.

Top
 Profile  
 
 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: 426
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: 426
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: 426
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  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 796 posts ]  Go to page Previous  1 ... 35, 36, 37, 38, 39, 40, 41 ... 54  Next

All times are UTC


Who is online

Users browsing this forum: rlee171 and 1 guest


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