Webtags (preserving history): Difference between revisions

m
Line 139: Line 139:


=== Output Parameter Differences between Cumulus 1 and Cumulus MX (Cumulus 3) ===
=== Output Parameter Differences between Cumulus 1 and Cumulus MX (Cumulus 3) ===
==== Explanation ====


*Cumulus MX (when running on Windows) uses the '''.NET''' software.  
*Cumulus MX (when running on Windows) uses the '''.NET''' software.  
Line 146: Line 148:
*The differences come about because Delphi is case-insensitive, while .NET and MONO are case sensitive, so .NET (and MONO) can use upper and lower case for different items, where Delphi has to use different letters.
*The differences come about because Delphi is case-insensitive, while .NET and MONO are case sensitive, so .NET (and MONO) can use upper and lower case for different items, where Delphi has to use different letters.


This can cause problems when somebody moves from using Cumulus 1 to using MX. They need to revisit any templates or scripts where they use output modifiers to specify a date and/or time format. We have already explored this for [[Webtags#NOAA]]
==== When it causes problems ====
 
This can cause problems when somebody moves from using Cumulus 1 to using MX. They need to revisit any templates or scripts where they use output modifiers to specify a date and/or time format. We have already explored this for [[Webtags#The_format_used_for_naming|NOAA report naming]].
 
For web tags it is much more complicated, not only do we need to select the right case, we also have to cope with MX selectors having different meanings when they are on their own and when they appear with other selectors, finally where you put quotes within these format specifiers varies between Cumulus 1 and MX partly because the reserved characters change and partly because MX introduces the concept of escaping characters.
 
Confused now? I'm not surprised, but maybe some examples will help before we actually list the available modifiers.


==== Examples ====


*#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.
*Examples related to case selection
*#[[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).
*# 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:
*[[File:Badge vMx.png]]You might be put off by references within .NET and MONO (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).
*#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).
*#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).
Line 158: Line 168:
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).
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).


==== Using HTML tags within format parameters (MX only) ====
==== Using HTML tags within format parameters (available in MX only) ====


'''Example using a class to change the look of part of the output'''
'''Example using a class to change the look of part of the output'''
Line 165: Line 175:
the output from this will look like ''04&nbsp;Dec&nbsp;2018<span class='xx'> at 10:12</span>''
the output from this will look like ''04&nbsp;Dec&nbsp;2018<span class='xx'> at 10:12</span>''


Note where the quotes are, and where you need to use '\' escape characters.
'''Note where the quotes are, and where you need to use '\' escape characters'''.


'''Example using HTML tags'''
'''Example using HTML tags'''
5,838

edits