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

User avatar
saratogaWX
Posts: 1238
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 »

gemini06720 wrote:
nitrx wrote:Thanks Ray I've a look at your solution.
Ron, you can add terms/expressions into your templates (with the 'langtrans()' or the 'langtransstr()' functions) and add the same terms/expressions into your 'language-nl.txt' (with the proper dutch translation) and the terms/expressions will be properly translated/displayed onto your web pages... ;)
It's not necessary to add these terms to the language-LL text files .. there is already a method to do this using a bit of code from the wxastronomy.php page. First, a clarification is needed... the Settings.php

Code: Select all

// if your software uploads almanac dates using a language OTHER THAN English, please put the month
// names in your language to replace the English ones below.  This is used primarily by the
// wxastronomy.php page for the local dates of moon phases, solistices, and equinoxes
$SITE['monthNames'] = array(  // for wxastronomy page .. replace with month names in your language 
'January','February','March','April','May','June',
'July','August','September','October','November','December'
);
// example:
//$SITE['monthNames'] = array(  // Danish for wxastronomy page .. replace with month names in your language
//'januar','februar','marts','april','maj','juni',
//'juli','august','september','oktober','november','december'
//);
is used to handle date formats from the weather station when the date format on the weather PC is not in English. It doesn't change based on the ?lang=LL changes for multilingual operation, it is used like

Code: Select all

function get_localdate ( $indate) {
  global $SITE;
  $EnglishMonths = array(
   'January','February','March','April','May','June',
   'July','August','September','October','November','December');
   
// Change '02:33 UTC 4 September 2007' to
//        specified date by  
  $timeFormat = 'D, d-M-Y h:ia T';  // Fri, 31-Mar-2006 14:03 TZone
//  $timeFormat = 'h:ia T D, d-M-Y ';  // Fri, 31-Mar-2006 14:03 TZone
  if(isset($SITE['timeFormat'])) { $timeFormat = $SITE['timeFormat']; }
  
  $utcstr = substr($indate,10) . " " . substr($indate,0,9); // move formats
  echo "<!-- input utcstr='$utcstr' -->\n";

 // input dates are assumed to be in English only
 if (isset($SITE['monthNames'])) {
    // convert TO English for strtotime()
    echo "<!-- before utcstr='$utcstr' -->\n";
	foreach ($EnglishMonths as $i => $monthEN) {
	   $utcstr = preg_replace('|'.$SITE['monthNames'][$i].'|i',$monthEN,$utcstr);
	}  
    echo "<!-- after utcstr='$utcstr' -->\n";
  }

  $utc = strtotime($utcstr);
  $lclstr = date($timeFormat,$utc);
  if (isset($SITE['langMonths'])) {
    // convert From English for return (will only work if long-format month names in $timeFormat)  
    echo "<!-- before lclstr='$lclstr' -->\n";
	foreach ($EnglishMonths as $i => $monthEN) {
	   $lclstr = preg_replace('|'.$monthEN.'|i',$SITE['langMonths'][$i],$lclstr);
	}  
    echo "<!-- after lclstr='$lclstr' -->\n";
  }
  return ($lclstr);
}
The $SITE['langMonths'] is automatically set by parsing the language-LL.js file as part of the common.php routines.

You could add langtrans entries automatically by doing something like

Code: Select all

  global $SITE,$LANGLOOKUP;
  $EnglishMonths = array(
   'January','February','March','April','May','June',
   'July','August','September','October','November','December');
  if (isset($SITE['langMonths'])) {
	foreach ($EnglishMonths as $i => $monthEN) {
	   $LANGLOOKUP[$monthEN] = $SITE[langMonths][$i];
	}  
  }
Then a langtrans(<english>) would result in the month name of the target language.

