Customised templates: Difference between revisions

From Cumulus Wiki
Jump to navigationJump to search
m
→‎Creating Your Own Templates: Amend to follow Mark's advice re using 'binary' mode
m (→‎Example: add screenshot)
m (→‎Creating Your Own Templates: Amend to follow Mark's advice re using 'binary' mode)
= 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 [[Cumulus_Screenshots#Files_Tab|''Files'' tab]] of the '''Internet''' screen within the 'Configuration' menu.
#List the new template files (text including Cumulus webtags) you have created as ''Local files'':
#*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#Section:_FTP_Site]], using a ''ExtraLocalNN='' line (note NN is any 1 or 2 digit number) 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 thennext replacing the numerical digit with the required 2 digit onenumber and then changing the filename as needed.
*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 [[Cumulus.ini#Section:_FTP_Site]].
*#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 itthe relevant box for processing a file at the 'Realtime interval'. For NN values '10' upto '99', normal interval processing is achieved by including a ''ExtraRealtimeNN=0'' line, while realtime interval processing is achieved by including a ''ExtraRealtimeNN=1'' line, in [[Cumulus.ini#Section:_FTP_Site]].
*As#Assuming you have listed template files (withtext including Cumulus webtags) these need to be processed by Cumulus to create webpages; select 'Process?' column for 0 to 9 on the ''Files'' tab of the '''Internet''' screen within the 'Configuration' menu; or for 10 upto 99 add ''ExtraProcessNN=1'' in [[Cumulus.ini#Section:_FTP_Site]].
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[[Cumulus.ini#Section:_FTP_Site]].
*For templateweb filespages 0 to 9, leaveselect the ''use '''Binary''' columnmode unsetfor (FTP'' column [it is only setmandatory for image files, but optional on most other files; however its use will ensure accurate transfer if any extended (non-ASCII) character set letters (like accented ones) or symbols (like temperature degree symbol) are used on your customised pages] on the ''Files'' tab of the '''Internet''' screen within the 'Configuration' menu; this is achieved by including ''ExtraBinaryNN=01'' for NN values '10' upto '99' in [[Cumulus.ini#Section:_FTP_Site]].
*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 [[Cumulus.ini#Section:_FTP_Site]].
*Finally, select 'FTP?' column for 0 to 9 or for 10 upto 99 add ''ExtraFTPNN=1'' in [[Cumulus.ini#Section:_FTP_Site]].
 
 
If your web server is on the same computer (or local network) as Cumulus, then the instructions for remote files are changed slightly because copying rather than file transfer is used:
*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 (on your computer or network) and required file name (destination for file copy instruction) 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 youFinally haveto listedindicate templatea files'Copy' (withinstruction Cumulusis webtags)required, theseunselect needboth to'Binary' be processed; selectand 'ProcessFTP?' columncolumns for 0 to 9; or for 10 upto 99 add ''ExtraProcessNNExtraBinaryNN=10'' and ''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 just for that webpage enter its remote directoryweb andfile name, and select Binary and 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 requirewithout FTP as per instructions directly above).
* 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