Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025

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

If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080

Now available: AJAX/PHP multilingual website templates

Discussion of Ken True's web site templates

Moderator: saratogaWX

JESUS HEREDERO
Posts: 12
Joined: Fri 19 Mar 2010 12:19 pm
Weather Station: PCE-FWS 20 = VH1080/81
Operating System: VISTA

Re: Now available: AJAX/PHP multilingual website templates

Post by JESUS HEREDERO »

Hi Ray
In everything you mention and as agreed, and installed and I checked out the image data of Cumulus-realtime.txt, but before that I had to cancel the Metar by prioritizing the Metar data realtime.
If you imagine that you put the code of scr=........ already had done. I looked for other files to compare and fell where he had to <span> scr=...........</span>. but I hope that the data coming out in the tests I also go to my on one side of the image left or right is irrelevant. Although these data are a little above. but the picture is very alone in the center
I will look into other files and testing ire

My English is not good, it's TRANSLATION of Google, I hope you understand

see http://meteoestremera.es/tiempo/index.php

Thanks for your time

Jesús
JESUS
gemini06720
Posts: 1700
Joined: Mon 10 Aug 2009 10:16 pm
Weather Station: No weather station
Operating System: No operating system
Location: World...

Re: Now available: AJAX/PHP multilingual website templates

Post by gemini06720 »

Find attached an updated 'cloudbase.php' script (minor additions, corrections, and modifications).

This ZIP file DOES NOT contain the required graphic files - this ZIP file only contains the updated PHP script and readme text file.
gemini06720
Posts: 1700
Joined: Mon 10 Aug 2009 10:16 pm
Weather Station: No weather station
Operating System: No operating system
Location: World...

Re: Now available: AJAX/PHP multilingual website templates

Post by gemini06720 »

kinder wrote:i tried to modify this cloudbase script so it can work on another webserver than the one i have template and realtime.txt.
As it is designed, the 'cloudbase.php' script can only read the 'realtime.txt' file on the same server (relative paths).

Many changes to the code would be required to be able to read the data file from a URL ... and I do not think I am ready to get myself involved with such a major rewrite - there are still a few bugs to remove from the present code...
gemini06720
Posts: 1700
Joined: Mon 10 Aug 2009 10:16 pm
Weather Station: No weather station
Operating System: No operating system
Location: World...

Re: Now available: AJAX/PHP multilingual website templates

Post by gemini06720 »

JESUS HEREDERO wrote:...but before that I had to cancel the Metar by prioritizing the Metar data realtime.
Jesús, the use of the METAR is optional (meaning it can be switched off) or the METAR can be used at night only (to get the cloud information).

Jesús, I am not too sure about the rest of your message - I think it might have to deal/do with how to place the image into the 'ajax-dashboard.php' script so it displays properly... Have a look at my <link removed> main page to see how I incorporated the 'cloudbase' script into that page...
Last edited by gemini06720 on Sat 17 Aug 2013 8:03 am, edited 1 time in total.
JESUS HEREDERO
Posts: 12
Joined: Fri 19 Mar 2010 12:19 pm
Weather Station: PCE-FWS 20 = VH1080/81
Operating System: VISTA

Re: Now available: AJAX/PHP multilingual website templates

Post by JESUS HEREDERO »

Thanks Ray, and is working well

Jesús
JESUS
User avatar
actioman
Posts: 118
Joined: Sat 20 Mar 2010 1:01 am
Weather Station: Davis Vantage Pro2 Plus
Operating System: Windows XP SP3
Location: Elvas, Portugal
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Post by actioman »

actioman wrote:...Hummm I have tried, but did not I liked the end result...
... First because it refers to Davis and my station is a PCE and there is also confused in the middle of the forecast wu...
Easy change. Replace in ajax-dashboard.php

Code: Select all

		      print '		   	   <b>Davis VP+ ' . langtransstr('forecast') . ':</b> <span style="color: green; font-size:9pt">' . ucfirst($vpforecasttext) . "</span>"; 
