Sandaysoft

Support forum for Cumulus weather station software
It is currently Mon May 20, 2013 8:50 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 ... 36, 37, 38, 39, 40, 41, 42 ... 54  Next
Author Message
 Post subject: Re: Now available: AJAX/PHP multilingual website templates
PostPosted: Sun Jan 22, 2012 5:05 am 
Online
User avatar

Joined: Wed May 06, 2009 5:02 am
Posts: 425
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 
Online
User avatar

Joined: Wed May 06, 2009 5:02 am
Posts: 425
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  
 
 Post subject: Re: Now available: AJAX/PHP multilingual website templates
PostPosted: Sun Jan 22, 2012 9:52 pm 
Online
User avatar

Joined: Wed May 06, 2009 5:02 am
Posts: 425
Location: Saratoga, CA, USA
Weather Station: Davis Vantage Pro Plus
Operating System: Windows XP SP3
You're very welcome! I'll be posting the updates on http://saratoga-weather.org/wxtemplates/updates.php later today.

Thank YOU for your patience in working through the issues.

Best regards,
Ken


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

Joined: Sun Sep 04, 2011 2:02 am
Posts: 67
Location: Woodbury, Connecticut, U.S.A.
Weather Station: Ambient Weather WS-1090
Operating System: Windows 7 Pro 64bit
I'm having a weird issue where it's not displaying "Gust Today" on my site...

I only noticed it the other day, not sure how long it's been doing it. I think it might have been after I applied the updates from Jan 14th although it could be longer.

http://www.grudzien.us

You can see under the wind section, its displaying
Code:
Gust Month: 22.8 mph January 13

and it's taking up two lines in doing so. Normally the "Gust Today" line would be above it, but for some reason it's just not showing it. I've noticed on other sites January is shortened to "Jan.".. perhaps because January is forcing it to take up two lines, and that's what's messing it up? If that's what might be causing it, how do I set it to use short month names? (I have checked WUtags.php and it is passing the gust from today along.. its just not displaying it)

For fun I went through and I completely redid my entire site (Deleting all files on root folder of website and redoing the entire setup) and I still have the same issue. I'm using the latest version of Cumulus 1.9.2 build 1028.

_________________
Image


Top
 Profile  
 
 Post subject: Re: Now available: AJAX/PHP multilingual website templates
PostPosted: Sun Jan 22, 2012 11:49 pm 
Online
User avatar

Joined: Wed May 06, 2009 5:02 am
Posts: 425
Location: Saratoga, CA, USA
Weather Station: Davis Vantage Pro Plus
Operating System: Windows XP SP3
That was my bad :oops:
I did a fix to eliminate a Notice: errata, and misspelled the test variable name, so the Gust for Today: was never printed (even if is was there).

That's now fixed in the 22-Jan-2012 updates available now from the updates page.

Regarding the former abbreviation (first 3 characters of the month name) in the Gust this month display.. that didn't work out when the template went to UTF-8 for Hebrew display, so I made it just display the full month name (entered in the language-ll.js file). We'd never had an 'official' abbreviation for the month name in any of the translation tables, but did have the full month name available, so I just took the 'easy road' and removed the substr(...,0,3) from the variable so now it works with all languages, but does overflow to two lines.

Hope this helps...

Best regards,
Ken


Top
 Profile  
 
 Post subject: Re: Now available: AJAX/PHP multilingual website templates
PostPosted: Mon Jan 23, 2012 12:10 am 
Offline

Joined: Sun Sep 04, 2011 2:02 am
Posts: 67
Location: Woodbury, Connecticut, U.S.A.
Weather Station: Ambient Weather WS-1090
Operating System: Windows 7 Pro 64bit
saratogaWX wrote:
That was my bad :oops:
I did a fix to eliminate a Notice: errata, and misspelled the test variable name, so the Gust for Today: was never printed (even if is was there).

That's now fixed in the 22-Jan-2012 updates available now from the updates page.

