Page 1 of 1

Webtags with time parameter in array?

Posted: Sat 08 Nov 2014 6:46 pm
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

Re: Webtags with time parameter in array?

Posted: Sat 08 Nov 2014 7:27 pm
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?

Re: Webtags with time parameter in array?

Posted: Sat 08 Nov 2014 7:53 pm
by duke
Yes, exactly Steve. That would eliminate a lot of separate 'time' tags.

Re: Webtags with time parameter in array?

Posted: Sat 08 Nov 2014 7:55 pm
by steve
I'll see about doing it in 'new' Cumulus. Remind me if when I forget ;)

Re: Webtags with time parameter in array?

Posted: Sat 08 Nov 2014 9:19 pm
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

Re: Webtags with time parameter in array?

Posted: Sun 09 Nov 2014 4:34 pm
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 :)