[ Index ]
 

Code source de CMS made simple 1.0.5

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

title

Body

[fermer]

/lib/filemanager/ImageManager/ -> config.inc.php (source)

   1  <?php
   2  /**
   3   * Image Manager configuration file.
   4   * @author $Author: Wei Zhuo $
   5   * @version $Id: config.inc.php 3403 2006-08-28 14:42:36Z dittmann $
   6   * @package ImageManager
   7   *
   8   * Updated by Thijs (thijs@contemplated) to work with CMS made easy
   9   * File basicly functions as a stub to facilitate future upgrading
  10   */
  11  
  12  global $gCms;
  13  $config =& $gCms->GetConfig();
  14  
  15  /* 
  16   File system path to the directory you want to manage the images
  17   for multiple user systems, set it dynamically.
  18  
  19   NOTE: This directory requires write access by PHP. That is, 
  20         PHP must be able to create files in this directory.
  21         Able to create directories is nice, but not necessary.
  22  */
  23  $IMConfig['base_dir'] = $config["image_uploads_path"];
  24  
  25  /*
  26   The URL to the above path, the web browser needs to be able to see it.
  27   It can be protected via .htaccess on apache or directory permissions on IIS,
  28   check you web server documentation for futher information on directory protection
  29   If this directory needs to be publicly accessiable, remove scripting capabilities
  30   for this directory (i.e. disable PHP, Perl, CGI). We only want to store assets
  31   in this directory and its subdirectories.
  32  */
  33  $IMConfig['base_url'] = $config["image_uploads_url"];
  34  
  35  /*
  36    Possible values: true, false
  37  
  38    TRUE - If PHP on the web server is in safe mode, set this to true.
  39           SAFE MODE restrictions: directory creation will not be possible,
  40           only the GD library can be used, other libraries require
  41           Safe Mode to be off.
  42  
  43    FALSE - Set to false if PHP on the web server is not in safe mode.
  44  */
  45  $IMConfig['safe_mode'] = false;
  46  
  47  /* 
  48   Possible values: 'GD', 'IM', or 'NetPBM'
  49  
  50   The image manipulation library to use, either GD or ImageMagick or NetPBM.
  51   If you have safe mode ON, or don't have the binaries to other packages, 
  52   your choice is 'GD' only. Other packages require Safe Mode to be off.
  53  */
  54  define('IMAGE_CLASS', $config["image_manipulation_prog"]);
  55  
  56  
  57  /*
  58   After defining which library to use, if it is NetPBM or IM, you need to
  59   specify where the binary for the selected library are. And of course
  60   your server and PHP must be able to execute them (i.e. safe mode is OFF).
  61   GD does not require the following definition.
  62  */
  63  define('IMAGE_TRANSFORM_LIB_PATH', $config["image_transform_lib_path"]);
  64  
  65  
  66  /* ==============  OPTIONAL SETTINGS ============== */
  67  
  68  
  69  /*
  70    The prefix for thumbnail files, something like .thumb will do. The
  71    thumbnails files will be named as "prefix_imagefile.ext", that is,
  72    prefix + orginal filename.
  73  */
  74  $IMConfig['thumbnail_prefix'] = 'thumb_';
  75  
  76  /*
  77    Thumbnail can also be stored in a directory, this directory
  78    will be created by PHP. If PHP is in safe mode, this parameter
  79    is ignored, you can not create directories. 
  80  
  81    If you do not want to store thumbnails in a directory, set this
  82    to false or empty string '';
  83    
  84    NOTE this is relative to the $IMConfig['base_dir']!
  85  */
  86  $IMConfig['thumbnail_dir'] = '';
  87  
  88  /*
  89    Possible values: true, false
  90  
  91   TRUE -  Allow the user to create new sub-directories in the
  92           $IMConfig['base_dir'].
  93  
  94   FALSE - No directory creation.
  95  
  96   NOTE: If $IMConfig['safe_mode'] = true, this parameter
  97         is ignored, you can not create directories
  98  */
  99  $IMConfig['allow_new_dir'] = true;
 100  
 101  /*
 102    Possible values: true, false
 103  
 104    TRUE - Allow the user to upload files.
 105  
 106    FALSE - No uploading allowed.
 107  */
 108  $IMConfig['allow_upload'] = true;
 109  
 110  /*
 111   Possible values: true, false
 112  
 113   TRUE - If set to true, uploaded files will be validated based on the 
 114          function getImageSize, if we can get the image dimensions then 
 115          I guess this should be a valid image. Otherwise the file will be rejected.
 116  
 117   FALSE - All uploaded files will be processed.
 118  
 119   NOTE: If uploading is not allowed, this parameter is ignored.
 120  */
 121  $IMConfig['validate_images'] = true;
 122  
 123  /*
 124   The default thumbnail if the thumbnails can not be created, either
 125   due to error or bad image file.
 126  */
 127  $IMConfig['default_thumbnail'] = 'img/default.gif';
 128  
 129  /*
 130    Thumbnail dimensions.
 131  */
 132  $IMConfig['thumbnail_width'] = 96;
 133  $IMConfig['thumbnail_height'] = 96;
 134  
 135  /*
 136    Image Editor temporary filename prefix.
 137  */
 138  $IMConfig['tmp_prefix'] = 'editor_';
 139  ?>


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