Webtags (preserving history): Difference between revisions

m
Line 132: Line 132:
= Web tags available in Cumulus =
= Web tags available in Cumulus =


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:
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>
  <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 those programming code and you should use one of those (e.g. Notepad++), rather than a tool designed for web page design editing (eg. Dreamweaver).
''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).


Web tags are case sensitive, so please type the tag name exactly as shown in the web tag columns on this page. These web tag markers can return values for both readings from your weather station and the what can be derived from those readings. A small number of web tags require lower case input parameters to select which value is shown (e.g. value for one hour ago). Although some web tags will not accept output parameters, others allow you to vary the number of decimal places that are output, or to vary the way that times and dates are output. Some output parameters are case sensitive for Cumulus 1 (all are case sensitive for MX), so do check them carefully.
== Beta Builds of Cumulus ==


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. When development of Cumulus 1 ceased, that page held all web tokens specific to the MX Beta then under development. So at that time you had 2 articles to read to find which web tokens were available in MX Beta, and it was not clear in this article which web tags were only available in Cumulus 1!


=== Beta Builds of Cumulus ===
When Mark Crossley brought MX out of Beta, all the web tokens that were on that page were moved into this article, and it was made clear which flavours each web tag was available in.


There is a page that detailed the [[BETA webtags|additional webtags]] available in any Cumulus 1 Beta version that was under development. You may see some new web tag features as MX is being developed, appearing on that page, now development of Cumulus 1 has finished and MX is where all development happens.
For a while, some new web tokens, like those relating to moon, initially continued to be added to the Beta article. You should keep an eye on that Beta article just in case as MX is being developed any more appear there, although at time of writing new MX web tokens are now being added to 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==
 
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]]. This because web tags were introduced at different times, and there was no convention as to how they were named, so there is great inconsistency in the naming, making it very easy to spell a tag_name incorrectly.
 
For example the character "Y" might be included in a web tag to denote '''yesterday''' or it might denote ''this year''. Some web tags for '''today''' include a "T" as a suffix, some do not. "T" is also used as a suffix for the time-stamp tags. 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.
 
In the web tag to PHP variable scripts, I have posted [[Php_webtags#Minimised_Upload_size]], I have tried to introduce consistency in the PHP variable names, so "T" is added as a suffix to all "today" variables for example.


== Optional Parameters ==
== Optional Parameters ==
=== Input modification Parameters ===
=== Input modification Parameters ===
Most web tags do not require any input parameters. However, those for [[#Recent_History|individual minutes in last week]] and for [[#Monthly_All_Time_Records|the highest and lowest values for a particular month of any year]] do need input parameters specifying how many minutes ago or which month respectively. See the respective sections for full details.
Most web tags do not require any input parameters. However, those for [[#Recent_History|individual minutes in last week]] and for [[#Monthly_All_Time_Records|the highest and lowest values for a particular month of any year]] do need input parameters specifying how many minutes ago or which month respectively. See the respective sections for full details.
=== Output modification parameters ===
=== Output modification parameters ===
These are complex and therefore discussed under the major heading in [[#Output_.27format.27_Parameter|this later section]]. The options available include changing time format, changing number of decimal places, and removing decimal commas.
These are complex and therefore discussed under the major heading in [[#Output_.27format.27_Parameter|this later section]]. The options available include changing time format, changing number of decimal places, and removing decimal commas.


== Cumulus Templates ==
== Cumulus Templates ==
=== Using web tags in templates for creating HTML pages ===
=== Using web tags in templates for creating HTML pages ===
*You can create a template file that has a structure of HTML elements with Cumulus web tags to represent the information you want included.
*You can create a template file that has a structure of HTML elements with Cumulus web tags to represent the information you want included.
*If you  [[Customised_templates#What_to_select_on_the_.27Files.27_tab_of_the_Internet_Settings_screen_within_the_.27Configuration.27_menu|ask Cumulus to process]] that template file, it will create a HTML page from the template, and during that file creation replace the tag with the current value of the item the tag represents.
*If you  [[Customised_templates#What_to_select_on_the_.27Files.27_tab_of_the_Internet_Settings_screen_within_the_.27Configuration.27_menu|ask Cumulus to process]] that template file, it will create a HTML page from the template, and during that file creation replace the tag with the current value of the item the tag represents.
5,838

edits