5,838
edits
m (→Example) |
|||
|
= Web tag Complications =
*Some web tags contain content that never changes, I will leave you to work out which these are; equally some web tags identify the month or year and only change when a new month or new year starts. It does not make for efficient use of resources if you make both PHP and Cumulus process every web tag each time Cumulus does a real time update. So although this article
*In early versions of Cumulus, its web tags did not take parameters and it was easy to assign each web tag to a variable that any data transfer approach could use;
*From version 1.9.3 various web tags (such as "Recent History") always take parameters, others (like those reporting times and/or dates) can take parameters.
**Consequently anyone devising a sample file in any of the formats listed below can only guess which parameters are most useful.
**Because of this 'guessing'; '''do not assume''' that a file from some one else, will meet your requirements ''out of the box'', you must understand the script language and be prepared to edit the file supplied into one that meets your own requirements.
*When editing the file remember that Cumulus web tags can return either numerical or string information, when using the script variables you may wish to do numeric calculations or
**Also when returning string information Cumulus can include embedded quotes: e.g. <code>$LatestError = "Latest Error: 'Some filename was locked" recorded';</code> as the embedded ones are double quotes, single quotes are used in <code>$LatestError='<#LatestError>';</code> in the template file as delimiters for the whole string. Equally Longitude and Latitude web tags by default label the minutes and seconds part with the same symbols as used by quotes, so we have to choose the alternative decimal notation <code>$longitude=<#longitude dp=5>;</code>
**Some
*Remember some
*Yet another complication (for Cumulus 1 users) is that the values for [[Webtags#Time.2FDate_.27format.27_Parameter|formatting parameters]] can include double and single quotes, but any assignment to a PHP variable requires the value to be quoted so it is treated as a string. There are two ways round this, one is to concatenate several uses of the same Cumulus web tag to build up the required layout without using both versions of quotation marks within any single formatting value e.g. <code>$LastDataReadTDM='<#LastDataReadT format=h:nn'.' on '.'<#LastDataReadT format="d mmm">';</code>, and the other is to use the PHP 'heredoc' approach - see PHP manual.
*Cumulus MX web tags do allow embedding of HTML, see the [[Webtags|Web tags article]] for details.
= The Four Main Approaches to data transfer =
| |||
edits