source: trunk/plugins/ImageManager/config.inc.php @ 93

Last change on this file since 93 was 93, checked in by yermol, 14 years ago

turn off debugging trace messages

File size: 6.9 KB
Line 
1<?
2/**
3 * Image Manager configuration file.
4 * @author $Author: Wei Zhuo $
5 * @version $Id: config.inc.php 27 2004-04-01 08:31:57Z Wei Zhuo $
6 * @package ImageManager
7 *
8 * @todo change all these config values to defines()
9 */
10
11// REVISION HISTORY:
12//
13// 2005-03-20 Yermo Lamers (www.formvista.com):
14//      . unified backend.
15// . created a set of defaults that make sense for bundling with Xinha.
16
17// -------------------------------------------------------------------------
18
19/**
20* Default backend URL
21*
22* URL to use for unified backend.
23*
24* The ?__plugin=ImageManager& is required.
25*/
26
27$IMConfig['backend_url'] = "backend.php?__plugin=ImageManager&";
28
29/**
30* Backend Installation Directory
31*
32* location of backend install; these are used to link to css and js
33* assets because we may have the front end installed in a different
34* directory than the backend. (i.e. nothing assumes that the frontend
35* and the backend are in the same directory)
36*/
37
38$IMConfig['base_dir'] = getcwd();
39$IMConfig['base_url'] = '';
40
41// ------------------------------------------------------------
42
43/**
44* Path to directory containing images.
45*
46* File system path to the directory you want to manage the images
47* for multiple user systems, set it dynamically.
48*
49* NOTE: This directory requires write access by PHP. That is,
50* PHP must be able to create files in this directory.
51* Able to create directories is nice, but not necessary.
52*
53* CHANGE THIS: for out-of-the-box demo purposes we're setting this to ./demo_images
54* which has some graphics in it.
55*/
56
57// $IMConfig['images_dir'] = "/some/path/to/images/directory;
58
59$IMConfig['images_dir'] = "demo_images";
60
61// -------------------------------------------------------------------------
62
63/**
64* URL of directory containing images.
65*
66* The URL to the above path, the web browser needs to be able to see it.
67* It can be protected via .htaccess on apache or directory permissions on IIS,
68* check you web server documentation for futher information on directory protection
69* If this directory needs to be publicly accessiable, remove scripting capabilities
70* for this directory (i.e. disable PHP, Perl, CGI). We only want to store assets
71* in this directory and its subdirectories.
72*
73* CHANGE THIS: You need to change this to match the url where you have Xinha
74* installed. If the images show up blank chances are this is not set correctly.
75*/
76
77// $IMConfig['images_url'] = "/url/to/above";
78
79// try to figure out the URL of the sample images directory. For your installation
80// you will probably want to keep images in another directory.
81
82$IMConfig['images_url'] = str_replace( "backend.php", "", $_SERVER["PHP_SELF"] ) . "demo_images";
83
84// -------------------------------------------------------------------------
85
86/**
87* PHP Safe Mode?
88*
89* Possible values: true, false
90*
91* TRUE - If PHP on the web server is in safe mode, set this to true.
92* SAFE MODE restrictions: directory creation will not be possible,
93* only the GD library can be used, other libraries require
94* Safe Mode to be off.
95*
96* FALSE - Set to false if PHP on the web server is not in safe mode.
97*/
98
99$IMConfig['safe_mode'] = false;
100
101// -------------------------------------------------------------------------
102
103/**
104* Image Library to use.
105*
106* Possible values: 'GD', 'IM', or 'NetPBM'
107*
108* The image manipulation library to use, either GD or ImageMagick or NetPBM.
109* If you have safe mode ON, or don't have the binaries to other packages,
110* your choice is 'GD' only. Other packages require Safe Mode to be off.
111*
112* DEFAULT: GD is probably the most likely to be available.
113*/
114
115define('IMAGE_CLASS', 'GD');
116
117// -------------------------------------------------------------------------
118
119/**
120* NetPBM or IM binary path.
121*
122* After defining which library to use, if it is NetPBM or IM, you need to
123* specify where the binary for the selected library are. And of course
124* your server and PHP must be able to execute them (i.e. safe mode is OFF).
125* GD does not require the following definition.
126*/
127
128define('IMAGE_TRANSFORM_LIB_PATH', 'C:/"Program Files"/ImageMagick-5.5.7-Q16/');
129
130// -------------------------------------------------------------------------
131//                OPTIONAL SETTINGS
132// -------------------------------------------------------------------------
133
134/**
135* Thumbnail prefix
136*
137* The prefix for thumbnail files, something like .thumb will do. The
138* thumbnails files will be named as "prefix_imagefile.ext", that is,
139*  prefix + orginal filename.
140*/
141
142$IMConfig['thumbnail_prefix'] = '.';
143
144// -------------------------------------------------------------------------
145
146/**
147* Thumbnail Directory
148*
149* Thumbnail can also be stored in a directory, this directory
150* will be created by PHP. If PHP is in safe mode, this parameter
151*  is ignored, you can not create directories.
152*
153*  If you do not want to store thumbnails in a directory, set this
154*  to false or empty string '';
155*/
156
157$IMConfig['thumbnail_dir'] = '.thumbs';
158
159// -------------------------------------------------------------------------
160
161/**
162* Allow New Directories
163*
164*
165* Possible values: true, false
166*
167* TRUE -  Allow the user to create new sub-directories in the
168*        $IMConfig['base_dir'].
169*
170* FALSE - No directory creation.
171*
172* NOTE: If $IMConfig['safe_mode'] = true, this parameter
173*     is ignored, you can not create directories
174*
175* DEFAULT: for demo purposes we turn this off.
176*/
177
178$IMConfig['allow_new_dir'] = true;
179
180// -------------------------------------------------------------------------
181
182/**
183* Allow Uploads
184*
185*  Possible values: true, false
186*
187*  TRUE - Allow the user to upload files.
188*
189*  FALSE - No uploading allowed.
190*
191* DEFAULT: for demo purposes we turn this off.
192*/
193
194$IMConfig['allow_upload'] = true;
195
196// -------------------------------------------------------------------------
197
198/**
199* Validate Images
200*
201* Possible values: true, false
202*
203* TRUE - If set to true, uploaded files will be validated based on the
204*        function getImageSize, if we can get the image dimensions then
205*        I guess this should be a valid image. Otherwise the file will be rejected.
206*
207* FALSE - All uploaded files will be processed.
208*
209* NOTE: If uploading is not allowed, this parameter is ignored.
210*/
211
212$IMConfig['validate_images'] = true;
213
214// -------------------------------------------------------------------------
215
216/**
217* Default Thumnail.
218*
219* The default thumbnail if the thumbnails can not be created, either
220* due to error or bad image file.
221*/
222
223$IMConfig['default_thumbnail'] = 'img/default.gif';
224
225// -------------------------------------------------------------------------
226
227/**
228*  Thumbnail dimensions.
229*/
230
231$IMConfig['thumbnail_width'] = 96;
232$IMConfig['thumbnail_height'] = 96;
233
234// -------------------------------------------------------------------------
235
236/**
237* Editor Temporary File Prefix.
238*
239* Image Editor temporary filename prefix.
240*/
241
242$IMConfig['tmp_prefix'] = '.editor_';
243
244
245define( "IM_CONFIG_LOADED", "yes" );
246
247// bring in the debugging library
248
249include_once( "ddt.php" );
250
251// uncomment to send debug messages to a local file
252// _setDebugLog( "/tmp/debug_log.txt" );
253
254// turn debugging on everywhere.
255// _ddtOn();
256
257// END
258
259?>
Note: See TracBrowser for help on using the repository browser.