* Usage: * {js_maxlength textarea=[string] maxlength=[int]} * * TODO would be great if it worked with array arguments * */ //this script may only be included - so its better to die if called directly. if (strpos($_SERVER["SCRIPT_NAME"],basename(__FILE__)) !== FALSE) { //smarty is not there - we need setup require_once('tiki-setup.php'); $smarty->assign('msg',tra("This script cannot be called directly")); $smarty->display("error.tpl"); die; } function smarty_function_js_maxlength($params, &$smarty) { extract($params); // textarea=string maxlength=num echo "\n\n"; } ?>