source: spip-zone/_plugins_/spip_fckeditor/spip_fck/plugins/ImageManager/config.inc.php @ 30253

Last change on this file since 30253 was 30253, checked in by gilles.vincent@…, 12 years ago

[30252] suite : split est deprecie en 5.3.0

File size: 7.3 KB
Line 
1<?php
2/**
3 * Image Manager configuration file.
4 * @author Wei Zhuo
5 * @author Paul Moers <mail@saulmade.nl> - watermarking and replace code + several small enhancements <http://fckplugins.saulmade.nl>
6 * @version $Id: config.inc.php,v 1.5 2007/03/17 21:22:13 thierrybo Exp $
7 * @package ImageManager
8 */
9
10
11/*
12 File system path to the directory you want to manage the images
13 for multiple user systems, set it dynamically.
14
15 NOTE: This directory requires write access by PHP. That is,
16       PHP must be able to create files in this directory.
17           Able to create directories is nice, but not necessary.
18*/
19//+++ Modif F. SAURET +++++++++++++++++++++++++++++++++++++++++++++++++++++++
20//$IMConfig['base_dir'] = '/var/www/FCKeditor/images/';
21$dir_relatif_array = explode('/', $_SERVER["PHP_SELF"]);
22  $i = 0;
23  $cheminSpip="";
24  while($dir_relatif_array[$i] != 'spip_fck') 
25    {
26        $i++;
27    }
28   for ($c=0;$c<$i-2;$c++)
29   {
30       $cheminSpip .= $dir_relatif_array[$c]."/";
31   } 
32$IMConfig['base_dir'] = $_SERVER["DOCUMENT_ROOT"].$cheminSpip.'IMG';
33
34//--- Fin modif --------------------------------------------------------------
35
36/*
37 The URL to the above path, the web browser needs to be able to see it.
38 It can be protected via .htaccess on apache or directory permissions on IIS,
39 check you web server documentation for futher information on directory protection
40 If this directory needs to be publicly accessiable, remove scripting capabilities
41 for this directory (i.e. disable PHP, Perl, CGI). We only want to store assets
42 in this directory and its subdirectories.
43*/
44//+++ Modif F. SAURET +++++++++++++++++++++++++++++++++++++++++++++++++++++++
45//$IMConfig['base_url'] = 'http://www.saulmade.nl/FCKeditor/images/';
46$IMConfig['base_url'] = 'http://'.$_SERVER['REMOTE_ADDR'].$cheminSpip. 'IMG';
47//--- Fin modif --------------------------------------------------------------
48
49$IMConfig['server_name'] = $_SERVER['SERVER_NAME'];
50
51/*
52 demo - when true, no saving is allowed
53*/
54//+++ Modif T.Bothorel+++++++++++++++++++++++++++++++++++++++++++++++++++++++
55//$IMConfig['demo'] = true;
56$IMConfig['demo'] = false;
57//--- Fin modif --------------------------------------------------------------
58
59
60/*
61
62  Possible values: true, false
63
64  TRUE - If PHP on the web server is in safe mode, set this to true.
65         SAFE MODE restrictions: directory creation will not be possible,
66                 only the GD library can be used, other libraries require
67                 Safe Mode to be off.
68
69  FALSE - Set to false if PHP on the web server is not in safe mode.
70*/
71$IMConfig['safe_mode'] = false;
72//+++ Modif T.Bothorel+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
73// Ajout détection automatique du safe_mode
74if (ini_get ('safe_mode')) {
75    $IMConfig['safe_mode'] = true;
76}
77//--- Fin modif ---------------------------------------------------------------
78
79/*
80 Possible values: 'GD', 'IM', or 'NetPBM'
81
82 The image manipulation library to use, either GD or ImageMagick or NetPBM.
83 If you have safe mode ON, or don't have the binaries to other packages,
84 your choice is 'GD' only. Other packages require Safe Mode to be off.
85*/
86//+++ Modif F. SAURET+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
87define('IMAGE_CLASS', 'GD');
88// Changer ici pour le type de vignettes voir si récupérable par spip
89//--- Fin modif ---------------------------------------------------------------
90
91
92/*
93 After defining which library to use, if it is NetPBM or IM, you need to
94 specify where the binary for the selected library are. And of course
95 your server and PHP must be able to execute them (i.e. safe mode is OFF).
96 GD does not require the following definition.
97*/
98//+++ Modif F. SAURET+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
99//define('IMAGE_TRANSFORM_LIB_PATH', '/ext/imagemagick/bin/');
100
101//--- Fin modif ---------------------------------------------------------------
102
103
104/* ==============  OPTIONAL SETTINGS ============== */
105
106
107/*
108  The prefix for thumbnail files, something like .thumb will do. The
109  thumbnails files will be named as "prefix_imagefile.ext", that is,
110  prefix + orginal filename.
111*/
112$IMConfig['thumbnail_prefix'] = '.';
113
114/*
115  Thumbnail can also be stored in a directory, this directory
116  will be created by PHP. If PHP is in safe mode, this parameter
117  is ignored, you can not create directories.
118
119  If you do not want to store thumbnails in a directory, set this
120  to false or empty string '';
121*/
122$IMConfig['thumbnail_dir'] = '.thumbs';
123
124/*
125  Possible values: true, false
126
127 TRUE -  Allow the user to create new sub-directories in the
128         $IMConfig['base_dir'].
129
130 FALSE - No directory creation.
131
132 NOTE: If $IMConfig['safe_mode'] = true, this parameter
133       is ignored, you can not create directories
134*/
135
136$IMConfig['allow_new_dir'] = false;
137
138
139/*
140  Possible values: true, false
141
142  TRUE - Allow the user to upload files.
143
144  FALSE - No uploading allowed.
145*/
146$IMConfig['allow_upload'] = true;
147
148/*
149  Possible values: true, false
150
151  TRUE - Allow the replacement of the image with a newly uploaded image in the editor dialog.
152
153  FALSE - No replacing allowed.
154*/
155$IMConfig['allow_replace'] = false;
156
157
158/*
159  Possible values: true, false
160
161  TRUE - Allow the deletion of images
162
163  FALSE - No deleting allowed
164*/
165$IMConfig['allow_delete'] = false;
166
167/*
168  Possible values: true, false
169
170  TRUE - Allow the user to enter a new filename for saving the edited image.
171
172  FALSE - Overwrite
173*/
174$IMConfig['allow_newFileName'] = true;
175
176/*
177  Possible values: true, false
178  Only applies when the the user can enter a new filename (The baove settig = 'allow_newFileName' true)
179
180  TRUE - Overwrite file of entered filename, if file already exist.
181
182  FALSE - Save to variant of entered filename, if file already exist.
183*/
184$IMConfig['allow_overwrite'] = false;
185
186/*
187  Specify the paths of the watermarks to use (relative to $IMConfig['base_dir']).
188  Specifying none will hide watermarking functionality.
189*/
190$IMConfig['watermarks'] = array ("imageManager.png");
191
192/*
193        To limit the width and height for uploaded files, specify the maximum pixeldimensions.
194        Setting either zero or empty will allow any size.
195*/
196//+++ Modif T.Bothorel+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
197// Limitation n'a pas de sens car l'upload par FCKeditor n'en tient pas compte
198
199//$IMConfig['maxWidth'] = 333;
200//$IMConfig['maxHeight'] = 333;
201$IMConfig['maxWidth'] = 0;
202$IMConfig['maxHeight'] = 0;
203//--- Fin modif ---------------------------------------------------------------
204
205/*
206 Possible values: true, false
207
208 TRUE - If set to true, uploaded files will be validated based on the
209        function getImageSize, if we can get the image dimensions then
210        I guess this should be a valid image. Otherwise the file will be rejected.
211
212 FALSE - All uploaded files will be processed.
213
214 NOTE: If uploading is not allowed, this parameter is ignored.
215*/
216//+++ Modif T.Bothorel+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
217// de nombreuse images valides n'ont pas de thumbnail créé si true
218
219//$IMConfig['validate_images'] = true;
220$IMConfig['validate_images'] = false;
221//--- Fin modif ---------------------------------------------------------------
222
223/*
224 The default thumbnail if the thumbnails can not be created, either
225 due to error or bad image file.
226*/
227$IMConfig['default_thumbnail'] = 'img/default.gif';
228
229/*
230  Thumbnail dimensions.
231*/
232$IMConfig['thumbnail_width'] = 96;
233$IMConfig['thumbnail_height'] = 96;
234
235/*
236  Image Editor temporary filename prefix.
237*/
238$IMConfig['tmp_prefix'] = '.editor_';
239?>
Note: See TracBrowser for help on using the repository browser.