Webtags (preserving history): Difference between revisions

m
Line 23: Line 23:


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.
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.
== Differences between Cumulus 1 and Cumulus MX (Cumulus 3): ==
All web tag_names are identical in both flavours, but not all web tags are available in both. All input parameters are the same (see [[#Recent_History|Recent History]]), but output parameters do vary between Cumulus 1 and MX.
*Cumulus MX (when running on Windows) uses the '''.NET''' date and time format characters that are not exactly the same as the '''Delphi''' ones that Cumulus 1 uses.  For Cumulus MX see [http://msdn.microsoft.com/en-us/library/8kb3ddd4(v=vs.110).aspx this Microsoft site] for format selectors. The differences come about because Delphi is case-insensitive, and .Net is case sensitive, so .Net can use upper and lower case for different items, where Delphi has to use different letters. If Cumulus MX is running on Linux or Mac OS X, then it uses '''Mono''' for date and time formatting, but the same case sensitive rules apply as for .NET.
*#For example,[[File:badge v1.png]] in Delphi, "nn" means "minutes" for Cumulus 1, [[File:Badge vMx.png]]but "minutes" is "mm" for .Net in Cumulus MX.
*# e.g. the hour in 24-hour format, is "HH" (although in Delphi (Cumulus 1)'hh' would be treated same) but in .NET it must be "HH" (Cumulus MX).
*[[File:Badge vMx.png]]You might be put off by references within .NET (Cumulus MX) to single/standard characters and custom modifiers, the following 3 examples may add clarity:
*#For example ''<#MonthTempHD format="d">'' is a single character format modifier, therefore the 'd' acts as a standard modifier, and causes a date of 22 July 2014 for the highest temperature in the month to be returned in the standard short date format e.g. '22/07/2014' (exact contents for any one date vary by locale).
*#Similarly ''<#MonthTempHD format="M">'' is a single character format modifier and therefore the 'M' acts as a standard modifier and causes the date for the highest temperature in the month to be returned in the standard day and month format e.g. '22 July' (exact contents for any one date vary by locale).
*#Whilst ''<#metdate format="d M">'' is not a single character format modifier and therefore both the 'd' and the 'M' are interpreted as custom modifiers and cause the current date to be returned as a digit(s) for the day and a digit(s) month (in a without leading zeroes format) e.g. '6 7' would be returned for 6 July.
*The other change with the "format" parameter is the different way that .Net escapes characters that are not being used as format specifiers. In [[File:badge v1.png]]Delphi you can put the 'verbatim' characters inside single quotes (Cumulus 1); in [[File:Badge vMx.png]].NET you can still use single quotes, but alternatively you can escape each verbatim character with a backslash as prefix (Cumulus MX).
For official full details see [https://cumulus.hosiene.co.uk/viewtopic.php?f=39&t=17888 Cumulus MX forum], the following table is revised for simplicity. (I've abridged the table here and included '%' where necessary to avoid single character versus custom complications).
== Optional 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.
=== Output modification parameters ===
These are discussed under [[#Output_.27format.27_Parameter|this later section]] heading.


=== Using web tags in templates for creating HTML pages ===
=== Using web tags in templates for creating HTML pages ===
5,838

edits