properties['tpl_function']['param'][$_name]; if (is_file($funcParam['compiled_filepath'])) { // read compiled file $code = file_get_contents($funcParam['compiled_filepath']); // grab template function if (preg_match("/\/\* {$_function} \*\/([\S\s]*?)\/\*\/ {$_function} \*\//", $code, $match)) { $code = "\n"; $code .= $match[0]; $code .= "?>\n"; unset($match); $output = ''; // make PHP function known eval($code); if (function_exists($_function)) { // call template function $_function ($_smarty_tpl, $_params); // search cache file template $tplPtr = $_smarty_tpl; while (!isset($tplPtr->cached) && isset($tplPtr->parent)) { $tplPtr = $tplPtr->parent; } // add template function code to cache file if (isset($tplPtr->cached)) { $cache = $tplPtr->cached; $content = $cache->read($tplPtr); if ($content) { $cache->write($tplPtr, $content . "