There's a similar feature for other $SITE['lang...'] values like this example for French
<!-- loading language-fr.js -->
<!-- langMonths='Array
(
[0] => janvier
[1] => février
[2] => mars
[3] => avril
[4] => mai
[5] => juin
[6] => juillet
[7] => août
[8] => septembre
[9] => octobre
[10] => novembre
[11] => décembre
)
-->
<!-- langDays='Array
(
[0] => dim
[1] => lun
[2] => mar
[3] => mer
[4] => jeu
[5] => ven
[6] => sam
[7] => dim
)
-->
<!-- langUVWords='Array
(
[0] => aucun
[1] => faible
[2] => moyen
[3] => élevé
[4] => très&nbsp;élevé
[5] => extrême
)
-->
<!-- langBaroTrend='Array
(
[0] => Soutenu
[1] => Monte lentement
[2] => Monte rapidment
[3] => Tombe lentement
[4] => Tombe rapidement
)
-->
<!-- langBeaufort='Array
(
[0] => calme
[1] => très légère brise
[2] => légère brise
[3] => petite brise
[4] => jolie brise
[5] => bonne brise
[6] => vent frais
[7] => grand frais
[8] => coup de vent
[9] => fort coup de vent
[10] => tempête
[11] => violente tempête
[12] => ouragan
)
-->
<!-- langHeatWords='Array
(
[0] => inconnu
[1] => extrême danger de chaleur
[2] => danger de chaleur
[3] => fort risque de chaleur
[4] => extrêmement chaud
[5] => inconfortablement chaud
[6] => chaud
[7] => modérément chaud
[8] => confortable
[9] => frais
[10] => froid
[11] => inconfortablement froid
[12] => très froid
[13] => extrêmement froid
)
-->
<!-- langWindDir='Array
(
[0] => N
[1] => NNE
[2] => NE
[3] => ENE
[4] => E
[5] => ESE
[6] => SE
[7] => SSE
[8] => S
[9] => SSO
[10] => SO
[11] => OSO
[12] => O
[13] => ONO
[14] => NO
[15] => NNO
)
-->
<!-- load_langtrans finished -->
Run any page with ?debug=y and see this in the view-source.

Hope this helps...
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:
gemini06720 wrote:
nitrx wrote:Thanks Ray I've a look at your solution.
Ron, you can add terms/expressions into your templates (with the 'langtrans()' or the 'langtransstr()' functions) and add the same terms/expressions into your 'language-nl.txt' (with the proper dutch translation) and the terms/expressions will be properly translated/displayed onto your web pages... ;)
It's not necessary to add these terms to the language-LL text files .. there is already a method to do this using a bit of code from the wxastronomy.php page. First, a clarification is needed... the Settings.php

Code: Select all

// if your software uploads almanac dates using a language OTHER THAN English, please put the month
// names in your language to replace the English ones below.  This is used primarily by the
// wxastronomy.php page for the local dates of moon phases, solistices, and equinoxes
$SITE['monthNames'] = array(  // for wxastronomy page .. replace with month names in your language 
'January','February','March','April','May','June',
'July','August','September','October','November','December'
);
// example:
//$SITE['monthNames'] = array(  // Danish for wxastronomy page .. replace with month names in your language
//'januar','februar','marts','april','maj','juni',
//'juli','august','september','oktober','november','december'
//);
is used to handle date formats from the weather station when the date format on the weather PC is not in English. It doesn't change based on the ?lang=LL changes for multilingual operation, it is used like

Code: Select all