Regarding the former abbreviation (first 3 characters of the month name) in the Gust this month display.. that didn't work out when the template went to UTF-8 for Hebrew display, so I made it just display the full month name (entered in the language-ll.js file). We'd never had an 'official' abbreviation for the month name in any of the translation tables, but did have the full month name available, so I just took the 'easy road' and removed the substr(...,0,3) from the variable so now it works with all languages, but does overflow to two lines.

Hope this helps...

Best regards,
Ken

That did it! Thanks Ken!! Again... you do amazing work!

_________________
Image


Top
 Profile  
 
 Post subject: Re: Now available: AJAX/PHP multilingual website templates
PostPosted: Mon Jan 23, 2012 12:16 am 
Online
User avatar

Joined: Wed May 06, 2009 5:02 am
Posts: 425
Location: Saratoga, CA, USA
Weather Station: Davis Vantage Pro Plus
Operating System: Windows XP SP3
Thanks for the kind words! :oops:

I've been trying to bundle updates a bit better so there are fewer 'releases' to annoy folks with.
Fortunately, after 79 updates to the V3 template set, the bugs have been mostly worked out :)
However, it's my international users who are invaluable in spotting issues that need addressing due to locale .. Toddi's dd.mm.yy date format I'd not encountered before, so it's good to get everything working with that format too.

Best regards,
Ken


Top
 Profile  
 
 Post subject: Re: Now available: AJAX/PHP multilingual website templates
PostPosted: Mon Jan 23, 2012 12:29 am 
Offline
User avatar

Joined: Tue Dec 09, 2008 1:37 pm
Posts: 1846
Location: Dudley, West Midlands, UK
Weather Station: None !
Operating System: XP SP3
:clap: I often wondered how you keep track of all the 'working' and 'tweaks' versions of your many and large code sets.

... but now I've got too many (tweaks) of my own :bash: :lol: :lol:

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


Top
 Profile  
 
 Post subject: Re: Now available: AJAX/PHP multilingual website templates
PostPosted: Mon Jan 23, 2012 4:03 am 
Online
User avatar

Joined: Wed May 06, 2009 5:02 am
Posts: 425
Location: Saratoga, CA, USA
Weather Station: Davis Vantage Pro Plus
Operating System: Windows XP SP3
It is a challenge to keep all the stuff in order, but here's what I do:

The master code sets for the Base and Plugin configs are kept in the distribution .zip files on the website (with master copies on my development PC). The development PC is backed up nightly to a local NAS with 3 weeks of weekly full/daily incremental backups.

The test website http://saratoga-weather.org/wxtemplates ... xindex.php is the working development copy of the template set. Thanks to a bit of simplification in the templates from V2 to V3, I dropped the three single-language (English) templates and two ML templates in favor of three multi-lingual-capable templates that share the same code base for USA, Canada and World. The Settings-weather.php allows any of the templates to operate with any of the supported weather-station software, and I run all 6 (Cumulus, Meteohub, VWS, Weather-Display, WeatherLink and WeatherSnoop) to upload to the website. Each page on the test site can have a ?wx= argument to load a different Settings-weather file so I can easily see the effects on the page. I also run the PHP there with both Notify: and Strict: enabled to try and catch as many little issues as possible before release.

The Base templates contain the regional support scripts for that area, and all the AJAX scripts for the software pre-configured for English or Metric units. The common (non-regional) scripts are identical across all the Base templates (things like getting UV info, MOON/season info, METAR data).

Where possible, each of the scripts has internal version information in comments (and sometimes in code), and my updates page can parse that out of the source to show on the updates page (which uses the distribution .zip files as source).

I maintain a master page http://saratoga-weather.org/scripts-history.php which has the details on all changes to the standalone scripts and templates .. it's also automatically read by the RSS feed for changes.

With the updates page, I've tried to make it easy for the template users to grab all the changes since they last installed into one package, and given advice on which are generally safe to just replace v.s. which may need customization.

It would likely been easier on me to set up a version control system, but it's a little late to convert now, and since there's only one developer for my distributions, probably not much better than what I'm doing now. :)

