Re: Handling unparsed placeholders

From: Date: Tue, 15 Feb 2000 16:40:22 +0000
Subject: Re: Handling unparsed placeholders
References: 1  Groups: php.template 
Request: Send a blank email to php-template+get-14@lists.php.net to get a copy of this message
On Tue, 15 Feb 2000, Tobias Ratschiller wrote: > Hey! Hi, Tobias. > One thing I missed in your draft is the handling of placeholders, which > aren't assigned a value to. The PHPLib Template class allows you to specify > a $unknowns variable in the class' constructor, which defines how to handle > placeholders which aren't used in your script. This is a nice feature for > debugging and error handling. What does $unknowns variable do? What is stored in it? > Also, I don't understand the configuration variables part of your draft. Are > these configuration directive specific to the template module, or do you > mean PHP configuration? No, basically, configuration files for the application. For example, we have an application that does user feedback on news articles and we have a configuration file, which looks like this: ## globals ## vfeedback_site = http://benny.ispi.net/vfeedback ## sections ## [Topic] title = Topic post_date_format = m/d/y comment_cutoff = 40 post_window_width = 400 post_window_height = 300 post_form_window_width = 400 post_form_window_height = 450 And so on. This allows us to customize the app's behavior by just changing the config file. It is also used to store colors used in the template: [Product Page] fontColor_top_page_name = #000000 fontColor_top_page_name2 = #ffffff > And a tpl_print() would be a nice shorthand. Yes, true. -Andrei * Power corrupts. Atomic power corrupts atomically. *

« previous php.template (#14) next »