Php webtags: Difference between revisions

706 bytes added ,  19:11, 20 April 2020
m
Line 104: Line 104:
*For the final version 1.9.4 of Cumulus 1 use the download file available on [[File:Cumuluswebtags.txt this wiki page]]). Note that in this download the recent history tags only occur with a single 3 hours ago parameter but if you use these tags it is likely you will want to include them for several other periods too.  Edit this template file to put in the necessary time selectors yourself.
*For the final version 1.9.4 of Cumulus 1 use the download file available on [[File:Cumuluswebtags.txt this wiki page]]). Note that in this download the recent history tags only occur with a single 3 hours ago parameter but if you use these tags it is likely you will want to include them for several other periods too.  Edit this template file to put in the necessary time selectors yourself.
** The advantage of only choosing one possible input parameter is that this template can use PHP variable names that match the web tag name, and only use PHP arrays when the web tag returns an array.
** The advantage of only choosing one possible input parameter is that this template can use PHP variable names that match the web tag name, and only use PHP arrays when the web tag returns an array.
* An earlier alternative in [https://cumulus.hosiene.co.uk/viewtopic.php?f=6&t=10424#p99536 this storm rain topic] is by Duke. His zip contains two files '''cumulustags_no_description.tpl''' and '''cumulustags_with_description.tpl''', each uses the approach of defining an array $WX in which the index to the array elements is the web tag name for example <tty>$WX['rfall'] = '<#rfall>';  //  total rainfall so far today</tty>.
* An earlier alternative in [https://cumulus.hosiene.co.uk/viewtopic.php?f=6&t=10424#p99536 this storm rain topic] is by Duke. His zip contains two files '''cumulustags_no_description.tpl''' and '''cumulustags_with_description.tpl''', each uses the approach of defining an array $WX in which the index to the array elements is the web tag name for example <tty>$WX['rfall'] = '<#rfall>';  //  total rainfall so far today</tty>. It contains all tags used by either Cumulus 1 or MX  in September 2014. If you use this script you need to call it by '''require_once 'cumulustags_with_description.'''' because it contains functions that can only be declared once to convert between decimal degrees and degrees, minutes, seconds formats in either direction, basically because it it stripping out the HTML space characters used by Steve Loft for latitude and longitude. For Recent History web tags there are up to 27 different input parameters in some cases. The extra time and date parameters shown above appear, but as array elements e.g. <tty>$WX['timeshort']  = '<#time format="hh:nn">';  //  current time (example format: 12:34)</tty>.


=== Alternatives ===
=== Alternatives ===
5,838

edits