Templates |
[eluser]Phil Sturgeon[/eluser]
Right, give the malware stuff a rest guys, the link has been removed so it no longer matters. Quote:1) The Template Parser: I want to enable my users to upload their own templates. Can standard PHP be processed from the templates, or only the {} variables get processed? I’m really hoping you’ll say “NO, PHP can’t be run from templates” as it can be a real pain from a security aspect (allowing users to upload files with potential malicious code). Yes it can be run but just pass your content through encode_php_tags() within the security_helper.php and these will be encoded as HTML entities (and will appear as plain text to the user). Quote:2) Functions within templates: Anyone managed to modify the Template Parser class to enable “template functions”? E.g. if {me} is a variable, something like {fn do_something “parameter1” “parameter2”} I was playing about with a prototype for this last week. I called it HelpfulParser Quote:3) How do you go about caching templates? $this->output->set_output() to cache the whole thing, or save the finished content in a text file on the server somewhere when done. |
Messages In This Thread |
Templates - by El Forum - 06-22-2009, 02:19 AM
Templates - by El Forum - 06-22-2009, 08:00 AM
Templates - by El Forum - 06-22-2009, 08:06 AM
Templates - by El Forum - 06-22-2009, 08:08 AM
Templates - by El Forum - 06-22-2009, 08:15 AM
Templates - by El Forum - 06-22-2009, 08:22 AM
Templates - by El Forum - 06-22-2009, 08:29 AM
Templates - by El Forum - 06-22-2009, 08:30 AM
Templates - by El Forum - 06-22-2009, 08:34 AM
Templates - by El Forum - 06-22-2009, 08:43 AM
Templates - by El Forum - 06-22-2009, 08:47 AM
Templates - by El Forum - 06-22-2009, 08:54 AM
Templates - by El Forum - 06-22-2009, 08:58 AM
Templates - by El Forum - 06-22-2009, 09:56 AM
Templates - by El Forum - 06-23-2009, 06:30 AM
|