Php webtags: Difference between revisions

m
mNo edit summary
 
(3 intermediate revisions by the same user not shown)
 
== Option 3: JavaScript Object Notation ==
 
Anybody using Cumulus MX is already using this option if they are set up to use the example web pages provided in the software package.
 
This is a lightweight data-interchange format (JSON) that is easy for humans to read and write, but critically it is easy for machines to parse and generate for transferring the variables in a portable way.
 
The 3.10.1 release of MX has functionality to optionally generate and upload many more json files for transfers to the external web server - see [[:Category:JSON_Files#Data_Transfer_Format]].
Cumulus MX uses this approach to provide variables for plotting the charts on your web site (Trends web page).
 
<div style="background: LemonChiffon;padding:5px; margin:2px;">
[[File:Crystal Clear info.png|40px]] This document was written for a MX release that is no longer latest!
 
'''The 3.10.1 release of MX changes the settings referenced below'''
</div>
 
Cumulus MX beta (and releases up to 3.9.8) uses this approach solely to provide variables for plotting the charts on your web site (Trends web page).
*To have the json files uploaded to your web site, you must enable '''Include standard files''' within the ''Web/FTP settings'' section of '''Internet Settings'''.
*Cumulus MX has one json file per weather chart
*The interval between sub-arrays (time and value pairs) depends on the chart, for daily rain and daily temperature there is a sub array for each day; but for most there is a sub-array for every minute (assuming Cumulus is left running for long enough) for a full 24 hours.
 
For the admin interface, the Cumulus MX engine has to pass information to and from the admin interface, this is done using an [[MX_Administrative_Interface#The_API_interface|application programming interface]] for each transfer (and each interface uses json format).
 
If you want to set up your own json files, you may follow the same approach but need to choose the interval between such sub-arrays that suits your use in your web pages.
** Check your choice of read-made script can output dates in the format you prefer.
 
==== Time format =====
*Do you prefer 24-hour clock (some call this timetable format or military format) or 12 hour clock with am/pm?
**Some ready made scripts may express times in both formats so you can choose the format you want
This will display the source code of the file, listing all the variable names and the values Cumulus has assigned to the web tags during it's processing cycle. It won't show you the original template with web tags in it.
 
[[Category:WebTools]][[Category:User Contributions]][[Category:WebTips]]
5,838

edits