1 | <?php |
---|
2 | // +-----------------------------------------------------------------------+ |
---|
3 | // | PhpWebGallery - a PHP based picture gallery | |
---|
4 | // | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net | |
---|
5 | // | Copyright (C) 2003-2006 PhpWebGallery Team - http://phpwebgallery.net | |
---|
6 | // +-----------------------------------------------------------------------+ |
---|
7 | // | branch : BSF (Best So Far) |
---|
8 | // | file : $RCSfile$ |
---|
9 | // | last update : $Date: 2006-02-16 00:45:18 +0000 (Thu, 16 Feb 2006) $ |
---|
10 | // | last modifier : $Author: rvelices $ |
---|
11 | // | revision : $Revision: 1044 $ |
---|
12 | // +-----------------------------------------------------------------------+ |
---|
13 | // | This program is free software; you can redistribute it and/or modify | |
---|
14 | // | it under the terms of the GNU General Public License as published by | |
---|
15 | // | the Free Software Foundation | |
---|
16 | // | | |
---|
17 | // | This program is distributed in the hope that it will be useful, but | |
---|
18 | // | WITHOUT ANY WARRANTY; without even the implied warranty of | |
---|
19 | // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
---|
20 | // | General Public License for more details. | |
---|
21 | // | | |
---|
22 | // | You should have received a copy of the GNU General Public License | |
---|
23 | // | along with this program; if not, write to the Free Software | |
---|
24 | // | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | |
---|
25 | // | USA. | |
---|
26 | // +-----------------------------------------------------------------------+ |
---|
27 | |
---|
28 | /** |
---|
29 | * configuration page |
---|
30 | * |
---|
31 | * Set configuration parameters that are not in the table config. In the |
---|
32 | * application, configuration parameters are considered in the same way |
---|
33 | * coming from config table or config_default.inc.php. |
---|
34 | * |
---|
35 | * It is recommended to let config_default.inc.php as provided and to |
---|
36 | * overwrite configuration in your local configuration file |
---|
37 | * config_local.inc.php. See tools/config_local.inc.php as an example. |
---|
38 | * |
---|
39 | * Why having some parameters in config table and others in |
---|
40 | * config_*.inc.php? Modifying config_*.inc.php is a "hard" task for low |
---|
41 | * skilled users, they need a GUI for this : admin/configuration. But only |
---|
42 | * parameters that might be modified by low skilled users are in config |
---|
43 | * table, other parameters are in config_*.inc.php |
---|
44 | */ |
---|
45 | |
---|
46 | // +-----------------------------------------------------------------------+ |
---|
47 | // | misc | |
---|
48 | // +-----------------------------------------------------------------------+ |
---|
49 | |
---|
50 | // order_by : how to change the order of display for images in a category ? |
---|
51 | // |
---|
52 | // There are several fields that can order the display : |
---|
53 | // |
---|
54 | // - date_available : the date of the adding to the gallery |
---|
55 | // - file : the name of the file |
---|
56 | // - id : element identifier |
---|
57 | // - date_creation : date of element creation |
---|
58 | // |
---|
59 | // Once you've chosen which field(s) to use for ordering, you must chose the |
---|
60 | // ascending or descending order for each field. examples : |
---|
61 | // |
---|
62 | // 1. $conf['order_by'] = " order by date_available desc, file asc"; |
---|
63 | // will order pictures by date_available descending & by filename ascending |
---|
64 | // |
---|
65 | // 2. $conf['order_by'] = " order by file asc"; |
---|
66 | // will only order pictures by file ascending without taking into account |
---|
67 | // the date_available |
---|
68 | $conf['order_by'] = ' ORDER BY date_available DESC, file ASC, id ASC'; |
---|
69 | |
---|
70 | // slideshow_period : waiting time in seconds before loading a new page |
---|
71 | // during automated slideshow |
---|
72 | $conf['slideshow_period'] = 4; |
---|
73 | |
---|
74 | // file_ext : file extensions (case sensitive) authorized |
---|
75 | $conf['file_ext'] = array('jpg','JPG','png','PNG','gif','GIF','mpg','zip', |
---|
76 | 'avi','mp3','ogg'); |
---|
77 | |
---|
78 | // picture_ext : file extensions for picture file, must be a subset of |
---|
79 | // file_ext |
---|
80 | $conf['picture_ext'] = array('jpg','JPG','png','PNG','gif','GIF'); |
---|
81 | |
---|
82 | // top_number : number of element to display for "best rated" and "most |
---|
83 | // visited" categories |
---|
84 | $conf['top_number'] = 15; |
---|
85 | |
---|
86 | // anti-flood_time : number of seconds between 2 comments : 0 to disable |
---|
87 | $conf['anti-flood_time'] = 60; |
---|
88 | |
---|
89 | // calendar_datefield : date field of table "images" used for calendar |
---|
90 | // catgory |
---|
91 | $conf['calendar_datefield'] = 'date_creation'; |
---|
92 | |
---|
93 | // newcat_default_commentable : at creation, must a category be commentable |
---|
94 | // or not ? |
---|
95 | $conf['newcat_default_commentable'] = 'true'; |
---|
96 | |
---|
97 | // newcat_default_uploadable : at creation, must a category be uploadable or |
---|
98 | // not ? |
---|
99 | $conf['newcat_default_uploadable'] = 'false'; |
---|
100 | |
---|
101 | // newcat_default_visible : at creation, must a category be visible or not ? |
---|
102 | // Warning : if the parent category is invisible, the category is |
---|
103 | // automatically create invisible. (invisible = locked) |
---|
104 | $conf['newcat_default_visible'] = 'true'; |
---|
105 | |
---|
106 | // newcat_default_status : at creation, must a category be public or private |
---|
107 | // ? Warning : if the parent category is private, the category is |
---|
108 | // automatically create private. |
---|
109 | $conf['newcat_default_status'] = 'public'; |
---|
110 | |
---|
111 | // level_separator : character string used for separating a category level |
---|
112 | // to the sub level. Suggestions : ' / ', ' » ', ' → ', ' - ', |
---|
113 | // ' >' |
---|
114 | $conf['level_separator'] = ' / '; |
---|
115 | |
---|
116 | // paginate_pages_around : on paginate navigation bar, how many pages |
---|
117 | // display before and after the current page ? |
---|
118 | $conf['paginate_pages_around'] = 2; |
---|
119 | |
---|
120 | // tn_width : default width for thumbnails creation |
---|
121 | $conf['tn_width'] = 128; |
---|
122 | |
---|
123 | // tn_height : default height for thumbnails creation |
---|
124 | $conf['tn_height'] = 128; |
---|
125 | |
---|
126 | // show_version : shall the version of PhpWebGallery be displayed at the |
---|
127 | // bottom of each page ? |
---|
128 | $conf['show_version'] = true; |
---|
129 | |
---|
130 | // links : list of external links to add in the menu. An example is the best |
---|
131 | // than a long explanation : |
---|
132 | // |
---|
133 | // $conf['links'] = array( |
---|
134 | // 'http://phpwebgallery.net' => 'PWG website', |
---|
135 | // 'http://forum.phpwebgallery.net' => 'PWG forum', |
---|
136 | // 'http://phpwebgallery.net/doc' => 'PWG wiki' |
---|
137 | // ); |
---|
138 | // |
---|
139 | // If the array is empty, the "Links" box won't be displayed on the main |
---|
140 | // page. |
---|
141 | $conf['links'] = array(); |
---|
142 | |
---|
143 | // show_thumbnail_caption : on thumbnails page, show thumbnail captions ? |
---|
144 | $conf['show_thumbnail_caption'] = true; |
---|
145 | |
---|
146 | // show_picture_name_on_title : on picture presentation page, show picture |
---|
147 | // name ? |
---|
148 | $conf['show_picture_name_on_title'] = true; |
---|
149 | |
---|
150 | // allow_random_representative : do you wish PhpWebGallery to search among |
---|
151 | // categories elements a new representative at each reload ? |
---|
152 | // |
---|
153 | // If false, an element is randomly or manually chosen to represent its |
---|
154 | // category and remains the representative as long as an admin does not |
---|
155 | // change it. |
---|
156 | // |
---|
157 | // Warning : setting this parameter to true is CPU consuming. Each time you |
---|
158 | // change the value of this parameter from false to true, an administrator |
---|
159 | // must update categories informations in screen [Admin > General > |
---|
160 | // Maintenance]. |
---|
161 | $conf['allow_random_representative'] = false; |
---|
162 | |
---|
163 | // allow_html_descriptions : authorize administrators to use HTML in |
---|
164 | // category and element description. |
---|
165 | $conf['allow_html_descriptions'] = true; |
---|
166 | |
---|
167 | // prefix_thumbnail : string before filename. Thumbnail's prefix must only |
---|
168 | // contain characters among : a to z (case insensitive), "-" or "_". |
---|
169 | $conf['prefix_thumbnail'] = 'TN-'; |
---|
170 | |
---|
171 | // users_page: how many users to display in screen |
---|
172 | // Administration>Identification>Users? |
---|
173 | $conf['users_page'] = 20; |
---|
174 | |
---|
175 | // mail_options: only set it true if you have a send mail warning with |
---|
176 | // "options" parameter missing on mail() function execution. |
---|
177 | $conf['mail_options'] = false; |
---|
178 | |
---|
179 | // send_bcc_mail_webmaster: send bcc mail to webmaster. Set true for debug |
---|
180 | // or test. |
---|
181 | $conf['send_bcc_mail_webmaster'] = false; |
---|
182 | |
---|
183 | // check_upgrade_feed: check if there are database upgrade required. Set to |
---|
184 | // true, a message will strongly encourage you to upgrade your database if |
---|
185 | // needed. |
---|
186 | // |
---|
187 | // This configuration parameter is set to true in BSF branch and to false |
---|
188 | // elsewhere. |
---|
189 | $conf['check_upgrade_feed'] = true; |
---|
190 | |
---|
191 | // +-----------------------------------------------------------------------+ |
---|
192 | // | metadata | |
---|
193 | // +-----------------------------------------------------------------------+ |
---|
194 | |
---|
195 | // show_iptc: Show IPTC metadata on picture.php if asked by user |
---|
196 | $conf['show_iptc'] = false; |
---|
197 | |
---|
198 | // show_iptc_mapping : is used for showing IPTC metadata on picture.php |
---|
199 | // page. For each key of the array, you need to have the same key in the |
---|
200 | // $lang array. For example, if my first key is 'iptc_keywords' (associated |
---|
201 | // to '2#025') then you need to have $lang['iptc_keywords'] set in |
---|
202 | // language/$user['language']/common.lang.php. If you don't have the lang |
---|
203 | // var set, the key will be simply displayed |
---|
204 | // |
---|
205 | // To know how to associated iptc_field with their meaning, use |
---|
206 | // tools/metadata.php |
---|
207 | $conf['show_iptc_mapping'] = array( |
---|
208 | 'iptc_keywords' => '2#025', |
---|
209 | 'iptc_caption_writer' => '2#122', |
---|
210 | 'iptc_byline_title' => '2#085', |
---|
211 | 'iptc_caption' => '2#120' |
---|
212 | ); |
---|
213 | |
---|
214 | // use_iptc: Use IPTC data during database synchronization with files |
---|
215 | // metadata |
---|
216 | $conf['use_iptc'] = false; |
---|
217 | |
---|
218 | // use_iptc_mapping : in which IPTC fields will PhpWebGallery find image |
---|
219 | // information ? This setting is used during metadata synchronisation. It |
---|
220 | // associates a phpwebgallery_images column name to a IPTC key |
---|
221 | $conf['use_iptc_mapping'] = array( |
---|
222 | 'keywords' => '2#025', |
---|
223 | 'date_creation' => '2#055', |
---|
224 | 'author' => '2#122', |
---|
225 | 'name' => '2#005', |
---|
226 | 'comment' => '2#120' |
---|
227 | ); |
---|
228 | |
---|
229 | // show_exif: Show EXIF metadata on picture.php (table or line presentation |
---|
230 | // avalaible) |
---|
231 | $conf['show_exif'] = true; |
---|
232 | |
---|
233 | // show_exif_fields : in EXIF fields, you can choose to display fields in |
---|
234 | // sub-arrays, for example ['COMPUTED']['ApertureFNumber']. for this, add |
---|
235 | // 'COMPUTED;ApertureFNumber' in $conf['show_exif_fields'] |
---|
236 | // |
---|
237 | // The key displayed in picture.php will be $lang['exif_field_Make'] for |
---|
238 | // example and if it exists. For compound fields, only take into account the |
---|
239 | // last part : for key 'COMPUTED;ApertureFNumber', you need |
---|
240 | // $lang['exif_field_ApertureFNumber'] |
---|
241 | // |
---|
242 | // for PHP version newer than 4.1.2 : |
---|
243 | // $conf['show_exif_fields'] = array('CameraMake','CameraModel','DateTime'); |
---|
244 | // |
---|
245 | $conf['show_exif_fields'] = array( |
---|
246 | 'Make', |
---|
247 | 'Model', |
---|
248 | 'DateTimeOriginal', |
---|
249 | 'COMPUTED;ApertureFNumber' |
---|
250 | ); |
---|
251 | |
---|
252 | // use_exif: Use EXIF data during database synchronization with files |
---|
253 | // metadata |
---|
254 | $conf['use_exif'] = false; |
---|
255 | |
---|
256 | // use_exif_mapping: same behaviour as use_iptc_mapping |
---|
257 | $conf['use_exif_mapping'] = array( |
---|
258 | 'date_creation' => 'DateTimeOriginal' |
---|
259 | ); |
---|
260 | |
---|
261 | // +-----------------------------------------------------------------------+ |
---|
262 | // | sessions | |
---|
263 | // +-----------------------------------------------------------------------+ |
---|
264 | |
---|
265 | // session_use_cookies: specifies to use cookie to store |
---|
266 | // the session id on client side |
---|
267 | $conf['session_use_cookies'] = true; |
---|
268 | |
---|
269 | // session_use_only_cookies: specifies to only use cookie to store |
---|
270 | // the session id on client side |
---|
271 | $conf['session_use_only_cookies'] = true; |
---|
272 | |
---|
273 | // session_use_trans_sid: do not use transparent session id support |
---|
274 | $conf['session_use_trans_sid'] = false; |
---|
275 | |
---|
276 | // session_name: specifies the name of the session which is used as cookie name |
---|
277 | $conf['session_name'] = 'pwg_id'; |
---|
278 | |
---|
279 | // session_save_handler: comment the line below |
---|
280 | // to use file handler for sessions. |
---|
281 | $conf['session_save_handler'] = 'db'; |
---|
282 | |
---|
283 | // authorize_remembering : permits user to stay logged for a long time. It |
---|
284 | // creates a cookie on client side. |
---|
285 | $conf['authorize_remembering'] = true; |
---|
286 | |
---|
287 | // remember_me_length : time of validity for "remember me" cookies, in |
---|
288 | // seconds. |
---|
289 | $conf['remember_me_length'] = 31536000; |
---|
290 | |
---|
291 | // session_length : time of validity for normal session, in seconds. |
---|
292 | $conf['session_length'] = 3600; |
---|
293 | |
---|
294 | // +-----------------------------------------------------------------------+ |
---|
295 | // | debug | |
---|
296 | // +-----------------------------------------------------------------------+ |
---|
297 | |
---|
298 | // show_queries : for debug purpose, show queries and execution times |
---|
299 | $conf['show_queries'] = false; |
---|
300 | |
---|
301 | // show_gt : display generation time at the bottom of each page |
---|
302 | $conf['show_gt'] = true; |
---|
303 | |
---|
304 | // debug_l10n : display a warning message each time an unset language key is |
---|
305 | // accessed |
---|
306 | $conf['debug_l10n'] = false; |
---|
307 | |
---|
308 | // +-----------------------------------------------------------------------+ |
---|
309 | // | authentication | |
---|
310 | // +-----------------------------------------------------------------------+ |
---|
311 | |
---|
312 | // apache_authentication : use Apache authentication as reference instead of |
---|
313 | // users table ? |
---|
314 | $conf['apache_authentication'] = false; |
---|
315 | |
---|
316 | // users_table: which table is the reference for users? Can be a different |
---|
317 | // table than PhpWebGallery table |
---|
318 | // |
---|
319 | // If you decide to use another table than the default one, you need to |
---|
320 | // prepare your database by deleting some datas : |
---|
321 | // |
---|
322 | // delete from phpwebgallery_user_access; |
---|
323 | // delete from phpwebgallery_user_cache; |
---|
324 | // delete from phpwebgallery_user_feed; |
---|
325 | // delete from phpwebgallery_user_group; |
---|
326 | // delete from phpwebgallery_user_infos; |
---|
327 | // delete from phpwebgallery_sessions; |
---|
328 | // delete from phpwebgallery_rate; |
---|
329 | // update phpwebgallery_images set average_rate = NULL; |
---|
330 | // delete from phpwebgallery_caddie; |
---|
331 | // delete from phpwebgallery_favorites; |
---|
332 | // |
---|
333 | // All informations contained in these tables and column are related to |
---|
334 | // phpwebgallery_users table. |
---|
335 | $conf['users_table'] = $prefixeTable.'users'; |
---|
336 | |
---|
337 | // user_fields : mapping between generic field names and table specific |
---|
338 | // field names. For example, in PWG, the mail address is names |
---|
339 | // "mail_address" and in punbb, it's called "email". |
---|
340 | $conf['user_fields'] = array( |
---|
341 | 'id' => 'id', |
---|
342 | 'username' => 'username', |
---|
343 | 'password' => 'password', |
---|
344 | 'email' => 'mail_address' |
---|
345 | ); |
---|
346 | |
---|
347 | // pass_convert : function to crypt or hash the clear user password to store |
---|
348 | // it in the database |
---|
349 | $conf['pass_convert'] = create_function('$s', 'return md5($s);'); |
---|
350 | |
---|
351 | // guest_id : id of the anonymous user |
---|
352 | $conf['guest_id'] = 2; |
---|
353 | |
---|
354 | // webmaster_id : webmaster'id. |
---|
355 | $conf['webmaster_id'] = 1; |
---|
356 | |
---|
357 | // +-----------------------------------------------------------------------+ |
---|
358 | // | upload | |
---|
359 | // +-----------------------------------------------------------------------+ |
---|
360 | |
---|
361 | // upload_maxfilesize: maximum filesize for the uploaded pictures. In |
---|
362 | // kilobytes. |
---|
363 | $conf['upload_maxfilesize'] = 200; |
---|
364 | |
---|
365 | // upload_maxheight: maximum height authorized for the uploaded images. In |
---|
366 | // pixels. |
---|
367 | $conf['upload_maxheight'] = 800; |
---|
368 | |
---|
369 | // upload_maxwidth: maximum width authorized for the uploaded images. In |
---|
370 | // pixels. |
---|
371 | $conf['upload_maxwidth'] = 800; |
---|
372 | |
---|
373 | // upload_maxheight_thumbnail: maximum height authorized for the uploaded |
---|
374 | // thumbnails |
---|
375 | $conf['upload_maxheight_thumbnail'] = 100; |
---|
376 | |
---|
377 | // upload_maxwidth_thumbnail: maximum width authorized for the uploaded |
---|
378 | // thumbnails |
---|
379 | $conf['upload_maxwidth_thumbnail'] = 150; |
---|
380 | |
---|
381 | // +-----------------------------------------------------------------------+ |
---|
382 | // | history | |
---|
383 | // +-----------------------------------------------------------------------+ |
---|
384 | |
---|
385 | // nb_logs_page : how many logs to display on a page |
---|
386 | $conf['nb_logs_page'] = 300; |
---|
387 | |
---|
388 | // history_admin : history admin visits ? |
---|
389 | $conf['history_admin'] = false; |
---|
390 | |
---|
391 | ?> |
---|