with

Code: Select all

		      print '		   	   <b>Cumulus ' . langtransstr('forecast') . ':</b> <span style="font-size:9pt">' . ucfirst($vpforecasttext) . "</span>"; 
and it should work for you.

Best regards,
Ken[/quote]

Ok Ken, I've made that change. It was easier than I thought :o , but continues to be the file that I'm more afraid of change. It has lots of information and placements... ;)

I found a problem in the translation, in english the correct sentence is: "Cumulus forecast" but in portuguese or spanish the words appear reversed: In portuguese "Previsão do Cumulus"; in spanish "Previsión del Cumulus".
So to fix it I did the following change:

Code: Select all

  print '               <b>Cumulus ' . langtransstr('forecast') . ':</b> <span style="font-size:9pt">' . ucfirst($vpforecasttext) . "</span>";
			} ?></td>

Code: Select all

print '               <b> ' . langtransstr('Cumulus forecast') . ':</b> <span style="font-size:9pt">' . ucfirst($vpforecasttext) . "</span>";
			} ?></td
Then I added this line to the "language-xx.txt" files:

Code: Select all

langlookup|Cumulus forecast|Previsão do Cumulus|
(example for the portuguese file)

However what I asked to Ken is if you could put this forecast elsewhere. In an independent local from WU forecast. ;)

gemini06720 wrote:OK, here is what I hope a fully multilingual cloud base script - I have tried the script with the three template sets and the results appeared correct (well, at least for english and french languages) - I tried with other languages but they only displayed in english as the proper translations had not been entered into the 'language-LL.txt' language templates. I have not yet translated the Cumulus forecasts - would any of you have the 27 Cumulus forecast strings translated to french?

The multilingual cloud base script should produce an image with, not only Cumulus, but also Weather Display, VWS (Virtual Weather Station) and WUHU (Heavy Weather) - I have tested the code only with the Cumulus and the Weather Display data files - I have not tried the script with the other software.

This is the image the cloud base script should produce - not all options have been activated:
Image

Ensure that you keep the proper directory path for the graphic files.

If you encounter any problems, I would like to hear about them. If you have suggestions, I would like to hear about them (but, please, do not ask me to completely rewrite the script for you personal needs :roll: ). If you produce a translation to another languages, I would really appreciate if you send me a copy - eventually, I would like to include translations.

First off all, thank you very much Ray for your amazing script!! :o I will try it!
Now we have the chance to use the cloud base of Cumulus!

And as I see Jesús already done what was missing: how to place the image into the 'ajax-dashboard.php' script so it displays properly

:clap:

Great teen you are anda great teachers for me!

Thank you very much, muchas gracias!
Last edited by actioman on Wed 30 Mar 2011 7:15 pm, edited 1 time in total.
Kind Regards, Manuel.

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 »

Just uploaded the cloudbasescript works fine only have to do the translation and ofcourse to know where to put the image..
Well Ray what about the colorfull thermometer/gauge Image 8-)
gemini06720
Posts: 1700
Joined: Mon 10 Aug 2009 10:16 pm
Weather Station: No weather station
Operating System: No operating system
Location: World...

Re: Now available: AJAX/PHP multilingual website templates

Post by gemini06720 »

