' <- optional, default ''
* suffix = '' <- optional, default ''
* href = 'http://www.adaptainc.com' <- optional, default '', aliases: 'link'
*
* customField1 = 'customValue1' <- optional
* customField2 = 'customValue2' <- optional
* ...
* customFieldN = 'customValueN' <- optional
* }
* @deprecated
*/
function smarty_function_html_image_fs_full(array $params, Smarty $smarty)
{
die('smarty_function_html_image_fs_full deprecated');
require_once $smarty->_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;
}