function get_localdate ( $indate) {
  global $SITE;
  $EnglishMonths = array(
   'January','February','March','April','May','June',
   'July','August','September','October','November','December');
   
// Change '02:33 UTC 4 September 2007' to
//        specified date by  
  $timeFormat = 'D, d-M-Y h:ia T';  // Fri, 31-Mar-2006 14:03 TZone
//  $timeFormat = 'h:ia T D, d-M-Y ';  // Fri, 31-Mar-2006 14:03 TZone
  if(isset($SITE['timeFormat'])) { $timeFormat = $SITE['timeFormat']; }
  
  $utcstr = substr($indate,10) . " " . substr($indate,0,9); // move formats
  echo "<!-- input utcstr='$utcstr' -->\n";

 // input dates are assumed to be in English only
 if (isset($SITE['monthNames'])) {
    // convert TO English for strtotime()
    echo "<!-- before utcstr='$utcstr' -->\n";
	foreach ($EnglishMonths as $i => $monthEN) {
	   $utcstr = preg_replace('|'.$SITE['monthNames'][$i].'|i',$monthEN,$utcstr);
	}  
    echo "<!-- after utcstr='$utcstr' -->\n";
  }

  $utc = strtotime($utcstr);
  $lclstr = date($timeFormat,$utc);
  if (isset($SITE['langMonths'])) {
    // convert From English for return (will only work if long-format month names in $timeFormat)  
    echo "<!-- before lclstr='$lclstr' -->\n";
	foreach ($EnglishMonths as $i => $monthEN) {
	   $lclstr = preg_replace('|'.$monthEN.'|i',$SITE['langMonths'][$i],$lclstr);
	}  
    echo "<!-- after lclstr='$lclstr' -->\n";
  }
  return ($lclstr);
}
The $SITE['langMonths'] is automatically set by parsing the language-LL.js file as part of the common.php routines.

You could add langtrans entries automatically by doing something like

Code: Select all

  global $SITE,$LANGLOOKUP;
  $EnglishMonths = array(
   'January','February','March','April','May','June',
   'July','August','September','October','November','December');
  if (isset($SITE['langMonths'])) {
	foreach ($EnglishMonths as $i => $monthEN) {
	   $LANGLOOKUP[$monthEN] = $SITE[langMonths][$i];
	}  
  }
Then a langtrans(<english>) would result in the month name of the target language.

There's a similar feature for other $SITE['lang...'] values like this example for French
<!-- loading language-fr.js -->
<!-- langMonths='Array
(
[0] => janvier
[1] => février
[2] => mars
[3] => avril
[4] => mai
[5] => juin
[6] => juillet
[7] => août
[8] => septembre
[9] => octobre
[10] => novembre
[11] => décembre
)
-->
<!-- langDays='Array
(
[0] => dim
[1] => lun
[2] => mar
[3] => mer
[4] => jeu
[5] => ven
[6] => sam
[7] => dim
)
-->
<!-- langUVWords='Array
(
[0] => aucun
[1] => faible
[2] => moyen
[3] => élevé
[4] => très&nbsp;élevé
[5] => extrême
)
-->
<!-- langBaroTrend='Array
(
[0] => Soutenu
[1] => Monte lentement
[2] => Monte rapidment
[3] => Tombe lentement
[4] => Tombe rapidement
)
-->
<!-- langBeaufort='Array
(
[0] => calme
[1] => très légère brise
[2] => légère brise
[3] => petite brise
[4] => jolie brise
[5] => bonne brise
[6] => vent frais
[7] => grand frais
[8] => coup de vent
[9] => fort coup de vent
[10] => tempête
[11] => violente tempête
[12] => ouragan
)
-->
<!-- langHeatWords='Array
(
[0] => inconnu
[1] => extrême danger de chaleur
[2] => danger de chaleur
[3] => fort risque de chaleur
[4] => extrêmement chaud
[5] => inconfortablement chaud
[6] => chaud
[7] => modérément chaud
[8] => confortable
[9] => frais
[10] => froid
[11] => inconfortablement froid
[12] => très froid
[13] => extrêmement froid
)
-->
<!-- langWindDir='Array
(
[0] => N
[1] => NNE
[2] => NE
[3] => ENE
[4] => E
[5] => ESE
[6] => SE
[7] => SSE
[8] => S
[9] => SSO
[10] => SO
[11] => OSO
[12] => O
[13] => ONO
[14] => NO
[15] => NNO
)
-->
<!-- load_langtrans finished -->
Thank Ken I will have a look at his (tommorow ;) )

Run any page with ?debug=y and see this in the view-source.