actioman wrote: ...I found a problem in the translation, in english the correct sentence is: "Cumulus forecast" but in portuguese or spanish the words appear reversed: In portuguese "Previsão do Cumulus"; in spanish "Previsión del Cumulus".
Manuel, this is what I was arguing in a previous message that, to cut corners, repeated words (such as forecast) were translated by themselves without ensuring that the grammar for any other languages (other than english) was correct (remember, I have been quoted as "having a strong disdain for grammatically-incorrect language usage" - yes, that is me... :roll: ). It would have been no more difficult to translate the complete expressions rather than just the individual words... :(

For example, the 'language-LL.txt' could have contained the following expressions (phrases/texts/words):

Code: Select all

langlookup|Cumulus Forecast|Cumulus Forecast|
langlookup|Weather Display Forecast|Weather Display Forecast|
langlookup|VWS Forecast|VWS Forecast|
langlookup|WeatherLink Forecast|WeatherLink Forecast|
langlookup|WXSIM Forecast|WXSIM Forecast|
This way, a grammatically-correct translation of the above expressions (phrases/texts/words) would have been possible, such as (for french):

Code: Select all

langlookup|Cumulus Forecast|Prévisions météo de Cumulus|
langlookup|Weather Display Forecast|Prévisions météo de Weather Display|
langlookup|VWS Forecast|Prévisions météo de VWS|
langlookup|WeatherLink Forecast|Prévisions météo de WeatherLink|
langlookup|WXSIM Forecast|Prévisions météo de WXSIM|
It is a good thing that I have at my disposal one of the most complete 'language-fr.txt' file which contains the grammatically-correct translations of ALL the scripts for the past two years... :mrgreen:
actioman wrote: However what I asked to Ken is if you could put this forecast elsewhere. In an independent local from WU forecast. ;)
Manuel, it is up to you to move things around - I could send you my highly commented and modified 'ajax-dashboard.php' template, the one used to create this <link removed> page or this <link removed> page so you can look at the code and how I moved things around, but I must warn you that those templates cannot be used instead of the one being released with the 'AJAX/PHP Multilingual Website Templates' sets (please note that those two pages are produced with data obtained from Weather Display).
actioman wrote: First off all, thank you very much Ray for your amazing script!! I will try it!
Manuel, how dare you write that the 'cloudbase' script is amazing if you have not tried it yet...
actioman wrote: Now we have the chance to use the cloud base of Cumulus!
I had adapted the 'cloudbase' script to the Cumulus data information about a year ago. What I have recently done thought was to clean the code and add new variable to better control the location of the different files needed to use the script. I still have to include the code needed to use the data from the WeatherLink software... :(
actioman wrote: And as I see Jesús already done what was missing: how to place the image into the 'ajax-dashboard.php' script so it displays properly
What Jesús did was to simply to add a table 'container' into which the the code for 'cloudbase' script was included - but it 'breaks' the 'normal' display of the page. As I suggested to Jesús, have a look at my <link removed> page so you can see hoe the cloudbase-produced image can be integrated into a page.
Last edited by gemini06720 on Sat 17 Aug 2013 8:05 am, edited 1 time in total.
gemini06720
Posts: 1700
Joined: Mon 10 Aug 2009 10:16 pm
Weather Station: No weather station
Operating System: No operating system
Location: World...

Re: Now available: AJAX/PHP multilingual website templates

Post by gemini06720 »

nitrx wrote:...only have to do the translation...
Ron, I am expecting an excellent dutch translation from you so I can include the dutch language into the script for the 'self-standing' format of the script - meaning the 'cloudbase' script is being used by itself and relies solely on the data file (such as 'realtime.txt') and none of the other templates/settings.
nitrx wrote:...and of course to know where to put the image...
I could tell you where to put the 'cloudbase' script ... but then, I would be permanently banned from the forums... :mrgreen:
nitrx wrote:...Well Ray what about the colorfull thermometer/gauge 8-)
Where?? Certainly not inside the 'cloudbase' script... :? Or do you mean a colourful thermometer to be used on the main page - have you seen the one I use on my <link removed> ... I had to dust off the spider webs and shrink it's size before I could add it to the main page... :twisted:
Last edited by gemini06720 on Sat 17 Aug 2013 8:05 am, edited 1 time in total.
User avatar
PaulMy
Posts: 4355
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 »

Ray,
Thank you for the graph and I will move things around later in the week.

Code: Select all

Or better yet, which political party will you be supporting... 
Ray, in a previous life I would have been able to tell you ;) , but now I am obliged to remain :| and independent.

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
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 was editing some code i moved is this code correct

