Webtags (preserving history): Difference between revisions

m
Cut
m (Cut)
Line 73: Line 73:
There is some more information on [[Webtag Applicability|Web tag Applicability page]].
There is some more information on [[Webtag Applicability|Web tag Applicability page]].


= Web tags available in Cumulus =
<div style="background: LemonChiffon;padding:5px; margin:2px;">
[[File:Crystal Clear info.png|40px]] This document is 'Work In Progress' so content may not be complete or accurate!
</div>
Those special markers in the file are called web tags, during processing Cumulus will replace them with the actual values.  Typically you would use this to build your own website by having an HTML template file with your layout, static text and graphics.  In the position on the page you wish Cumulus to insert the relevant data place a web tag in the form (briefly mentioned earlier in this page):
<pre><#tag_name [optional input parameters][optional output parameters]></pre>
''Note: When you put a tag into your template, be careful that whatever program you are using to develop your web pages doesn't change the angle brackets to slightly different symbols -- this is a common cause of failure!''  There are a number of editing tools that are '''designed for editing programming code''' and you should use one of those (e.g. Notepad++, Brackets, NoteTab Light, HTML kit, amongst many others), ''rather than a tool designed for web page design editing'' (e.g. Dreamweaver, word press, amongst others).
== Beta Builds of Cumulus ==
{{Version badge 1}}The [[BETA webtags|additional webtags]] page was created to hold web tags that were not yet available in any Cumulus 1 formal release, but were available in any Beta version that was under development.
[[File:Badge vMx.png]]When development of Cumulus 1 ceased, Cumulus MX was available as a beta. At that time, this article continued to describe web tags available in the final release of Cumulus 1 (builds 1099, 1100, 1101, 1099.1, and 1099.2). Because the output parameters were different for MX, all the MX web tag information was in [[BETA webtags|beta web tags]] article.  That was fine in early beta versions of MX because they supported only a small subset of the web tags available for Cumulus 1.
However, as MX development continued more and more web tags were available and maintaining two articles, one for each flavour of Cumulus was impossible. Therefore, MX users had to look at two pages, some of their web tags were in this article some were in that article. Confusingly, some web tags were in both articles, because the parameters that could be used with those tags were increased in MX, so the additional parameters were only shown in the beta article, an example was when the moon web tags had parameters added to control the output from build 3047, these were added to the Beta article.
When Mark Crossley brought MX out of Beta, all the web tags that were on that page were moved into this article, and it was made clear which flavours each web tag was available in (excluding Cumulus 2).
The developer of MX new releases normally shares a new version of MX first as beta by sending the distribution in an email to a number of Cumulus users. They respond by email, with the intension any issues can be ironed out before the distribution is made available as a public release.  Given the number of weather station types supported and the complexity of options for using Cumulus, this does not always ensure all ways in which MX can be used are tested, especially as the Cumulus Users given the beta test zip might not use all the features that have been modified in a particular development.
Although such releases often add additional web tags, any additional web tags are currently being entered into this article and no new MX web tags had been added to beta article since that move of the earlier ones into this article.
== Case sensitivity ==
The tag_name in the general format above is case sensitive, so please type the tag name exactly as shown in the web tag columns in the tables below.
The optional input parameters always use lower case, so please type them exactly as shown in the sections dealing with input parameters.
The optional output parameters are case insensitive when used in Cumulus 1. But for Cumulus 2 and later, so this includes MX, the output parameters are case sensitive and also dependent on what other output formatters are being used if any, so please read the sections on output parameters and study the examples in the tables carefully.
==Inconsistency of web tag names==
Some tags are all lower-case, some are camel-case, and some start with a capital letter. Have a look yourself at just how much inconsistency is present in the names in the tables below. The great inconsistency in the naming, gives rise to a problem as it very easy to spell a tag_name incorrectly as you naturally expect there to be a standard pattern.
You will find yourself frequently having to refer to this article, if you decide to make your own Cumulus templates (see section below for more information). This applies whether those templates are for [[Customised templates|web pages]],  to implement [[Xml webtags|Extensible Mark-up Language files]],  or [[Php webtags|PHP Hypertext Pre-processor scripts]].
When Steve Loft introduced the first web tags as part of developing software for his own use, he did not create a naming standard to ensure consistency in the future. As he introduced further web tags at different times, the names used might be consistent amongst the ones introduced that day, but there was still no naming convention to ensure consistency with tags introduced previously or to help name future tags.
===Inconsistency for today, yesterday, this month, this year groups===
It would be easier if all tags reporting parameters for today were consistent, let alone consistency in naming between tags for today and yesterday.  The tags for this year and this month were introduced in same release, so there is some consistency in how they were named then, but no standard to ensure future tags for this month and this year would be named the same way.
===Inconsistency in use of "Y"===
*The character "Y" might be included in a web tag to denote '''yesterday''', or it might denote ''this year''
*Where the Y is indicating '''yesterday''', it is sometimes a ''prefix'', sometimes a ''suffix''!
===Inconsistency in use of "T"===
*The newer web tags for '''today''' include a "T" as a suffix, the older ones do not. 
**The lack of a "T" in some today tags causes some confusion with all-time record tags as they have a similar naming structure to these older today web tags.
**This is particularly confusing and is why you must look up today, and all-time, tags in the tables in this article.
*The time-stamp tags add a "T" to the corresponding web tag for the value, but in an inconsistent way:
**the T is a prefix sometimes and
**the T is a suffix sometimes
**This is particularly confusing and is why you must look up time-stamp tags in the tables in this article.
===Choosing script variable names derived from tag names===
In the web tag to PHP variable scripts, I have posted, see [[Php_webtags#Minimised_Upload_size]], I have tried to introduce better consistency in the PHP variable names, so "T" is added as a suffix to all "today" variables for example. Some other script authors try to match the inconsistent web tag names, so their script variable names are also inconsistent.
== Optional Parameters ==
=== Input modification Parameters ===
Most web tags do not require any input parameters. An input parameter is used where the same web tag can represent a value for a number of different past time instants. Each of those past time instants is represented by a different value for the input parameter. So a combination of web tag name and input parameter lets Cumulus to pick the value you want to see.
There are currently only two types of tags where an input parameter is mandatory:
*The '''recent history tags''' where a separate value exists for potentially every [[#Recent_History|individual minute in last week]]. These tags need an input parameter specifying how many minutes ago is required. To save entering a very large number for minutes, an input parameter can combine days, hours, and minutes, ago using up to 3 input parameters as explained in linked section.
*The [[#Monthly_All_Time_Records]] where a separate one exists for each particular month (of any year) need input parameter specifying which month. Again see the respective section for full details of input parameter (which is 1 for January to 12 for December, but 0 is also available with a special meaning).
=== Output modification parameters ===
These are complex, they vary between Cumulus 1 and later flavours, and what output modifiers can be used varies between web tags.
Consequently, output modifiers will be discussed in a later section headed [[#Output_.27format.27_Parameter]].
The options available include:
* changing date and/or time format,
* changing number of decimal places, and
* removing decimal commas.


=Output 'format' Parameter=
=Output 'format' Parameter=
5,838

edits