Hope this helps...
Best regards,
Ken
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 »

Ken, the french translation for both the day names and the month names used in my scripts, as you have explained, has probably been produced by my 'language-fr.js' file rather than my 'language-fr.txt' file - but it certainly has not hinder any of my script by having the translation into both files.

There is also that little problem (I cannot remember seeing it in the newer scripts) when translating 'Sun' (the luminous celestial body around which earth and other planets revolve) and 'Sun' (the abbreviation for the day name Sunday) - the first 'Sun' should translate to 'soleil' whereas the second 'Sun' should translate to 'dim' (short for dimanche) - also note the absence of capital letters as capital letters should only be used at the beginning of sentences and for 'proper' names such as a person name, a city name, meaning that capital letters are very seldom used in the french language.
User avatar
saratogaWX
Posts: 1238
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 »

gemini06720 wrote:Ken, the french translation for both the day names and the month names used in my scripts, as you have explained, has probably been produced by my 'language-fr.js' file rather than my 'language-fr.txt' file - but it certainly has not hinder any of my script by having the translation into both files.
No hindrance, just extra work for you that's not really needed.
gemini06720 wrote:There is also that little problem (I cannot remember seeing it in the newer scripts) when translating 'Sun' (the luminous celestial body around which earth and other planets revolve) and 'Sun' (the abbreviation for the day name Sunday) - the first 'Sun' should translate to 'soleil' whereas the second 'Sun' should translate to 'dim' (short for dimanche) - also note the absence of capital letters as capital letters should only be used at the beginning of sentences and for 'proper' names such as a person name, a city name, meaning that capital letters are very seldom used in the french language.
You have a long memory, but that issue was fixed in the wxastronomy.php page a long time ago by using 'Sun&nbsp;' as the title. Then it wouldn't be confused with the abbreviation for Sunday ('Sun') in the language lookup. It's the reason why the months, daynames, etc are not loaded directly in the langtrans() function's $LANGLOOKUP[] array .. it's best to deal with those variants as I'd shown in a prior posting.
Fox_Of_The_Wind
Posts: 13
Joined: Sat 29 Nov 2008 1:50 pm
Weather Station: Davis Vantage Pro 2
Location: De Soto Wisconsin USA
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Post by Fox_Of_The_Wind »

Job well done saratogaWX!!!! I changed over my site today. just have to fig out why Cumulus wants to keep uploading the default index.htm file now....that and to fig out my wx warns banner....anyway good work :)))
ok I got it to stop doing the default upload thing but now I am trying to get my WX warnings to work right any ideas what is up? oh and I got to find out why my current stats is saying that its raining...
Thanks!
http://cumulus.desotowiwx.com
Last edited by Fox_Of_The_Wind on Fri 25 Mar 2011 6:41 pm, edited 2 times in total.
Image
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 »

nitrx wrote:I saw that Ray forgot the this month extremes in his template so I've added it for your convience http://apeldoorn.tk/weer/wxcudataextremes.php?lang=en (I don't use it myself because I've them in seperate templates in my menu) the zip is attached you will have to ad one line to your local language translation

langlookup|Extreme Weather Data This Month|Extreme Weather Data This Month| the bold text should be translated for non english in your language-??.txt

Well-minded, I had not even noticed too :oops: .

Good Job Rob!

mcrossley wrote:<h1 class="headerTitle" style="text-align: center;">

may do it? Though this should probably go in a CSS somewhere.
Mark, worked very well. Thank you very much! Now I finally have my banner centered!

gemini06720 wrote:Manuel, I must be doing something wrong... After two clean installations of Mike Challis 'Fast Secure Contact Form' scrit files, I cannot get the contact form to display in any other languages other than english, no matter which parameters I use... :evil:

I have not contacted Mike Challis yet as I want to find out by myself why the contact form will not display in french with the french language files already available/installed.

