Customised templates: Difference between revisions

From Cumulus Wiki
Jump to navigationJump to search
m
m (→‎Changing the templates: add cross reference to extra sensors)
As soon as you edit templates, remember that when you update to a new build of Cumulus you have the option during the install process to decline overwriting your HTML templates if they are in the 'web' subfolder with the standard templates.
 
==Notes of caution==
 
*Remember to edit the xxxT.htm files, (not the xxx.htm files) and to have 'Include Standard Files' ticked (as shown above) on the ''Files'' tab of the '''Internet''' screen within the 'Configuration' menu.
 
*Try to use a simple text editor to change the files. Many HTML editors will insert additional code, or break the standard Cumulus '[[webtags]]' by replacing the < or > symbols with character codes. Avoid using Word processors, like Word, to edit these files.
 
*Keep copies of any xxxT.htm files you modify. It is best to back up the whole Cumulus folder onto a different disc on a regular basis.
 
*From version 1.8.9 onwards, the Cumulus installer installs the standard templates in a Cumulus subfolder called 'web/originals' so you can refer to them. The installer offers you the option of either replacing all templates in the 'web' folder, or not replacing them, if you update Cumulus or re-install the current version. If you select to install the templates, your changes will be lost as Cumulus will replace those in the 'web' folder with the standard ones.
= Creating Your Own Templates =
If you are making anything but minor changes to the template, consider creating your own files with different names (in a separate folder), and list these local files for Cumulus to process them.
*Remember if you are not using the standard files to unselect 'Include Standard Files' (see image at top of page) on the ''Files'' tab of the '''Internet''' screen within the 'Configuration' menu.
*References to the new templates for Local files 0 to 9 can be stored in [[cumulus.ini]] by placing the path and filename in left hand column on the ''Files'' tab of the '''Internet''' screen within the 'Configuration' menu. An easy way to achieve this is by using the appropriate '''Browse...''' button.
*Local files 10 upto (from version 1.9.3) 99 have to be manually inserted (or amended) by editing [[cumulus.ini]], using a ''ExtraLocalNN='' line (note NN is any 1 or 2 digit number) in the existing '''[FTP site]''' section and placing the path and filename after the equals sign. An easy way to achieve this is by copying one of the lines with NN set to between '0' and '9', and then replacing the numerical digit with the required 2 digit one and then changing the filename.
*For template files 0 to 9, leave the Binary column unset (it is only set for image files) on the ''Files'' tab of the '''Internet''' screen within the 'Configuration' menu; this is achieved by including ''ExtraBinaryNN=0'' for NN values '10' upto '99' in the existing '''[FTP site]''' section of cumulus.ini.
*Leave the 'Realtime?' column unselected for template files 0 to 9 to be processed at the 'Interval' specified in the middle of the ''Web settings'' frame on the Sites/Options tab of the '''Internet''' screen within the 'Configuration' menu. Select it for processing at the 'Realtime interval'. For NN values '10' upto '99', normal interval processing is achieved by including ''ExtraRealtimeNN=0'', while realtime interval processing is achieved by including ''ExtraRealtimeNN=1'', in the existing '''[FTP site]''' section of cumulus.ini.
Assuming that your web server is not local, the host, username, password and initial directory are specified on the Sites/Options tab of the '''Internet''' screen within the 'Configuration' menu and you list the remote filenames as follows:
*For files 0 to 9 enter the directory and required file name in the 'Remote filenames' column on the ''Files'' tab of the '''Internet''' screen within the 'Configuration' menu; for NN values '10' upto '99' this is achieved by including ''ExtraRemoteNN='' with directory and filename after the equals sign in the existing '''[FTP site]''' section of cumulus.ini.
*As you have listed template files (with Cumulus webtags) these need to be processed; select 'Process?' column for 0 to 9 or for 10 upto 99 add ''ExtraProcessNN=1'' in the existing '''[FTP site]''' section of cumulus.ini.
*Finally, select 'FTP?' column for 0 to 9 or for 10 upto 99 add ''ExtraFTPNN=1'' in the existing '''[FTP site]''' section of cumulus.ini.
 
 
If your web server is on the same computer (or local network) as Cumulus, then the instructions for remote files are changed slightly:
*If you are making anything but minor changes to the template, consider creating your own files with different names (in a separate folder), and list them for Cumulus to process these. Local files 0 to (from version 1.9.3) 99 can be listed in [[cumulus.ini]]; in this case have 'Include Standard Files' unticked. You will need to select both 'Process' and (optionally if your web server is on the same computer as Cumulus) 'FTP' if your new files are replacement templates.
*It is rarely needed to specify the host, username, password and initial directory of a local web server on the Sites/Options tab of the '''Internet''' screen within the 'Configuration' menu (the exception is if your webpage includes a script requiring loading a local file like 'dayfile.txt').
*For files 0 to 9 enter the full path and required file name in the 'Remote filenames' column on the ''Files'' tab of the '''Internet''' screen within the 'Configuration' menu; for NN values '10' upto '99' this is achieved by including ''ExtraRemoteNN='' with full path and filename after the equals sign in the existing '''[FTP site]''' section of cumulus.ini.
*As you have listed template files (with Cumulus webtags) these need to be processed; select 'Process?' column for 0 to 9 or for 10 upto 99 add ''ExtraProcessNN=1'' in the existing '''[FTP site]''' section of cumulus.ini.
* Finally, normally unselect 'FTP?' column for 0 to 9 or for 10 upto 99 add ''ExtraFTPNN=0'' in the existing '''[FTP site]''' section of cumulus.ini.
If a particular webpage on a local web server includes a script requiring loading a local file like 'dayfile.txt', then enter its remote directory and name, and select File Transfer Process, as per the previous set of instructions. The remaining pages will simply be copied across locally using the specified full path and so do not require FTP as per instructions directly above.
5,838

edits

Navigation menu