function smarty_function_parse_html($params, &$smarty)
{
    global $site, $leht, $template;
    extract($params);
    if (!isset($text)) {
        return;
    }
    $text = add_html_tags($text);
    ### add html-links
    if (isset($name)) {
        # if template variable is set, then assign it:
        $smarty->assign(array($name => $text));
    } else {
        # if no template variable is set then print text out:
        print $text;
    }
}
/**
 * Smarty parse html modifier plugin
 *
 * Type:     modifier<br>
 * Name:     parse_html<br>
 * Purpose:  replace links and mail addresses with html links
 *
 * @author	Saurus <*****@*****.**>
 * @param string
 * @return string
 */
function smarty_modifier_parse_html($string)
{
    return add_html_tags($string);
}