I have also noticed that Mike Challis' scripts do not play all that well when installed and run under XAMPP on a Windows platform - XAMPP = Apache HTTP Server, MySQL database, and interpreters for scripts written in the PHP and Perl languages. I also tried changing the name of the directory where the files are originally installed to (ie: 'contact-files') but, unfortunately, some paths seem to be hard coded into the script rather than relying on the path information variable as entered (declared) during installation... :(
Like I said: "If you can, very well. If you can not, well anyway!" ;)
gemini06720 wrote:Manuel, you should know by now that 'almost' every thing is possible - look at what you have accomplished over the past months, new web pages... :)

As you should be aware, the way much of the web page information is displayed on the screen is through the use of cascading style sheets or CSS - the cascading style sheets are used, not only to offer different colour themes, but also to position the information on the screen.

OK, here is how I do any changes/modifications to my pages without having to change a bunch of CSS files. I have created a new cascading style sheet which I have called 'weather-cumulus.css' and which only contains the properties I want to change on some or all the web pages displayed. So, I have added the following line to my 'weather-cumulus.css' file:

Code: Select all

body {
  font-family: "Trebuchet MS", verdana, helvetica, arial, sans-serif;
}
But, what is very important is that this 'weather-cumulus.css' file be loaded after all the other cascading style sheets have loaded, meaning that a line such as

Code: Select all

<link rel="stylesheet" href="weather-cumulus.css" media="screen" title="screen" />
be added to the end of the 'top.php' file. This way, all the other cascading style sheets are read and processed before this last one is read and modify whatever properties need to be modified (clear as mud... :mrgreen: ).
Ray, thanks for the help! Is working now! :D As you see was clear as... crystalline water! ;)

How can I make this font change only for the 'wxcudata.php' page? Is it possible?

Thanks again!!! :D
Kind Regards, Manuel.

Image
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:How can I make this font change only for the 'wxcudata.php' page? Is it possible?
Manuel, as I wrote previously, for you, now, almost anything/everything is possible... :mrgreen:

OK, rather than creating/using an additional external CSS file, near the top of the 'wxcudata.php', add the following lines before the closing '</head>' element (do not remove the closing '</head>' element):

Code: Select all

<style type="text/css">
body { font-family: "Trebuchet MS", verdana, helvetica, arial, sans-serif; }
</style>
Do not forget to remove the link to the additional external CSS file from the 'top.php' template (ie: remove this line: '<link rel="stylesheet" href="weather-cumulus.css" media="screen" title="screen" />')... ;)
Fox_Of_The_Wind
Posts: 13
Joined: Sat 29 Nov 2008 1:50 pm
Weather Station: Davis Vantage Pro 2
Location: De Soto Wisconsin USA
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Post by Fox_Of_The_Wind »

Fox_Of_The_Wind wrote:Job well done saratogaWX!!!! I changed over my site today. just have to fig out why Cumulus wants to keep uploading the default index.htm file now....that and to fig out my wx warns banner....anyway good work :)))
ok I got it to stop doing the default upload thing but now I am trying to get my WX warnings to work right any ideas what is up? oh and I got to find out why my current stats is saying that its raining...
Thanks!
http://cumulus.desotowiwx.com

I got it all fixed. Thanks Saratoga!!! Job well done :)
Image
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 »

gemini06720 wrote:Manuel, as I wrote previously, for you, now, almost anything/everything is possible... :mrgreen:
Yes, sometimes I am a little skeptical! :mrgreen:

You gotta give me some lessons in html and php ;) .

Everything works as I wanted again! :clap:


Thank you very much Ray!
Kind Regards, Manuel.

Image
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:...Yes, sometimes I am a little skeptical! :mrgreen:
Manuel, if you do not try something, you will not know if you can do it ... or if you like it... :D
actioman wrote:...You gotta give me some lessons in html and php ;)
To learn more about HTML and PHP you have to use the W3Schools and the PHP Manual web pages as tutorial and reference pages... ;)
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 run in to a problem i not sure if it the cumulus or the template
i went back to stock ajaxcu.js i also took the check out of use cumulus pressure names
have a trend of -0.014 falling in cumulus
dashboard reading steady with a down arrow
something looks wrong im not sure what?
Beau
http://n9mfk.localweatherview.net/wxindex.php
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: Help needed!!!

