gehe zur Dokumentation dieser Datei
54 $nocacheParam = $compiler->template->caching && ($compiler->tag_nocache || $compiler->nocache);
57 $compiler->suppressNocacheProcessing =
true;
59 $compiler->tag_nocache =
true;
60 $_smarty_tpl = $compiler->template;
66 eval(
'$_name = ' . $_attr[
'name'] .
';');
67 if (isset($_attr[
'assign'])) {
69 $_assign = $_attr[
'assign'];
71 $var = trim($_attr[
'assign'],
"'");
72 if (isset($compiler->template->tpl_vars[$var])) {
73 $compiler->template->tpl_vars[$var]->nocache =
true;
78 if (isset($_attr[
'script'])) {
80 $_function =
"smarty_insert_{$_name}";
81 $_smarty_tpl = $compiler->template;
83 eval(
'$_script = ' . $_attr[
'script'] .
';');
84 if (!isset($compiler->smarty->security_policy) && file_exists($_script)) {
85 $_filepath = $_script;
87 if (isset($compiler->smarty->security_policy)) {
88 $_dir = $compiler->smarty->security_policy->trusted_dir;
90 $_dir = $compiler->smarty->trusted_dir;
93 foreach ((array) $_dir as $_script_dir) {
94 $_script_dir = rtrim($_script_dir,
'/\\') . DS;
95 if (file_exists($_script_dir . $_script)) {
96 $_filepath = $_script_dir . $_script;
102 if ($_filepath ==
false) {
103 $compiler->trigger_template_error(
"{insert} missing script file '{$_script}'", $compiler->lex->taglineno);
106 $_output .=
"require_once '{$_filepath}' ;";
107 require_once $_filepath;
108 if (!is_callable($_function)) {
109 $compiler->trigger_template_error(
" {insert} function '{$_function}' is not callable in script file '{$_script}'", $compiler->lex->taglineno);
113 $_function =
"insert_{$_name}";
115 if (!is_callable($_function)) {
117 if (!$_function = $compiler->getPlugin($_name,
'insert')) {
118 $compiler->trigger_template_error(
"{insert} no function or plugin found for '{$_name}'", $compiler->lex->taglineno);
123 unset($_attr[
'name'], $_attr[
'assign'], $_attr[
'script'], $_attr[
'nocache']);
125 $_paramsArray = array();
126 foreach ($_attr as $_key => $_value) {
127 $_paramsArray[] =
"'$_key' => $_value";
129 $_params =
'array(' . implode(
", ", $_paramsArray) .
')';
131 if (isset($_assign)) {
132 if ($_smarty_tpl->caching && !$nocacheParam) {
133 $_output .=
"echo Smarty_Internal_Nocache_Insert::compile ('{$_function}',{$_params}, \$_smarty_tpl, '{$_filepath}',{$_assign});?>";
135 $_output .=
"\$_smarty_tpl->assign({$_assign} , {$_function} ({$_params},\$_smarty_tpl), true);?>";
138 $compiler->has_output =
true;
139 if ($_smarty_tpl->caching && !$nocacheParam) {
140 $_output .=
"echo Smarty_Internal_Nocache_Insert::compile ('{$_function}',{$_params}, \$_smarty_tpl, '{$_filepath}');?>";
142 $_output .=
"echo {$_function}({$_params},\$_smarty_tpl);?>";
Sie sind hier: Home » MyOOS Benutzerhandbuch » Smarty
Korrekturen, Hinweise und Ergänzungen
Bitte scheuen Sie sich nicht und melden Sie, was auf dieser Seite sachlich falsch oder irreführend ist, was ergänzt werden sollte, was fehlt usw. Dazu bitte oben aus dem Menü Seite den Eintrag
Support Forum wählen. Es ist eine kostenlose Anmeldung erforderlich, um Anmerkungen zu posten. Unpassende Postings, Spam usw. werden kommentarlos entfernt.