Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.0.1 (build 4023) - 16 May 2024

(Note that 4.1.0 (build 4024) - 05 June 2024 remains available, but usage of this version is not recommended - particularly for Davis stations - and the included utility in this distribution for migrating to v4 is known to contain errors affecting conversion of dayfile.txt)

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

Now available: AJAX/PHP multilingual website templates

Discussion of Ken True's web site templates

Moderator: saratogaWX

Post Reply
User avatar
saratogaWX
Posts: 1211
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 »

You can add the beta tags to the tags.txt file that came with your CU-plugin.zip

Use tabs to delimit the fields for the new tags to be added, one tag per line.

upload the tags.txt file to your site, then run gen-CUtags.php or gen-CUtags.php?comments=yes to generate a new CUtags.txt file for Cumulus to upload as CUtags.php

Best regards,
Ken
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 »

saratogaWX wrote:I've done an update to the get-uv-forecast-inc.php and wxuvforecast.php page which shows the forecasts using comma decimals (if your site uses comma decimals).

Ron, you should try these too:
Works fine Ken,

Thanks,
Ron
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 »

Hi Ken,
to things if i us a folder name of wx an not root for all files an folder what an were do i need to change?
2 after i run gen-CUtags.php do I just do copy an paste ?
thanks Beau
User avatar
saratogaWX
Posts: 1211
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 »

n9mfk wrote:Hi Ken,
to things if i us a folder name of wx an not root for all files an folder what an were do i need to change?
2 after i run gen-CUtags.php do I just do copy an paste ?
thanks Beau
Beau,
As it says in the download instructions for the templates
Note: As distributed, the template files are expected to be located in the document root of your website and the required subdirectories located below the document root. It is possible to use the templates from a subdirectory if the identical directory substructure is maintained and you continue to have URL and FILE relative addressing consistent (as it is now). You may be required to make additional changes that are not documented in the instructions if you wish to use the templates in a subdirectory.
so... you have a voyage of discovery to embark on :)

After you run gen-CUtags.php, you follow the instructions on the generated page which says
Instructions:
Save this page as CUtags.txt and place in your cumulus\webfiles directory

Use the Cumulus, Configuration, Internet, Files panel select an unused entry.

In the Local Filenames, press Browse and select the CUtags.txt file as the local filename.
In the Remote Filenames box, enter the directory and CUtags.php as the Remote Filename to use.
Leave the Binary? box unchecked,
Check the Process? box.
Leave the Realtime? box unchecked.
Check the FTP? box.

Press OK on the Internet Settings dialog to close it and save the settings.
Best regards,
Ken
User avatar
PaulMy
Posts: 3908
Joined: Sun 28 Sep 2008 11:54 pm
Weather Station: Davis VP2 Plus 24-Hour FARS
Operating System: Windows8 and Windows10
Location: Komoka, ON Canada
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Post by PaulMy »

How can I add the Cumulus All Time Records into a new page on my test http://www.komokaweather.com/wxindex.php?

Paul
VP2+
C1 www.komokaweather.com/komokaweather-ca
MX https://komokaweather.com/cumulusmx/index.htm /index.html /index.php
MX https://komokaweather.com/cumulusmxwll/index.htm /index.html /index.php
MX https:// komokaweather.com/cumulusmx4/index.htm
Image
User avatar
saratogaWX
Posts: 1211
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 »

PaulMy wrote:How can I add the Cumulus All Time Records into a new page on my test http://www.komokaweather.com/wxindex.php?

Paul
You'll need to add <?php print $WX['nameOfVariable']; ?> to the page where you would like it printed. Repeat using a different nameOfVariable for each one you want printed in the page.

The nameOfVariable is the Cumulus name and can be seen by browsing to your CUtags.php?sce=dump

Best regards,
Ken
User avatar
PaulMy
Posts: 3908
Joined: Sun 28 Sep 2008 11:54 pm
Weather Station: Davis VP2 Plus 24-Hour FARS
Operating System: Windows8 and Windows10
Location: Komoka, ON Canada
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Post by PaulMy »

Thanks Ken,
I’ll experiment with it and see what I can create.

Paul
VP2+
C1 www.komokaweather.com/komokaweather-ca
MX https://komokaweather.com/cumulusmx/index.htm /index.html /index.php
MX https://komokaweather.com/cumulusmxwll/index.htm /index.html /index.php
MX https:// komokaweather.com/cumulusmx4/index.htm
Image
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 »

