5,838
edits
Line 131: | Line 131: | ||
=Option 2 - implementation details= | =Option 2 - implementation details= | ||
The installation, usage, and example sections below apply to | The installation, usage, and example sections below apply to a template file called "cumuluswebtags.txt", so if you are using a file with another name or multiple template files, adapt the instructions as relevant. | ||
== | == Choose your template(s) == | ||
First either download a read made template, choosing from those available as listed above; or write your own template(s) following the guidance above. | |||
##If the first line contains the following sequence of 4 characters "'''& | |||
#Next add any parameter combinations that you need for your own implementation. For example, for my implementation, I found that my customisation of the template version had used many more Cumulus web tags with parameters than I expected, consequently my cumuluswebtag.cum template file has (amongst others) the following extras | == Edit your template(s) == | ||
#*$LastDataReadTDM='<#LastDataReadT format=h:nn'.' on '.'<#LastDataReadT format="d mmm">'; | |||
#*$LastDataReadTDMY='<#LastDataReadT format="h:nn am/pm"> on calendar day <#LastDataReadT format="dddd d mmmm yyyy">'; | If you have chosen a ready made template, or have realised you need a PHP variable for a different set of parameters to those coded already, you will need to edit your template. | ||
#*$LastTimeStamp='<#LastDataReadT format="h:nn 'on' d mmm">'; | |||
#*$metdateM='<#metdate format="mmm">'; | # It is best to use an editor that allows you to choose the encoding for the file it saves. Any editor designed for editing code should do this (e.g. Notepad++), but word processors and the popular online editors will add unwanted extra characters. The best encoding for files to work with Cumulus is "UTF-8 without BOM". | ||
#*$metdateMM='<#metdate format="mmmm">'; | # Open your file in your chosen editor. | ||
#*$monthYear='<#metdate format="mmmm yyyy">'; | #*If the first line contains the following sequence of 4 characters "'''<'''" then replace those 4 characters with a single "''<''" (so the first line becomes "''<php''") NOTE - the Wiki cannot have a PHP script uploaded to it, so changing the first line stops the Wiki from treating it as PHP script, but after Cumulus has processed it (Cumulus does not care what it processes, but will copy anything it does not recognise across unchanged) we do want the generated file to be treated as a PHP script. | ||
#*$monthStart='<#metdate format="yyyy-mm-01">'; | #Add any new web tags that have been added for the Cumulus version you are using, that were not available when the template was created. | ||
# | #Next look at any web tags that can take input and/or output parameters; add any parameter combinations that you need for your own implementation. | ||
# | #*For example, for my implementation, I found that my customisation of the template version had used many more Cumulus web tags with parameters than I expected, consequently my cumuluswebtag.cum template file has (amongst others) the following extras | ||
#**$LastDataReadTDM='<#LastDataReadT format=h:nn'.' on '.'<#LastDataReadT format="d mmm">'; | |||
#**$LastDataReadTDMY='<#LastDataReadT format="h:nn am/pm"> on calendar day <#LastDataReadT format="dddd d mmmm yyyy">'; | |||
#**$LastTimeStamp='<#LastDataReadT format="h:nn 'on' d mmm">'; | |||
#**$metdateM='<#metdate format="mmm">'; | |||
#**$metdateMM='<#metdate format="mmmm">'; | |||
#**$monthYear='<#metdate format="mmmm yyyy">'; | |||
#**$monthStart='<#metdate format="yyyy-mm-01">'; | |||
#Next delete any rows with web tags that are not relevant to your weather station model for greater efficiency; | |||
# Finally save your edited template file or files in either the "web" directory where Cumulus has the files it will process or where you store your customised templates. | |||
#* The choice of filename and extension is up to you, it might make sense to use a different name or extension (e,g. "cumuluswebtagsT.cumMX"), if you have edited the file to be sure you don't confuse it and the original and you know which version of Cumulus it is for. | |||
#* If you have several templates being uploaded at different intervals you might choose names like "webtagsRealtimeT.txt", "webtagsNormalT.txt" and "webtagsEoDT.txt". | |||
Here is a screenshot for Cumulus 1 using the name as "cumuluswebtags.txt" if you are basically using the provided code).[[File:ScreenShot-PHPWebtags-ConfigSetup.png|right|'Screenshot top and bottom extracts Cumulus v1.9.4']] | |||
#On the 'Cumulus main screen', in the '''Configuration''' menu, select the ''Internet'' option; | #On the 'Cumulus main screen', in the '''Configuration''' menu, select the ''Internet'' option; | ||
#On the 'Internet Settings' screen, select the ''Files'' tab;<br><br> | #On the 'Internet Settings' screen, select the ''Files'' tab;<br><br> |
edits