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

Source for file function.id.php

Documentation is available at function.id.php

  1. <?php
  2. /**
  3.  * Zikula Application Framework
  4.  *
  5.  * @copyright (c) 2001, Zikula Development Team
  6.  * @link http://www.zikula.org
  7.  * @version $Id: modifier.modified.php 18169 2006-03-16 02:17:22Z drak $
  8.  * @license GNU/GPL - http://www.gnu.org/copyleft/gpl.html
  9.  *
  10.  * @package Zikula_Themes
  11.  * @subpackage Atom
  12.  */
  13.  
  14. /**
  15.  * Smarty function to generate a valid atom ID for the feed
  16.  *
  17.  * Example
  18.  *
  19.  *   <id><!--[id]--></id>
  20.  *
  21.  * @author       Mark West
  22.  * @since        18 February 2007
  23.  * @return       string the atom ID
  24.  */
  25. function smarty_function_id($params&$smarty)
  26. {
  27.     $baseurl pnGetBaseURL();
  28.  
  29.     $parts parse_url($baseurl);
  30.  
  31.     $starttimestamp strtotime(pnConfigGetVar('startdate'));
  32.     $startdate strftime('%Y-%m-%d'$starttimestamp);
  33.  
  34.     $sitename pnConfigGetVar('sitename');
  35.     $sitename preg_replace('/[^a-zA-Z0-9-\s]/'''$sitename)
  36.     $sitename DataUtil::formatForURL($sitename);
  37.  
  38.     return "tag:{$parts['host']},{$startdate}:{$sitename}";
  39. }

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