function : register_modifier() in classes
| From: | Florian Winkler | Date: | Thu, 24 Jul 2003 21:48:17 +0000 |
| Subject: | function : register_modifier() in classes | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-9962@lists.php.net to get a copy of this message | ||
Hi all ,
I need a function in my template which I want to use as a modifier ( for instance nl2br ).
class forum()
{
function text_interpret($text)
{
// do something with $text;
return $text;
}
function list_threads()
{
global $tpl; // the smarty-object
//assign array with the threads
$tpl->register_modifier("text_interpret","text_interpret");
}
}
how can I set the method text_interpret as a modifier in my template ?
greetz
fLo & thnx in advance
_________________________________________________________________
MSN Groups & Chat - Freunde finden - leicht gemacht http://groups.msn.com/people/