Re: [SMARTY-GENERAL] Plugins problem
| From: | Andrei Zmievski | Date: | Fri, 05 Apr 2002 14:31:14 +0000 |
| Subject: | Re: [SMARTY-GENERAL] Plugins problem | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-3519@lists.php.net to get a copy of this message | ||
On Fri, 05 Apr 2002, Bertrand DUNOGIER wrote:
> Hi,
>
> I've moved my modifiers and functions to the 2.0 plugins architecture,
> and i'm having some problems...
>
> I added the files :
> - modifier.multiplify.php
> - modifier.multiplify_advanced.php
> to my plugins directory.
>
> The functions in these files are respectively named:
> - smarty_modifier_multiplify()
> - smarty_modifier_multiplify_advanced()
>
> I attempt to register them using
> $tpl->register_modifier('multiplify', 'smarty_modifier_multiplify');
> $tpl->register_modifier('multiplify_adv',
> 'smarty_modifier_multiplify_advanced');
You don't need to call register_modifier() if your modifier is contained
in a separate plugin file in the plugins/ directory. Smarty will find it
automatically. This API function is needed only when you want to
register a modifier function that is part of your application
distribution.
-Andrei
* Marriage is not a word. It's a sentence. Life-long sentence. *