Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 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

gen-CUtags.php?

Discussion of Ken True's web site templates

Moderator: saratogaWX

Post Reply
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

gen-CUtags.php?

Post by n9mfk »

Hi Ken,
I have a question about gen-CUtags.php

is there some way to usead not have the format be part of the tag name

Code: Select all

 wvar	<#MonthMaxTempLD format="'at' T 'on' G">	Date of This months lowest daily minimum temperature 
thanks beau
User avatar
saratogaWX
Posts: 1196
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: gen-CUtags.php?

Post by saratogaWX »

Sorry Beau,
The current script is not designed to handle complex query-type Cumulus variables. It won't handle any quoted (single quote) strings in the variable names.
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: gen-CUtags.php?

Post by n9mfk »

Hi Ken, let me be a little clearer on what im looking for

input

Code: Select all

wvar	<#MonthMinTempHD format="'at' h:mm tt 'on' dd MMMM yyyy">	Date of This months highest daily minimum temperature 

output

Code: Select all

$WX['MonthMaxTempLD format="'at' h:mm tt 'on' dd MMMM yyyy"'] 
is there a way to get?

this

Code: Select all

 $WX['MonthMaxTempLD'] = 'at 11:13 PM on 03 April 2015'; 
thanks Beau
User avatar
saratogaWX
Posts: 1196
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: gen-CUtags.php?

Post by saratogaWX »

You might try changing gen-CUtags.php

Code: Select all

  $varname = "<#$ourname>";
to

Code: Select all

  $varname = "<#$ourname>";
  $varray = explode(" ",$ourname);
  if(isset($varray[1])) {$ourname = $varray[0];]
which should split the variable name from the arguments (by the first space in the string).

Then that should produce a line like

Code: Select all

MonthMinTempHD|<#MonthMinTempHD format="'at' h:mm tt 'on' dd MMMM yyyy">|//Date of This months highest daily minimum temperature
in the generated CUtags.txt template file
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: gen-CUtags.php?

Post by n9mfk »

Hi Ken, that works great with 1 change make ] to}

Code: Select all


$varname = "<#$ourname>";
  $varray = explode(" ",$ourname);
  if(isset($varray[1])) {$ourname = $varray[0];]


will you be adding that to your base code?
Beau
Post Reply