Ken about the metar conditions ( get-metar-conditions-inc.php ) , I noticed the describings are in English only, I want to translate it to Dutch.

I'm not sure what I've to translate but if there is an option I can do this and send the translated php file , only in Dutch because my Chinese is very poor :lol:
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 »

Hi Ken,
is there any code that could brake this down $WX['MonthGustHD'] = '01 February';

to
01
February
thanks Beau
User avatar
saratogaWX
Posts: 1211
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 »

nitrx wrote:Ken about the metar conditions ( get-metar-conditions-inc.php ) , I noticed the describings are in English only, I want to translate it to Dutch.

I'm not sure what I've to translate but if there is an option I can do this and send the translated php file , only in Dutch because my Chinese is very poor :lol:
Yes, they are all in English, but you can add separate conditions to translate to Dutch by adding langlookup entries into the language-nl.txt file for conditions you find to not be translated. Do a ?show=missing on the page, then view the source .. near the bottom of the page (after the </html>) will be a set of comments with langlookup entries ready for you to place in your language-nl.txt file (replacing the third field with Dutch) and the translation should be done :)
Like:
langlookup|Cloudy|Bewolkt|

Generally, there is no need to modify the PHP source to provide translations.. entering them in the language-nl.txt or language-nl-local.txt will suffice. The language translation files provide the English->language service for you (as long as the exact English words/phrases have language words/phrases counterparts in the langlookup entries).

Best regards,
Ken
User avatar
saratogaWX
Posts: 1211
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 »

n9mfk wrote:Hi Ken,
is there any code that could brake this down $WX['MonthGustHD'] = '01 February';

to
01
February
thanks Beau
Beau,
You've been studying PHP for some time.. haven't you seen something like

Code: Select all

  $t = preg_replace('| |','<br/>',$WX['MonthGustHD']);
  print $t;
which replaces the space with <br/>.

For references about PHP, I suggest the PHP docs which even has downloadable Windows Help files with examples included. Also the Sitepoint and O'Rilley books on PHP are excellent.

Best regards,
Ken
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 »

Hi ken,
I have added the code for gust month using bata tags
Beau
You do not have the required permissions to view the files attached to this post.
User avatar
PaulMy
Posts: 3908
Joined: Sun 28 Sep 2008 11:54 pm
Weather Station: Davis VP2 Plus 24-Hour FARS
Operating System: Windows8 and Windows10
Location: Komoka, ON Canada
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Post by PaulMy »

Thanks Ken,
I’ll experiment with it and see what I can create
I tried inserting the tags in a new php page with some results, referring to php online tutorial to help me (went looking for html and php books but wasn't able to find any today), but far from anything that would look neat so made it my way for the time being. :clap:

http://www.komokaweather.com/wxindex.php

Thanks again, and appreciate all the help and suggestions you have provided,
Paul
VP2+
C1 www.komokaweather.com/komokaweather-ca
MX https://komokaweather.com/cumulusmx/index.htm /index.html /index.php
MX https://komokaweather.com/cumulusmxwll/index.htm /index.html /index.php
MX https:// komokaweather.com/cumulusmx4/index.htm
Image
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 »

saratogaWX wrote:
Generally, there is no need to modify the PHP source to provide translations.. entering them in the language-nl.txt or language-nl-local.txt will suffice. The language translation files provide the English->language service for you (as long as the exact English words/phrases have language words/phrases counterparts in the langlookup entries).
Aha yes clever I will translate it everytime I see an untranslated one :)
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 »

PaulMy wrote:
Thanks Ken,
I’ll experiment with it and see what I can create
I tried inserting the tags in a new php page with some results, referring to php online tutorial to help me (went looking for html and php books but wasn't able to find any today), but far from anything that would look neat so made it my way for the time being. :clap:

http://www.komokaweather.com/wxindex.php

Thanks again, and appreciate all the help and suggestions you have provided,
Paul
Paul you better use a php file and replace the content with the cumulus tags (I saw you have an empty one) , I used the wxlinks.php (for testpurposes) and put the cumulus tags in it and let it process by cumulus an ftp so I get nice values http://www.apeldoorn.tk/weer/wxlinks.php you can do this with most templates from the standard cumulus templates it's some work 8-)
Post Reply