<?php
/**
 * Smarty plugin
 *
 * @category Smarty
 * @license /_licenses/untermStrich/agb_normal.pdf
 * @author Christian Koller
 * @copyright 2009 untermStrich
 * @package Smarty
 * @subpackage plugins
 * @version $Id$
*/

/**
 * Smarty {img_html} function plugin
 *
 * @param   string  $params     Parameters:
 *                              <ul>
 *                                  <li>uri     string      The image uri - e.g.: 'section/image id'</li>
 *                                  <li>class   string      Optional A class to add</li>
 *                              </ul>
 * @param   object  &$smarty    The smarty object
 * @return  string
 */
function smarty_function_img_html($params, US_Smarty &$smarty)
{
    if (isset($params['class'])) {
        return img_html($params['uri'], $params['class']);
    } else {
        return img_html($params['uri']);
    }
}

/* End of function.img_html.php */