I did a little Googling, and found this:
It looks like you have to edit the $security_settings
of SMARTY to allow the substr()
function in an if
How you DO that? Not sure.
This appears to be a property of a Smarty_Security class...
Originally Posted by http://www.smarty.net/docs/en/advanced.features.tpl#advanced.features.security
$php_functions is an array of PHP functions that are considered trusted and can be used from within template. To disable access to all PHP functions set $php_functions = null. An empty array ( $php_functions = array() ) will allow all PHP functions. The default is array('isset', 'empty', 'count', 'sizeof', 'in_array', 'is_array','time','nl2br').
Somehow you need to add 'substr' to that list.