Re: [SMARTY] register_modifier -> Call to undefined function: smarty_modifier_...

From: Date: Tue, 24 Feb 2004 21:43:31 +0000
Subject: Re: [SMARTY] register_modifier -> Call to undefined function: smarty_modifier_...
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-11021@lists.php.net to get a copy of this message
On Tue, Feb 24, 2004 at 11:27:32PM +0200, David Förster wrote: > Hello, > > I want to register a modifier which just returns a given string for > testing. > The registration seems to work but when I use it in a template I get an > error saying > 'Call to undefined function: smarty_modifier_addSmileys'. > > Something seems to go wrong because my custom function should be > called.. > > This is what I do: > > $tpl->register_modifier('addSmileys', 'addSmileys'); > > function addSmileys($string) > { > return $string; > } > > And in the template: > > {$message.text|escape:"htmlall"|nl2br|addSmileys} > > (The registration should work because it gives me an error when I use a > non existent function. > > Any help is appreciated > > - david That's strange. The only suggestion I have is: Clear your templates_c folder and recompile the template. The above should really work as expected. greetings messju

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