Php webtags: Difference between revisions

893 bytes added ,  19:20, 26 June 2020
m
Line 393: Line 393:


== Add your template(s) to Extra Files processing ==
== Add your template(s) to Extra Files processing ==
Please note that a template file for Cumulus to process (local name in the following) can have any file extension you want. Some example show ".txt" being used, others show ".cum" being used, but some ready made templates might use ".php".  It really does not matter what the file extension is, but obviously what you enter in the local name "slot" must match the actual file you are referencing.
Similarly, a file that you are going to include in other scripts can have any extension you like, it makes no difference to the PHP parser. Thus what you put in the remote name "slot" must also match what you are going to use in your "include" (or "require") statements. One convention is that the extension should be ".inc" to make it clear it is an include file, not a web page as might be implied by using ".php".  It is the "<?php" at the start of the file that the PHP parser will recognise when it brings the contents of the uploaded file into another script.
   
   
=== Cumulus 1 ===
=== Cumulus 1 ===
Line 400: Line 404:
#Edit the screen columns as indicated by red in the figure:
#Edit the screen columns as indicated by red in the figure:
#*in one of the local side boxes (under the 'Local filenames' header), enter the path (directory\file) to where you have stored the template:<br>e.g. '''your_customised_template_location\cumuluswebtags.txt'''<br> (you can use the 'Browse' button to find and select the exact location of the file);<br><br>
#*in one of the local side boxes (under the 'Local filenames' header), enter the path (directory\file) to where you have stored the template:<br>e.g. '''your_customised_template_location\cumuluswebtags.txt'''<br> (you can use the 'Browse' button to find and select the exact location of the file);<br><br>
#*in one of the remote side boxes (under the 'Remote filenames' header), enter the name '''cumuluswebtags.php''':
#*in one of the remote side boxes (under the 'Remote filenames' header), enter the name '''cumuluswebtags.inc''':
#** -- if needed add the relative server path (see Cumulus Help for explanation) before the file name;
#** -- if needed add the relative server path (see Cumulus Help for explanation) before the file name;
#** (-- if you are using a local server, and want Cumulus to do a 'copy' instead of using 'FTP' then specify the full path for the destination file here);
#** (-- if you are using a local server, and want Cumulus to do a 'copy' instead of using 'FTP' then specify the full path for the destination file here);
#** -- ''notice that the file extension has been changed from'' '''txt''' (on the left side) to '''php''' (on the right side) ''as the remote file needs to be recognised by the PHP processor on the web server;''
#** -- ''notice that the file extension has been changed from'' '''txt''' (on the left side) to '''inc''' (on the right side) ''simply to help the remote file to be recognised on the web server;''
#* place a check mark in the box under the 'Process?' header;
#* place a check mark in the box under the 'Process?' header;
#** -- this tells Cumulus that the file '''cumuluswebtags.txt''' contains tags which need to be replaced by actual values when it processes the template into a web page;
#** -- this tells Cumulus that the file '''cumuluswebtags.txt''' contains tags which need to be replaced by actual values when it processes the template into a web page;
#*(there is no red arrow under the 'Realtime' header as it may not be appropriate),
#*(there is no red arrow under the 'Realtime' header as it may not be appropriate),
#** -- If any of your PHP pages require the latest information at your chosen real-time interval (rather than the 'normal' web site '''updating''' interval) they could be using this file because they require any web tags not in the realtime file, then you might need to select this option (indeed I have on my implementation);
#** -- If any of your PHP pages require the latest information at your chosen real-time interval (rather than the 'normal' web site '''updating''' interval) they could be using this file because they require any web tags not in the real-time file, then you might need to select this option (indeed I have on my implementation);
#*place a check mark in the box under the 'UTF-8' header;
#* place a check mark in the box under the 'FTP?' header;
#* place a check mark in the box under the 'FTP?' header;
#** -- this tells Cumulus that the processed file must be uploaded by file transfer to the remote Web server with all the other files;
#** -- this tells Cumulus that the processed file must be uploaded by file transfer to the remote Web server with all the other files;
Line 433: Line 436:
#If you have followed the instructions above and saved your file in UTF-8 encoding, tick the '''UTF8''' column.
#If you have followed the instructions above and saved your file in UTF-8 encoding, tick the '''UTF8''' column.
#Leave the '''Binary''' column unticked.
#Leave the '''Binary''' column unticked.
#If you have not ticked the realtime column, your file will be uploaded at the normal uploading interval unless you tick the '''End of Day''' column. If you do tick here, then your file will be uploaded right at the end of the rollover process, at this stage Cumulus will have the new date in every date type tag, it will have initialised the monthly tags to be empty, and the yesterday tags will have been set. In other words, you will only use this option if you have other web tag templates being uploaded during the day.
#If you have not ticked the real-time column, your file will be uploaded at the normal uploading interval unless you tick the '''End of Day''' column. If you do tick here, then your file will be uploaded right at the end of the rollover process, at this stage Cumulus will have the new date in every date type tag, it will have initialised the monthly tags to be empty, and the yesterday tags will have been set. In other words, you will only use this option if you have other web tag templates being uploaded during the day.
 


==Example==
==Example==
5,838

edits