Re: [SMARTY] Re: [SMARTY-GENERAL] Plugindir
| From: | Roberto Bertó | Date: | Tue, 09 Apr 2002 20:40:33 +0000 |
| Subject: | Re: [SMARTY] Re: [SMARTY-GENERAL] Plugindir | ||
| References: | 1 2 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-3590@lists.php.net to get a copy of this message | ||
Prefilters and postfilters order is sometimes important. Dont forget about
it.
Atenciosamente,
----------------------------------------
Roberto Bertó
Under Development
http://www.under.com.br
Tel: 51 32270599
Cel: 51 91169628
----- Original Message -----
From: "Andrei Zmievski" <andrei@ispi.net>
To: "Linus McCabe" <linus@mccabe.nu>
Cc: <smarty-general@lists.php.net>
Sent: Tuesday, April 09, 2002 4:43 PM
Subject: [SMARTY] Re: [SMARTY-GENERAL] Plugindir
> On Sun, 07 Apr 2002, Linus McCabe wrote:
> > I'd suggest:
> > Have two plugins dirs in smarty.
> > One that is distributed with smarty that contains all the standard
plugins.
> > One that is user specified that contains 'private' plugins and filters.
> >
> > The user-specified pluginsdir is searched first, so that the user can
> > override smarty standard plugins.
> > The user specified pluginsdir is the only one scanned for pre/post
filters
> > (as I figure these kind of filters are always applied and therefore
quite
> > site-specific?)
> >
> > This way, on a server with multiple sites only one smarty installation
is
> > needed, standard plugins needs only to be installed in one dir and site
> > specific plugins/filters can easily be used and distributed with 3rd
party
> > applications (without the need of registering every plugin-function).
> >
> > Hope this made some kind of sence :)
>
> If we go that way, I would actually like to have more than two plugin
> directories, otherwise we'll once again have someone complaining that
> two directories is not enough. But it has some consequences:
>
> 1. The default Smarty plugin directory needs to be specified first in
> the list, for a number of reasons. One of which is performance: if
> the default dir is searched first, then Smarty doesn't have to do as
> much work looking through the other ones.
>
> 2. The plugin directories will have to be relative to the dir where
> Smarty is installed or absolute paths.
>
> 3. Pre/postfilters. Not quite sure what to do about those, since
> scanning all the plugin directories might be a bit costly, but then
> it's only done during compilation. However, if we introduce 'output'
> plugins then those will incur a performance penalty because they will
> need to be located upon every template access, unless the output
> plugins are specifie via something like {output type="trimwhitespace"}.
>
> -Andrei
>
> "Music expresses that which can not be said
> and on which it is impossible to be silent."
> -Victor Hugo
>
> --
> Smarty General Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>