55 if (isset($_attr[
'assign'])) {
57 $_assign = $_attr[
'assign'];
59 $_name = $_attr[
'name'];
60 if ($compiler->compiles_template_function) {
61 $compiler->called_functions[] = trim($_name,
"'\"");
63 unset($_attr[
'name'], $_attr[
'assign'], $_attr[
'nocache']);
65 if ($compiler->nocache || $compiler->tag_nocache) {
70 $_paramsArray = array();
71 foreach ($_attr as $_key => $_value) {
73 $_paramsArray[] =
"$_key=>$_value";
75 $_paramsArray[] =
"'$_key'=>$_value";
78 if (isset($compiler->template->properties[
'function'][$_name][
'parameter'])) {
79 foreach ($compiler->template->properties[
'function'][$_name][
'parameter'] as $_key => $_value) {
80 if (!isset($_attr[$_key])) {
82 $_paramsArray[] =
"$_key=>$_value";
84 $_paramsArray[] =
"'$_key'=>$_value";
88 }
elseif (isset($compiler->smarty->template_functions[$_name][
'parameter'])) {
89 foreach ($compiler->smarty->template_functions[$_name][
'parameter'] as $_key => $_value) {
90 if (!isset($_attr[$_key])) {
92 $_paramsArray[] =
"$_key=>$_value";
94 $_paramsArray[] =
"'$_key'=>$_value";
100 if (!(strpos($_name,
'$') ===
false)) {
101 $call_cache = $_name;
102 $call_function =
'$tmp = "smarty_template_function_".' . $_name .
'; $tmp';
104 $_name = trim($_name,
"'\"");
105 $call_cache =
"'{$_name}'";
106 $call_function =
'smarty_template_function_' . $_name;
109 $_params =
'array(' . implode(
",", $_paramsArray) .
')';
110 $_hash = str_replace(
'-',
'_', $compiler->template->properties[
'nocache_hash']);
112 if (isset($_assign)) {
113 if ($compiler->template->caching) {
114 $_output =
"<?php ob_start(); Smarty_Internal_Function_Call_Handler::call ({$call_cache},\$_smarty_tpl,{$_params},'{$_hash}',{$_nocache}); \$_smarty_tpl->assign({$_assign}, ob_get_clean());?>\n";
116 $_output =
"<?php ob_start(); {$call_function}(\$_smarty_tpl,{$_params}); \$_smarty_tpl->assign({$_assign}, ob_get_clean());?>\n";
119 if ($compiler->template->caching) {
120 $_output =
"<?php Smarty_Internal_Function_Call_Handler::call ({$call_cache},\$_smarty_tpl,{$_params},'{$_hash}',{$_nocache});?>\n";
122 $_output =
"<?php {$call_function}(\$_smarty_tpl,{$_params});?>\n";
getAttributes($compiler, $attributes)
This function checks if the attributes passed are valid.
if(strlen($date2)== '10') if($type== 'users-by-age'&&a_priv('admin_users', true)) elseif($type== 'forums-count'&&a_priv('admin_content', true)) elseif($type== 'forums-categories'&&a_priv('admin_content', true)) elseif($type== 'users-count'&&a_priv('admin_users', true)) elseif($type== 'product-categories'&&a_priv('admin_products', true)) elseif($type== 'users-by-sex'&&a_priv('admin_users', true)) elseif($type== 'users-by-country'&&a_priv('admin_users', true)) elseif($type== 'sales'&&a_priv('admin_sales', true))
compile($args, $compiler)
Compiles the calls of user defined tags defined by {function}.