source: branches/unified_backend/plugins/ImageManager/config.inc.php @ 121

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

htmlarea.js

. more debugging messages added.
. added HTMLArea.Config.linkReplacementMode which can be either

fullyqualified (the old default behavior) or absolute.


When set to fullyqualified all absolute links (e.g. /somepath) will be changed to fullyqualified URLS (e.g. http://yoursite/somepth).


When set to absolute, all fullyqualified urls back to the current site
will be changed to absolute (e.g. httpyoursite/somepath to /somepath)
making the Xinha generated content portable between sites.


( see HTMLArea.prototype.outwardHtml() )


. bugfix - if plugin .js file has a parse error htmlarea will only try to load

it a configurable number of times before popping up an error message.


backends/backend.php

. initial unified backend created. Requests to this backend are routed

to the corresponding plugin specific backend.php file.


backends/backend_conf.php

. a central server side configuration file has been created for the use

of plugin serverside code.

. all backends hooked into this scheme must include the central config file.

ImageManager?

. modified the config to allow overriding default values.
. default image directory is now xinha/examples/images
. added debugging trace messages which are tagged with the ImageManager? name.
. now uses unified backend.

Linker

. includes central config.
. default directory is now the xinha/examples directory (to avoid scan.php security

problem)

. added debugging trace messages which are tagged with the Linker name.
. links selected from the tree are now displayed in absolute instead of fully qualified

fashion.

. on edit the link that was previously selected is highlighted.
. on edit the selected link is scrolled to if it's outside the viewable area.
. if scan.php returns some kind of error or invalid javascript Linker now pops up

a nice descriptive error message.


. bugfix - same pattern as in loading plugins. If there is some error in loading the directory listing Linker will only attempt it a few times before giving up and

displaying a nice error.


dTree.js

. added clear_s() method to clear the selection
. added getNodeElement() method to return the <a ..> element for a given node.

File size: 7.7 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// 2005-05-01 YmL:
18//      . modified for master unified backend.
19// . config values can be overridden by the calling page (makes integration
20//        easier.
21// -------------------------------------------------------------------------
22
23/**
24* Xinha PHP backend config file.
25*
26* probably already included. We assume we are in the xinha/plugins/ImageManager
27* directory
28*/
29
30if ( ! defined( "XINHA_INSTALL_ROOT" ) )
31        {
32        include_once( "../../backends/backend_conf.php" );
33        }
34
35/**
36* Default backend URL
37*
38* URL to use for unified backend.
39*
40* The ?__plugin=ImageManager& is required.
41*/
42
43if ( @$IMConfig['backend_url' ] == NULL )
44        {
45        $IMConfig['backend_url'] = XINHA_INSTALL_URL . "/backends/backend.php?__plugin=ImageManager&";
46        }
47
48/**
49* Backend Installation Directory
50*
51* location of backend install; these are used to link to css and js
52* assets because we may have the front end installed in a different
53* directory than the backend. (i.e. nothing assumes that the frontend
54* and the backend are in the same directory)
55*/
56
57if ( @$IMConfig[ 'base_dir' ] == NULL )
58        {
59        $IMConfig['base_dir'] = XINHA_INSTALL_ROOT . "/plugins/ImageManager/";
60        $IMConfig['base_url'] = XINHA_INSTALL_URL . "/plugins/ImageManager/";
61        }
62
63// ------------------------------------------------------------
64
65/**
66* Path to directory containing images.
67*
68* File system path to the directory you want to manage the images
69* for multiple user systems, set it dynamically.
70*
71* NOTE: This directory requires write access by PHP. That is,
72* PHP must be able to create files in this directory.
73* Able to create directories is nice, but not necessary.
74*
75* For out-of-the-box demo purposes we're setting this to
76* xinha/examples/images which has some graphics in it.
77*/
78
79// $IMConfig['images_dir'] = "/some/path/to/images/directory;
80
81if ( @$IMConfig['images_dir'] == NULL )
82        {
83        $IMConfig['images_dir'] = XINHA_INSTALL_ROOT . "/examples/images";
84        }
85
86// -------------------------------------------------------------------------
87
88/**
89* URL of directory containing images.
90*
91* The URL to the above path, the web browser needs to be able to see it.
92* It can be protected via .htaccess on apache or directory permissions on IIS,
93* check you web server documentation for futher information on directory protection
94* If this directory needs to be publicly accessiable, remove scripting capabilities
95* for this directory (i.e. disable PHP, Perl, CGI). We only want to store assets
96* in this directory and its subdirectories.
97*/
98
99if ( @$IMConfig['images_url'] == NULL )
100        {
101        $IMConfig['images_url'] = XINHA_INSTALL_URL . "/examples/images";
102        }
103
104// -------------------------------------------------------------------------
105
106/**
107* PHP Safe Mode?
108*
109* Possible values: true, false
110*
111* TRUE - If PHP on the web server is in safe mode, set this to true.
112* SAFE MODE restrictions: directory creation will not be possible,
113* only the GD library can be used, other libraries require
114* Safe Mode to be off.
115*
116* FALSE - Set to false if PHP on the web server is not in safe mode.
117*/
118
119if ( @$IMConfig['safe_mode'] == NULL )
120        {
121        $IMConfig['safe_mode'] = false;
122        }
123
124// -------------------------------------------------------------------------
125
126/**
127* Image Library to use.
128*
129* Possible values: 'GD', 'IM', or 'NetPBM'
130*
131* The image manipulation library to use, either GD or ImageMagick or NetPBM.
132* If you have safe mode ON, or don't have the binaries to other packages,
133* your choice is 'GD' only. Other packages require Safe Mode to be off.
134*
135* DEFAULT: GD is probably the most likely to be available.
136*/
137
138define('IMAGE_CLASS', 'GD');
139
140// -------------------------------------------------------------------------
141
142/**
143* NetPBM or IM binary path.
144*
145* After defining which library to use, if it is NetPBM or IM, you need to
146* specify where the binary for the selected library are. And of course
147* your server and PHP must be able to execute them (i.e. safe mode is OFF).
148* GD does not require the following definition.
149*/
150
151define('IMAGE_TRANSFORM_LIB_PATH', 'C:/"Program Files"/ImageMagick-5.5.7-Q16/');
152
153// -------------------------------------------------------------------------
154//                OPTIONAL SETTINGS
155// -------------------------------------------------------------------------
156
157/**
158* Thumbnail prefix
159*
160* The prefix for thumbnail files, something like .thumb will do. The
161* thumbnails files will be named as "prefix_imagefile.ext", that is,
162*  prefix + orginal filename.
163*/
164
165$IMConfig['thumbnail_prefix'] = '.';
166
167// -------------------------------------------------------------------------
168
169/**
170* Thumbnail Directory
171*
172* Thumbnail can also be stored in a directory, this directory
173* will be created by PHP. If PHP is in safe mode, this parameter
174*  is ignored, you can not create directories.
175*
176*  If you do not want to store thumbnails in a directory, set this
177*  to false or empty string '';
178*/
179
180if ( @$IMConfig[ 'thumbnail_dir' ] == NULL )
181        {
182        $IMConfig['thumbnail_dir'] = '.thumbs';
183        }
184
185// -------------------------------------------------------------------------
186
187/**
188* Allow New Directories
189*
190*
191* Possible values: true, false
192*
193* TRUE -  Allow the user to create new sub-directories in the
194*        $IMConfig['base_dir'].
195*
196* FALSE - No directory creation.
197*
198* NOTE: If $IMConfig['safe_mode'] = true, this parameter
199*     is ignored, you can not create directories
200*
201* DEFAULT: for demo purposes we turn this off.
202*/
203
204if ( @$IMConfig[ 'allow_new_dir' ] === NULL )
205        {
206        $IMConfig['allow_new_dir'] = false;
207        }
208
209// -------------------------------------------------------------------------
210
211/**
212* Allow Uploads
213*
214*  Possible values: true, false
215*
216*  TRUE - Allow the user to upload files.
217*
218*  FALSE - No uploading allowed.
219*
220* DEFAULT: for demo purposes we turn this off.
221*/
222
223if ( @$IMConfig['allow_upload'] === NULL )
224        {
225        $IMConfig['allow_upload'] = false;
226        }
227
228// -------------------------------------------------------------------------
229
230/**
231* Validate Images
232*
233* Possible values: true, false
234*
235* TRUE - If set to true, uploaded files will be validated based on the
236*        function getImageSize, if we can get the image dimensions then
237*        I guess this should be a valid image. Otherwise the file will be rejected.
238*
239* FALSE - All uploaded files will be processed.
240*
241* NOTE: If uploading is not allowed, this parameter is ignored.
242*/
243
244if ( @$IMConfig[ 'validate_images' ] === NULL )
245        {
246        $IMConfig['validate_images'] = true;
247        }
248
249// -------------------------------------------------------------------------
250
251/**
252* Default Thumnail.
253*
254* The default thumbnail if the thumbnails can not be created, either
255* due to error or bad image file.
256*/
257
258if ( @$IMConfig['default_thumbnail'] == NULL )
259        {
260        $IMConfig['default_thumbnail'] = 'img/default.gif';
261        }
262
263// -------------------------------------------------------------------------
264
265/**
266*  Thumbnail dimensions.
267*/
268
269if ( @$IMConfig['thumbnail_width'] == NULL )
270        {
271        $IMConfig['thumbnail_width'] = 96;
272        $IMConfig['thumbnail_height'] = 96;
273        }
274
275// -------------------------------------------------------------------------
276
277/**
278* Editor Temporary File Prefix.
279*
280* Image Editor temporary filename prefix.
281*/
282
283if ( @$IMConfig['tmp_prefix'] == NULL )
284        {
285        $IMConfig['tmp_prefix'] = '.editor_';
286        }
287
288// used to verify that the config has been loaded.
289
290define( "IM_CONFIG_LOADED", "yes" );
291
292// bring in the debugging library.
293
294include_once( XINHA_INSTALL_ROOT . "/ddt/ddt.php" );
295
296// uncomment to send debug messages to a local file
297// _setDebugLog( "/tmp/debug_log.txt" );
298
299// uncomment to turn on debugging messages.
300//_ddtOn();
301
302// END
303
304?>
Note: See TracBrowser for help on using the repository browser.