How to unregister auto-added template filter?
| From: | Bogien | Date: | Fri, 05 Apr 2002 10:49:27 +0000 |
| Subject: | How to unregister auto-added template filter? | ||
| References: | 1 2 3 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-3513@lists.php.net to get a copy of this message | ||
Hello,
I've made a postfilter in file "postfilter.upper.php", whose header is:
"function smarty_postfilter_upper($source, &$smarty)".
Beacuse of putting it into Smarty's "plugins/" directory, it is automatically
registered for every template.
BUT! I want to turn it off under some conditions. And I cannot...
I've already tried putting the following lines into my "index.php" script:
* $smarty->unregister_postfilter("upper");
* $smarty->unregister_postfilter("smarty_postfilter_upper");
* $smarty->unregister_postfilter("postfilter.upper.php").
What is more, I've tried to trace Smarty's internal postfilters array
by adding "$smarty->assign('test',
$smarty->_plugins['postfilter']);"
to my script and then turning the debugging console on. It showed nothing
("Array (0)").
So, can you help me with unregistering auto-added template filters?
Thanks...