Zikula_Template_Plugins
[ class tree: Zikula_Template_Plugins ] [ index: Zikula_Template_Plugins ] [ all elements ]

Source for file function.charset.php

Documentation is available at function.charset.php

  1. <?php
  2. /**
  3.  * Zikula Application Framework
  4.  *
  5.  * @copyright (c) 2004, Zikula Development Team
  6.  * @link http://www.zikula.org
  7.  * @version $Id: function.charset.php 24342 2008-06-06 12:03:14Z markwest $
  8.  * @license GNU/GPL - http://www.gnu.org/copyleft/gpl.html
  9.  * @package Zikula_Template_Plugins
  10.  * @subpackage Functions
  11.  */
  12.  
  13. /**
  14.  * Smarty function to get the site's charset
  15.  *
  16.  * available parameters:
  17.  *  - assign      if set, the language will be assigned to this variable
  18.  *
  19.  * Example
  20.  * <meta http-equiv="Content-Type" content="text/html; charset=<!--[charset]-->">
  21.  *
  22.  * @author   Jörg Napp
  23.  * @since    03. Feb. 04
  24.  * @param    array    $params     All attributes passed to this function from the template
  25.  * @param    object   $smarty     Reference to the Smarty object
  26.  * @return   string   the charset
  27.  */
  28. function smarty_function_charset($params&$smarty)
  29. {
  30.     $return '';
  31.     if (defined('_CHARSET')) {
  32.         $return _CHARSET;
  33.     }
  34.  
  35.     if (isset($params['assign'])) {
  36.         $smarty->assign($params['assign']$return);
  37.     else {
  38.         return $return;
  39.     }
  40. }

Documentation generated on Fri, 18 Jul 2008 21:45:10 +0200 by phpDocumentor 1.4.1