[ Index ]

PHP Cross Reference of Zikula Core 1.3.2

title

Body

[close]

/themes/Atom/plugins/ -> function.id.php (source)

   1  <?php
   2  /**
   3   * Copyright Zikula Foundation 2009 - Zikula Application Framework
   4   *
   5   * This work is contributed to the Zikula Foundation under one or more
   6   * Contributor Agreements and licensed to You under the following license:
   7   *
   8   * @license GNU/LGPLv3 (or at your option, any later version).
   9   * @package Zikula
  10   *
  11   * Please see the NOTICE file distributed with this source code for further
  12   * information regarding copyright and licensing.
  13   */
  14  
  15  /**
  16   * Smarty function to generate a valid atom ID for the feed
  17   *
  18   * Example
  19   *
  20   *   <id>{id}</id>
  21   *
  22   * @return       string the atom ID
  23   */
  24  function smarty_function_id($params, &$smarty)
  25  {
  26      $baseurl = System::getBaseUrl();
  27  
  28      $parts = parse_url($baseurl);
  29  
  30      $starttimestamp = strtotime(System::getVar('startdate'));
  31      $startdate = strftime('%Y-%m-%d', $starttimestamp);
  32  
  33      $sitename = System::getVar('sitename');
  34      $sitename = preg_replace('/[^a-zA-Z0-9-\s]/', '', $sitename);
  35      $sitename = DataUtil::formatForURL($sitename);
  36  
  37      return "tag:{$parts['host']},{$startdate}:{$sitename}";
  38  }


Generated: Mon Feb 20 12:35:30 2012 Cross-referenced by PHPXref 0.7.1