And yes, I do keep a mass of scripts tucked away in both PHP and perl to take snippets from to construct new things (no sense in reinventing something).


Top
 Profile  
 
 Post subject: Re: Now available: AJAX/PHP multilingual website templates
PostPosted: Sun Jan 29, 2012 3:20 am 
Offline

Joined: Mon Oct 11, 2010 7:56 pm
Posts: 115
Weather Station: Davis Vantage Vue
Operating System: Windows 7
I have posted the question in a separate thread but Ken might be the person to answer my question so i will ask here. Basically i want to run 2 identical versions of my website on 2 different servers. Cumulus has the facility to upload to one server. Steve has suggested using this method http://wiki.sandaysoft.com/a/SFTP What template files do i need to upload to the server in order to have a fully working site with live updates? Currently this is how the two sites look. http://www.waterfordcityweather.com/index.php http://www.waterfordweather.com

Regards

Mick

_________________
Imagehttp://www.waterfordweather.com


Top
 Profile  
 
 Post subject: Re: Now available: AJAX/PHP multilingual website templates
PostPosted: Sun Jan 29, 2012 5:38 am 
Online
User avatar

Joined: Wed May 06, 2009 5:02 am
Posts: 425
Location: Saratoga, CA, USA
Weather Station: Davis Vantage Pro Plus
Operating System: Windows XP SP3
mickopla wrote:
I have posted the question in a separate thread but Ken might be the person to answer my question so i will ask here. Basically i want to run 2 identical versions of my website on 2 different servers. Cumulus has the facility to upload to one server. Steve has suggested using this method http://wiki.sandaysoft.com/a/SFTP What template files do i need to upload to the server in order to have a fully working site with live updates? Currently this is how the two sites look. http://www.waterfordcityweather.com/index.php http://www.waterfordweather.com

Regards

Mick


Hi Mick,

The key things that need to be uploaded after generation by Cumulus on both sites (for your weather conditions and history to show properly) are:

CUtags.php
realtime.txt
images/ (the graphs generated by Cumulus)
Reports/ (the NOAA climate reports)

The remainder of the pages on a template site are generated dynamically from the above list, or via the scripts which access external websites for data (WU-forecast, get-METAR-conditions.txt get-sunmoon-info.php, get-meteoalarm-warning, quakeUK.php)

Hope this helps...

Best regards,
Ken


Top
 Profile  
 
 Post subject: Re: Now available: AJAX/PHP multilingual website templates
PostPosted: Sun Jan 29, 2012 11:48 am 
Offline

Joined: Mon Oct 11, 2010 7:56 pm
Posts: 115
Weather Station: Davis Vantage Vue
Operating System: Windows 7
saratogaWX wrote:
mickopla wrote:
I have posted the question in a separate thread but Ken might be the person to answer my question so i will ask here. Basically i want to run 2 identical versions of my website on 2 different servers. Cumulus has the facility to upload to one server. Steve has suggested using this method http://wiki.sandaysoft.com/a/SFTP What template files do i need to upload to the server in order to have a fully working site with live updates? Currently this is how the two sites look. http://www.waterfordcityweather.com/index.php http://www.waterfordweather.com

Regards

Mick


Hi Mick,

The key things that need to be uploaded after generation by Cumulus on both sites (for your weather conditions and history to show properly) are:

CUtags.php
realtime.txt
images/ (the graphs generated by Cumulus)
Reports/ (the NOAA climate reports)

The remainder of the pages on a template site are generated dynamically from the above list, or via the scripts which access external websites for data (WU-forecast, get-METAR-conditions.txt get-sunmoon-info.php, get-meteoalarm-warning, quakeUK.php)

Hope this helps...

Best regards,
Ken


Thanks Ken

I think the files you mentioned should be no problem to upload to another server but i may have problems with the CUtags.php file as this is generated from a txt file in the Cumulus software. :?

_________________
Imagehttp://www.waterfordweather.com


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: saratogaWX 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