Php webtags: Difference between revisions

From Cumulus Wiki
Jump to navigationJump to search
1 byte added ,  07:30, 20 April 2020
m
Line 13: Line 13:
If you adopt PHP Hypertext Processing on your web site; there are two main approaches:
If you adopt PHP Hypertext Processing on your web site; there are two main approaches:
#Either simply [[Customised_templates|customise]] the standard template pages by adding some PHP script that will be parsed (interpreted) after the template processed by Cumulus has been uploaded to your web server, but before the resulting HTML is sent to the browser.
#Either simply [[Customised_templates|customise]] the standard template pages by adding some PHP script that will be parsed (interpreted) after the template processed by Cumulus has been uploaded to your web server, but before the resulting HTML is sent to the browser.
#Or write a web page including PHP code that does not need to be processed by Cumulus. To get the information that Cumulus provides, all your new pages can "'''include'''" (if you want the page to fail without that cumulus derived information - use "''require''" instead) one, or more, PHP script file that Cumulus '''has'''previously  processed. In that processing all the [[webtags]] values were assigned to PHP variables.  This second approach is more efficient for those using PHP on their website as the actual web pages are produced from PHP scripts on the web server and do not need to be uploaded each time the numbers they output change. In general each full HTML structure definition for a web page is a far larger uploading burden than the file containing the variables.
#Or write a web page including PHP code that does not need to be processed by Cumulus. To get the information that Cumulus provides, all your new pages can "'''include'''" (if you want the page to fail without that cumulus derived information - use "''require''" instead) one, or more, PHP script file that Cumulus '''has''' previously  processed. In that processing all the [[webtags]] values were assigned to PHP variables.  This second approach is more efficient for those using PHP on their website as the actual web pages are produced from PHP scripts on the web server and do not need to be uploaded each time the numbers they output change. In general each full HTML structure definition for a web page is a far larger uploading burden than the file containing the variables.


This article will first address some of the complications that make providing such a variable assigning script more difficult than you might expect. The multiple complications imply that nobody can write a ready made single template script that will suit everyone. It also means if you are considering producing your own set of scripts to suit what you might do on your web site, there is quite a lot to think about. Next this article has links to a number of ready made fairly simple templates explaining which versions of Cumulus they will work with. After that this article helps you to produce your own set of templates, while it also describes some alternative approaches.
This article will first address some of the complications that make providing such a variable assigning script more difficult than you might expect. The multiple complications imply that nobody can write a ready made single template script that will suit everyone. It also means if you are considering producing your own set of scripts to suit what you might do on your web site, there is quite a lot to think about. Next this article has links to a number of ready made fairly simple templates explaining which versions of Cumulus they will work with. After that this article helps you to produce your own set of templates, while it also describes some alternative approaches.
5,838

edits

Navigation menu