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

/**
 * Smarty {image_to_base64} function plugin
 *
 * @param   string  $params     Parameters:
 *                              <ul>
 *                                  <li>path    string  Image path</li>
 *                              </ul>
 * @param   object  &$smarty    The smarty object
 * @return   string
 */
function smarty_function_image_to_base64($params, US_Smarty &$smarty)
{
    if (!isset($params['path'])) {
        return 'F-M';
    } else {
        $path = $params['path'];
        
        if (isset($params['add_fc']) && $params['add_fc']) {
            $path = FCPATH.$path;
        }
            
        return image_to_base64($path);
    }
}

/* End of function.site_url.php */