Realtime.txt: Difference between revisions

6 bytes added ,  20:05, 4 January 2012
m
(Updated recreating file with webtags for the new tags available in v1.9.2)
Line 352: Line 352:
This can be achieved by creating a template file using the webtags below, and referencing this in the Cumulus Configuration|Internet|Files dialog. Ticking the 'Process?' checkbox, and supplying a remote filename will create this copy of the realtime.txt file.  
This can be achieved by creating a template file using the webtags below, and referencing this in the Cumulus Configuration|Internet|Files dialog. Ticking the 'Process?' checkbox, and supplying a remote filename will create this copy of the realtime.txt file.  


Note that the built-in realtime.txt always uses a 'dot' decimal character (as so is JavaScript/PHP 'safe'), the web tag version will use your host computers localisation for decimals. [There are some #RCxxx webtags available but they do not cover all the required values]
Note that the built-in realtime.txt always uses a 'dot' decimal character (and so is JavaScript/PHP 'safe'), the web tag version will use your host computers localisation for decimals. [There are some #RCxxx webtags available but they do not cover all the required values]
To ensure decimal compatibility across systems use a js construct such as:
To ensure decimal compatibility across systems use a js construct such as:


var rt = realtime.split(" ");
  var rt = realtime.split(" ");
var temp = +r[2].replace(',','.');
  var temp = +rt[2].replace(',','.');


when referring to decimal values in the constructed file.
when referring to decimal values in the constructed file.