[ Index ]
 

Code source de e107 0.7.8

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

title

Body

[fermer]

/e107_handlers/ -> forum_include.php (source)

   1  <?php
   2  /*
   3  + ----------------------------------------------------------------------------+
   4  |     e107 website system
   5  |
   6  |     ©Steve Dunstan 2001-2002
   7  |     http://e107.org
   8  |     jalist@e107.org
   9  |
  10  |     Released under the terms and conditions of the
  11  |     GNU General Public License (http://gnu.org).
  12  |
  13  |     $Source: /cvsroot/e107/e107_0.7/e107_handlers/forum_include.php,v $
  14  |     $Revision: 1.5 $
  15  |     $Date: 2005/12/14 17:37:34 $
  16  |     $Author: sweetas $
  17  +----------------------------------------------------------------------------+
  18  */
  19      
  20  if (!defined('e107_INIT')) { exit; }
  21  
  22  require_once(e_HANDLER.'multilang/pictures.php');
  23      
  24  /**
  25  * @return string path to and filename of forum icon image
  26  *
  27  * @param string $filename  filename of forum image
  28  * @param string $eMLANG_folder if specified, indicates its a multilanguage image being processed and
  29  *       gives the subfolder of the image path to the eMLANG_path() function,
  30  *       default = FALSE
  31  * @param string $eMLANG_pref  if specified, indicates that $filename may be overridden by the
  32  *       $pref with $eMLANG_pref as its key if that pref is TRUE, default = FALSE
  33  *
  34  * @desc checks for the existence of a forum icon image in the themes forum folder and if it is found
  35  *  returns the path and filename of that file, otherwise it returns the path and filename of the
  36  *  default forum icon image in e_IMAGES. The additional $eMLANG args if specfied switch the process
  37  *  to the sister multi-language function eMLANG_path().
  38  *
  39  * @access public
  40  */
  41  function img_path($filename, $eMLANG_folder = FALSE, $eMLANG_pref = FALSE) {
  42      global $pref;
  43      if ($eMLANG_folder) {
  44          if ($eMLANG_pref) {
  45              $filename = $pref[$eMLANG_pref] ? $pref[$eMLANG_pref] :
  46               $filename;
  47          }
  48          $image = eMLANG_path($filename, $eMLANG_folder);
  49      } else {
  50          $image = file_exists(THEME.'forum/'.$filename) ? THEME.'forum/'.$filename : e_IMAGE.'forum/'.$filename;
  51      }
  52      return $image;
  53  }
  54      
  55  if (file_exists(THEME.'forum/forum_icons_template.php')) {
  56      require_once(THEME.'forum/forum_icons_template.php');
  57  } else {
  58      require_once(e_BASE.$THEMES_DIRECTORY.'templates/forum_icons_template.php');
  59  }
  60      
  61  ?>


Généré le : Sun Apr 1 01:23:32 2007 par Balluche grâce à PHPXref 0.7