Re: custom function not implemented : documented

From: Date: Thu, 27 Dec 2001 21:27:03 +0000
Subject: Re: custom function not implemented : documented
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-2396@lists.php.net to get a copy of this message
On Thu, 27 Dec 2001, Francois Dumais wrote: > The php file contains : > > $smarty->register_function("cast_content", "cast_content"); > > Then, the Smarty.class.php file : > > var $custom_funcs = array( > 'html_options' => 'smarty_func_html_options', > 'html_select_date' => 'smarty_func_html_select_date', > 'html_select_time' => 'smarty_func_html_select_time', > 'math' => 'smarty_func_math', > 'fetch' => 'smarty_func_fetch', > 'counter' => 'smarty_func_counter', > 'assign' => 'smarty_func_assign', > 'popup_init' => 'smarty_func_overlib_init', > 'popup' => 'smarty_func_overlib', > 'assign_debug_info' => 'smarty_func_assign_debug_info', > 'cast_content' => 'smarty_func_cast_content' > ); You only need to do one of these things. Either add the function to $custom_funcs or register it like this: $smarty->register_function("cast_content", "smarty_func_cast_content"); -Andrei Complexity in the mind is not caused by learning; learning is caused by complexity in the mind. -- Steven Pinker

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