compiler = $compiler; $this->required_attributes = array('value'); $this->optional_attributes = array('assign', 'nocache', 'filter', 'nofilter'); // check and get attributes $_attr = $this->_get_attributes($args); if (isset($_attr['nocache'])) { if ($_attr['nocache'] == 'true') { $this->compiler->tag_nocache = true; } } if (!isset($_attr['filter'])) { $_attr['filter'] = 'null'; } if (isset($_attr['nofilter'])) { if ($_attr['nofilter'] == 'true') { $_attr['filter'] = 'false'; } } if (isset($_attr['assign'])) { // assign output to variable $output = 'assign(' . $_attr['assign'] . ',' . $_attr['value'] . ');?>'; } else { // display value $this->compiler->has_output = true; if (isset($this->compiler->smarty->registered_filters['variable'])) { $output = 'Smarty_Internal_Filter_Handler::runFilter(\'variable\', ' . $_attr['value'] . ',$_smarty_tpl->smarty, $_smarty_tpl, ' . $_attr['filter'] . ')'; } else { $output = $_attr['value']; } if (!isset($_attr['nofilter']) && isset($this->compiler->smarty->default_modifiers)) { foreach ($this->compiler->smarty->default_modifiers as $default_modifier) { $mod_array = explode (':', $default_modifier); $modifier = $mod_array[0]; $mod_array[0] = $output; $output = $this->compiler->compileTag('private_modifier', array('modifier' => $modifier, 'params' => implode(", ", $mod_array))); } } $output = ''; } return $output; } } ?>