[ Index ]
 

Code source de CMS made simple 1.0.5

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/plugins/ -> function.title.php (source)

   1  <?php
   2  #CMS - CMS Made Simple
   3  #(c)2004 by Ted Kulp (wishy@users.sf.net)
   4  #This project's homepage is: http://cmsmadesimple.sf.net
   5  #
   6  #This program is free software; you can redistribute it and/or modify
   7  #it under the terms of the GNU General Public License as published by
   8  #the Free Software Foundation; either version 2 of the License, or
   9  #(at your option) any later version.
  10  #
  11  #This program is distributed in the hope that it will be useful,
  12  #but WITHOUT ANY WARRANTY; without even the implied warranty of
  13  #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14  #GNU General Public License for more details.
  15  #You should have received a copy of the GNU General Public License
  16  #along with this program; if not, write to the Free Software
  17  #Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  18  
  19  function smarty_cms_function_title($params, &$smarty)
  20  {
  21      global $gCms;
  22      $pageinfo = &$gCms->variables['pageinfo'];
  23      $config = &$gCms->GetConfig();
  24      if (isset($pageinfo) && $pageinfo->content_id == -1)
  25      {
  26          #We've a custom error message...  set a current timestamp
  27          return "404 Error";
  28      }
  29      else
  30      {
  31          $result = cms_htmlentities($pageinfo->content_title);
  32          if (!(isset($config["use_smarty_php_tags"]) && $config["use_smarty_php_tags"] == true))
  33          {
  34              $result = ereg_replace("\{\/?php\}", "", $result);
  35          }
  36          return $result;
  37      }
  38  }
  39  
  40  function smarty_cms_help_function_title() {
  41      ?>
  42      <h3>What does this do?</h3>
  43      <p>Prints the title of the page.</p>
  44      <h3>How do I use it?</h3>
  45      <p>Just insert the tag into your template/page like: <code>{title}</code></p>
  46      <h3>What parameters does it take?</h3>
  47      <p>None at this time.</p>
  48      <?php
  49  }
  50  
  51  function smarty_cms_about_function_title() {
  52      ?>
  53      <p>Author: Ted Kulp&lt;tedkulp@users.sf.net&gt;</p>
  54      <p>Version: 1.0</p>
  55      <p>
  56      Change History:<br/>
  57      None
  58      </p>
  59      <?php
  60  }
  61  ?>


Généré le : Tue Apr 3 18:50:37 2007 par Balluche grâce à PHPXref 0.7