_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 = '';
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;
}
}
$name = Qs_ImageFs::getFull($name, $width, $height, $method);
$html = $prefix . '' . $suffix;
return $html;
}