Re: [SMARTY] load_filter

From: Date: Sat, 20 Dec 2003 21:36:16 +0000
Subject: Re: [SMARTY] load_filter
References: 1 2 3  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-10732@lists.php.net to get a copy of this message
At 17:46 18/12/2003, Gerard Samuel wrote:
On Thursday 18 December 2003 11:34 am, messju mohr wrote: you can unregister it with the unregister_*filter() functions. but you cannot make the loaded function undefined. It worked great. Thanks
Hello I have a problem to unload a filter/ 1) I have a little output filter that add a copyright ----------------------------------------------------------------------- function smarty_outputfilter_copyright($source, &$smarty) { return '<!-- Copyright mysite.com 2003/2004 -->'."\n\n".$source."\n\n".'<!-- Copyright mysitecom 2003/2004 -->'; } 2) I have a Smarty subclass ----------------------------------------- Class My_Smarty extends Smarty {
        var $design ;
/** * Constructor **/
        function My_Smarty ()
        {
        [.. various settings...]
        $this->autoload_filters = array('pre' => array('literalScriptAndStyle'),
                                       'output' => array('copyright')
                                     );
        }
}// Class Everything works fine. But I'm writing a file that output RSS and I need to suppress my copyright statement In my backend.php file I have $smarty = new My_Smarty; $smarty->unregister_outputfilter('copyright'); This doesn't work. Where do I fail ? Thanks Luc

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