Re: [SMARTY-GENERAL] How to unregister auto-added template filter?

From: Date: Fri, 05 Apr 2002 17:17:23 +0000
Subject: Re: [SMARTY-GENERAL] How to unregister auto-added template filter?
References: 1 2 3 4  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-3521@lists.php.net to get a copy of this message
On Fri, 05 Apr 2002, Bogien wrote: > 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? Apparently this was not properly implemented in the current Smarty version. I have fixed it for the next release. -Andrei * My wishlist: http://www.amazon.com/exec/obidos/wishlist/2Q2DIPY7BZLSH/ *

« previous php.smarty.general (#3521) next »