Post by actioman »

actioman wrote:
(...)

And one last question for this page. In Elvas we do not have any METAR station, then I have to choose between Badajoz (a spanish city, near Elvas. Only 12km) and Portalegre (a portuguese city, district capital of my region, at 58km from Elvas). I choose Badajoz, then if you see the page, it shows the informatiion:
WeatherUnderground 7-Day Forecast for : Badajoz

Is there any chance to appear like this:
WeatherUnderground 7-Day Forecast for : Elvas region
Finally got that "Badajoz" was substituted for "Elvas Region"!

Was simple, I just had to change this:
if ($PrintMode and ($printHeading or $printIcons)) { ?>
<table width="<?php print $maxWidth; ?>" style="border: none;" class="WUforecast">
<?php if($printHeading) { ?>
<tr align="center" style="background-color: #FFFFFF;">
<td><b>WeatherUnderground <?php echo $WUtitle; ?>: </b><span style="color: green;">
<?php echo $WUforecastcity; ?></span>
</td>
</tr>
by this:
if ($PrintMode and ($printHeading or $printIcons)) { ?>
<table width="<?php print $maxWidth; ?>" style="border: none;" class="WUforecast">
<?php if($printHeading) { ?>
<tr align="center" style="background-color: #FFFFFF;">
<td><b>WeatherUnderground <?php echo $WUtitle; ?>: </b><span style="color: green;">
<?php langtrans('Elvas Region'); ?></span>
</td>
</tr>
Now I have two new questions for Ken (or someone who knows).

It is possible to provide the Cloud Base (preferably in graphical mode), like in the WD template? Should not be too complicated since Cumulus give that information :?:
And it is possible to implement the cumulus forecast in this templates? So we could choose between Wunderground forecast (from what I've seen, very poorly translated) and Cumulus forecast.


Thanks in advance! ;)
Kind Regards, Manuel.

Image
User avatar
saratogaWX
Posts: 1238
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,
i run in to a problem i not sure if it the cumulus or the template
i went back to stock ajaxcu.js i also took the check out of use cumulus pressure names
have a trend of -0.014 falling in cumulus
dashboard reading steady with a down arrow
something looks wrong im not sure what?
Beau
http://n9mfk.localweatherview.net/wxindex.php
It's correct. The barotrend word of 'Steady' is used for 1hr pressure changes of less than 0.02 inHg/hr.
The arrow (which is used for all the arrow displays) uses 0.00 for no arrow, and anything above or below that shows an arrow with the value, so I'd expect a -0.014 /hr reading to display a down arrow (since it is falling, just not enough to have the barotrend word indicate 'Falling'.
User avatar
saratogaWX
Posts: 1238
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 »

Manuel,

As far as I know, nobody has adapted the Cloud-height graphic script to use Cumulus realtime.txt instead of clientraw.txt. It should be possible to do, however.

The Cumulus forecast is in $WX['forecast'] in the CUtags.php.
In your index.php page, change

Code: Select all

	<?php if(isset($SITE['ajaxDashboard']) and file_exists($SITE['ajaxDashboard']))
	 { include_once("ajax-dashboard.php");
	   } else {
to

Code: Select all

	<?php if(isset($SITE['ajaxDashboard']) and file_exists($SITE['ajaxDashboard']))
	 { $vpforecasttext = $WX['forecast'];
      include_once("ajax-dashboard.php");
	   } else {
and that will display the Cumulus forecast as the VP Forecast in the dashboard.

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 »

ok Thanks ken,
it been very low all day from 0.018 it 0.005
an im using 1 min baro update look at the trend how do the numbers work out thanks
Beau
Post Reply