Code: Select all

list($date_year,$date_month,$date_day,$time_hour,$time_minute,$monthname,$dayname)
  = CU_setDateTimes($date,$time,$SITE['WDdateMDY']);

thanks Beau
gemini06720
Posts: 1700
Joined: Mon 10 Aug 2009 10:16 pm
Weather Station: No weather station
Operating System: No operating system
Location: World...

Re: Now available: AJAX/PHP multilingual website templates

Post by gemini06720 »

n9mfk wrote:i was editing some code i moved is this code correct
Beau, if you would explain a little bit what you are trying to do, where you are moving the code to, anything, it would be easier for anyone to help you - remember the advice any one of us can give you is directly proportional to the amount of information you provide... :roll:

The code you quoted is the exact code that can be found in the 'CU-defs.php' script (lines 108-109)...
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 Ray i was adding some tags when i saw

Code: Select all

  = CU_setDateTimes($date,$time,$SITE['WDdateMDY']);
i thought i had moved it
beau
gemini06720
Posts: 1700
Joined: Mon 10 Aug 2009 10:16 pm
Weather Station: No weather station
Operating System: No operating system
Location: World...

Re: Now available: AJAX/PHP multilingual website templates

Post by gemini06720 »

n9mfk wrote:hi Ray i was adding some tags...
Beau, as Ken wrote in a previous message, you do not need to modify (to add or remove) anything in the 'CU-defs.php' script...

If you need a tag and that tag cannot be found in the 'CU-defs.php' script (meaning there was no reasons to convert the tag into a variable) and that tag name can be found in the 'CUtags.php' template, then you need to use the $WX['webtagname'] variable directly into the web page.

For example, let say I would like to display the type of station used for the weather information - that would be the <#stationtype> Cumulus webtag. If I look into the 'CUtags-comments.php' template, I find the following:

Code: Select all

stationtype|Davis Vantage Pro2 Plus|// The type of station in use:|:
So, to put the station information on my web page, all I have to do is to add the following:

Code: Select all

Station Type: <?php echo $WX['stationtype']; ?>
You see, there is/was no need for me to add an additional variable into the 'CU-defs.php' script - all the Cumulus webtags are available through the $WX['webtagname'] variable.

The reason why some of the webtags have been converted to variables (those you see in the 'CU-defs.php' script) is because those variables are (or should be) available from all four weather software for which the 'AJAX/PHP Multilingual Website Templates' have been created.
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 »

gemini06720 wrote:
nitrx wrote:...only have to do the translation...
Ron, I am expecting an excellent dutch translation from you so I can include the dutch language into the script for the 'self-standing' format of the script - meaning the 'cloudbase' script is being used by itself and relies solely on the data file (such as 'realtime.txt') and none of the other templates/settings.
nitrx wrote:...and of course to know where to put the image...
I could tell you where to put the 'cloudbase' script ... but then, I would be permanently banned from the forums... :mrgreen:
nitrx wrote:...Well Ray what about the colorfull thermometer/gauge 8-)
Where?? Certainly not inside the 'cloudbase' script... :? Or do you mean a colourful thermometer to be used on the main page - have you seen the one I use on my main page ... I had to dust off the spider webs and shrink it's size before I could add it to the main page... :twisted:
I'm not sure what you mean about the translation I did'nt translate nothing in the php-script I made the additions to the language-??.txt.
a zip is attached, these textstrings should be appendended to language-nl.txt I think I'm the only one using the php script in The Netherlands for Cumulus.
cloudbasedutchlanguage.zip
I could put the cloudscript there but that has no sense for my visitors :geek: BTW i had to change the altitude in the php script.

About the thermometer it's this one http://tzweather.org/wxweather/thermometer.php?uom=C the same picture I included in my post :D
You do not have the required permissions to view the files attached to this post.
Post Reply