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

Webtags with time parameter in array?

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderator: daj

Post Reply
duke

Webtags with time parameter in array?

Post by duke »

Looking at the webtags which accept a time parameter, is it possible for Cumulus to process them as an array rather than processing and uploading each individual tag with it's time?

For example, currently I have:

Code: Select all

$WX['RecentOutsideTemp m=5']      = '<#RecentOutsideTemp m=5>';  // 5 minute Recent Outside Temperature
$WX['RecentOutsideTemp m=10']     = '<#RecentOutsideTemp m=10>';  // 10 minute Recent Outside Temperature
$WX['RecentOutsideTemp m=15']     = '<#RecentOutsideTemp m=15>';  // 15 minute Recent Outside Temperature
$WX['RecentOutsideTemp m=20']     = '<#RecentOutsideTemp m=20>';  // 20 minute Recent Outside Temperature
$WX['RecentOutsideTemp m=25']     = '<#RecentOutsideTemp m=25>';  // 25 minute Recent Outside Temperature
User avatar
steve
Cumulus Author
Posts: 26672
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Webtags with time parameter in array?

Post by steve »

It would be possible, with enhancement, for a web tag to produce an array of values, yes. So something like this would be possible:

<#RecentOutsideTemp m=5to25step5>

which might produce the string

10.5,10.6,10.5,10.4,10.3

for example. Is that the kind of thing you had in mind?
Steve
duke

Re: Webtags with time parameter in array?

Post by duke »

Yes, exactly Steve. That would eliminate a lot of separate 'time' tags.
User avatar
steve
Cumulus Author
Posts: 26672
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Webtags with time parameter in array?

Post by steve »

I'll see about doing it in 'new' Cumulus. Remind me if when I forget ;)
Steve
GaryJ
Posts: 8
Joined: Sat 25 Oct 2014 11:24 pm
Weather Station: Davis VP2
Operating System: Windows Server 2012 R2
Location: Darwin, Australia

Re: Webtags with time parameter in array?

Post by GaryJ »

Would love to see this as well as it would make the template creation a lot easier. I currently produce a previous 72hr observations style page based on an array of values. The way I'm doing it at the moment is having a PHP template file that contains data like this.

$observetemp = array('<#RecentOutsideTemp>',
'<#RecentOutsideTemp m=31>',
'<#RecentOutsideTemp h=1 m=1>',
'<#RecentOutsideTemp h=1 m=31>');

Cumulus processes it and uploads it. It's then just a php include for the main page and I can process it in PHP as a normal array.

Gary
duke

Re: Webtags with time parameter in array?

Post by duke »

steve wrote:I'll see about doing it in 'new' Cumulus. Remind me if when I forget ;)
Ok, but it sounds like my memory may be as good/bad as yours. I'll complete an 'enhancement request' too.

If I recall correctly, in another post, you mentioned you hoped to increase the amount of tags that can accept the 'recent' parameter so this would be really helpful :)
Post Reply