RE: [PEAR-DEV] yet another template
| From: | Jean-Michel POURE | Date: | Tue, 06 Nov 2001 18:49:50 +0000 |
| Subject: | RE: [PEAR-DEV] yet another template | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-2587@lists.php.net to get a copy of this message | ||
Hello Naoki,
1) Yes,something like smarty's get_template_vars would be useful. It returns the list of variables and enables automatic processing, for example via a database repository. You told me that you were going to submit me the code that enables to do that. I will include the code after testing. I will send you code.
I've never used mb_http_output(), so I am not sure if it is stable. So useful: templates could be stored in Latin1 and would then generate UTF-8 output.UTF-8 support on Windows/text editors is not always good. This way a developer can continue working in his usual environment.
I never used smarty, so I read through FAQ and QUICKSTART at their web site. It is very feature rich, and template file compiling is something I have been trying to implement in AT.php. However, I think template engine should leave anything that it doesn't have to do. I am not trying to offend anybody. It's just that my goal is slightly different from theirs. Like I said, I have no experience with smarty, so I talked mostly with assumptions. Addtionally, smarty's template syntax requires use of regex and my way of implementing multi-byte safe. template file parsing cannot handle their somewhat loose syntax. I could utilize multi-byte safe regex "mbregex", but users have to fetch the module and recompile PHP with it. Smarty is based on PEAR. I am new to PEAR and do not know much about Smarty anyway.
*Note: If you are developing Japanese web site, you should convert encoding of email headers and body to "JIS". (It's 7bit safe) Thank you for the information.Another question