Re: Smarty with PHP 4.01pl2
| From: | clayton collie | Date: | Tue, 13 Feb 2001 21:37:35 +0000 |
| Subject: | Re: Smarty with PHP 4.01pl2 | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-114@lists.php.net to get a copy of this message | ||
colin,
would you mind sharing your mods with the list ? im in the process of
writing some open source software for which i want to use Smarty as the
template engine, but im afraid that requiring 4.04 may be too much of a turn
off for a lot of folks (it difficult enough to persuade folk to move to 4.0)
----- Original Message -----
From: "Colin Dewey" <cndewey@hotmail.com>
To: <smarty@lists.ispi.net>
Sent: Tuesday, 13. February 2001 15:28
Subject: [smarty] Smarty with PHP 4.01pl2
> I am stuck in a situation where I must use PHP 4.01pl2 because our server
> can not be upgraded to PHP 4.04pl1 for a couple of months.
>
> I am very interested in using Smarty right now, so I am looking for some
> workarounds to the problems Smarty has with earlier versions of PHP.
After
> checking the BUGS file, it looks like preg_replace and get_defined_vars
are
> the only major problems with using 4.01pl2.
>
> The "limit" parameter of preg_replace only appears to be used in
processing
> {strip} tags, so I will just avoid using these tags.
>
> The function get_defined_vars only appears to be used for {include} tags
> when passing variables as attributes. But upon examining the code,
> get_defined_vars is used only for inheritance of template variables, not
> variables set through attributes of the {include} tag. By eliminating
> get_defined_vars, I made it so that {include} will still work with
> attributes, but the included file will not inherit any template variables.
> {include} tags without attributes still allow for inheritance of template
> variables, since they are simply converted into a PHP include.
>
> Are there any other issues that I need to deal with?
>
> Thanks,
>
> Colin Dewey
>
>
>
> ---
> You are currently subscribed to smarty as: ccollie@cau.edu
> To unsubscribe send a blank email to $subst('Email.Unsub')
> Visit Smarty's homepage at
> http://www.phpinsider.com/php/code/Smarty/