_get_plugin_filepath('shared', 'escape_special_chars'); require_once $smarty->_get_plugin_filepath('modifier', 'strip_tags'); require_once $smarty->_get_plugin_filepath('modifier', 'strip'); require_once $smarty->_get_plugin_filepath('modifier', 'truncate'); $name = ''; $width = 0; $height = 0; $method = 'inner'; $alt = ''; $alt_truncate = 80; $title = ''; $title_truncate = 120; $prefix = ''; $suffix = ''; $extra = ''; $base_url = $smarty->get_template_vars('BASE_URL_LANGUAGE'); foreach ($params as $key => $val) { switch($key) { case 'name': case 'file': case 'src': $name = $val; break; case 'height': case 'width': case 'method': case 'prefix': case 'suffix': $$key = $val; break; case 'alt_truncate': case 'title_truncate': break; case 'alt': case 'title': $val = smarty_modifier_strip_tags($val); $val = smarty_modifier_strip($val); $val = trim($val); $length = ${$key . '_truncate'}; $val = smarty_modifier_truncate($val, $length); $$key = smarty_function_escape_special_chars($val); break; case 'link': case 'href': $prefix = ''; $suffix = ''; break; default: $extra .= $key . '="' . smarty_function_escape_special_chars($val) . '" '; break; } } $image = Qs_ImageFs::getFullAttribs($name, $width, $height, $method); if ($base_url) { $image['src'] = $base_url . '/' . $image['src']; } $html = $prefix . '' . $suffix; return $html; }