1 | <?php |
---|
2 | // +-----------------------------------------------------------------------+ |
---|
3 | // | Piwigo - a PHP based photo gallery | |
---|
4 | // +-----------------------------------------------------------------------+ |
---|
5 | // | Copyright(C) 2008-2013 Piwigo Team http://piwigo.org | |
---|
6 | // | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net | |
---|
7 | // | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick | |
---|
8 | // +-----------------------------------------------------------------------+ |
---|
9 | // | This program is free software; you can redistribute it and/or modify | |
---|
10 | // | it under the terms of the GNU General Public License as published by | |
---|
11 | // | the Free Software Foundation | |
---|
12 | // | | |
---|
13 | // | This program is distributed in the hope that it will be useful, but | |
---|
14 | // | WITHOUT ANY WARRANTY; without even the implied warranty of | |
---|
15 | // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
---|
16 | // | General Public License for more details. | |
---|
17 | // | | |
---|
18 | // | You should have received a copy of the GNU General Public License | |
---|
19 | // | along with this program; if not, write to the Free Software | |
---|
20 | // | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | |
---|
21 | // | USA. | |
---|
22 | // +-----------------------------------------------------------------------+ |
---|
23 | |
---|
24 | /** |
---|
25 | * configuration page |
---|
26 | * |
---|
27 | * Set configuration parameters that are not in the table config. In the |
---|
28 | * application, configuration parameters are considered in the same way |
---|
29 | * coming from config table or config_default.inc.php. |
---|
30 | * |
---|
31 | * It is recommended to let config_default.inc.php as provided and to |
---|
32 | * overwrite configuration in your local configuration file |
---|
33 | * local/config/config.inc.php. See tools/config.inc.php as an example. |
---|
34 | * |
---|
35 | * Why having some parameters in config table and others in |
---|
36 | * config_*.inc.php? Modifying config_*.inc.php is a "hard" task for low |
---|
37 | * skilled users, they need a GUI for this : admin/configuration. But only |
---|
38 | * parameters that might be modified by low skilled users are in config |
---|
39 | * table, other parameters are in config_*.inc.php |
---|
40 | */ |
---|
41 | |
---|
42 | // +-----------------------------------------------------------------------+ |
---|
43 | // | misc | |
---|
44 | // +-----------------------------------------------------------------------+ |
---|
45 | |
---|
46 | // order_by_custom and order_by_inside_category_custom : for non common pattern |
---|
47 | // you can define special ORDER configuration |
---|
48 | // |
---|
49 | // $conf['order_by_custom'] = ' ORDER BY date_available DESC, file ASC, id ASC'; |
---|
50 | |
---|
51 | // order_by_inside_category : inside a category, images can also be ordered |
---|
52 | // by rank. A manually defined rank on each image for the category. |
---|
53 | // |
---|
54 | // $conf['order_by_inside_category_custom'] = $conf['order_by_custom']; |
---|
55 | |
---|
56 | // file_ext : file extensions (case sensitive) authorized |
---|
57 | $conf['file_ext'] = array('jpg','JPG','jpeg','JPEG', |
---|
58 | 'png','PNG','gif','GIF','mpg','zip', |
---|
59 | 'avi','mp3','ogg'); |
---|
60 | |
---|
61 | // picture_ext : file extensions for picture file, must be a subset of |
---|
62 | // file_ext |
---|
63 | $conf['picture_ext'] = array('jpg','JPG','jpeg','JPEG', |
---|
64 | 'png','PNG','gif','GIF'); |
---|
65 | |
---|
66 | // top_number : number of element to display for "best rated" and "most |
---|
67 | // visited" categories |
---|
68 | $conf['top_number'] = 15; |
---|
69 | |
---|
70 | // anti-flood_time : number of seconds between 2 comments : 0 to disable |
---|
71 | $conf['anti-flood_time'] = 60; |
---|
72 | |
---|
73 | // qualified spam comments are not registered (false will register them |
---|
74 | // but they will require admin validation) |
---|
75 | $conf['comment_spam_reject'] = true; |
---|
76 | |
---|
77 | // maximum number of links in a comment before it is qualified spam |
---|
78 | $conf['comment_spam_max_links'] = 3; |
---|
79 | |
---|
80 | // calendar_datefield : date field of table "images" used for calendar |
---|
81 | // catgory |
---|
82 | $conf['calendar_datefield'] = 'date_creation'; |
---|
83 | |
---|
84 | // calendar_show_any : the calendar shows an aditional 'any' button in the |
---|
85 | // year/month/week/day navigation bars |
---|
86 | $conf['calendar_show_any'] = true; |
---|
87 | |
---|
88 | // calendar_show_empty : the calendar shows month/weeks/days even if there are |
---|
89 | //no elements for these |
---|
90 | $conf['calendar_show_empty'] = true; |
---|
91 | |
---|
92 | // newcat_default_commentable : at creation, must a category be commentable |
---|
93 | // or not ? |
---|
94 | $conf['newcat_default_commentable'] = true; |
---|
95 | |
---|
96 | // newcat_default_visible : at creation, must a category be visible or not ? |
---|
97 | // Warning : if the parent category is invisible, the category is |
---|
98 | // automatically create invisible. (invisible = locked) |
---|
99 | $conf['newcat_default_visible'] = true; |
---|
100 | |
---|
101 | // newcat_default_status : at creation, must a category be public or private |
---|
102 | // ? Warning : if the parent category is private, the category is |
---|
103 | // automatically create private. |
---|
104 | $conf['newcat_default_status'] = 'public'; |
---|
105 | |
---|
106 | // level_separator : character string used for separating a category level |
---|
107 | // to the sub level. Suggestions : ' / ', ' » ', ' → ', ' - ', |
---|
108 | // ' >' |
---|
109 | $conf['level_separator'] = ' / '; |
---|
110 | |
---|
111 | // paginate_pages_around : on paginate navigation bar, how many pages |
---|
112 | // display before and after the current page ? |
---|
113 | $conf['paginate_pages_around'] = 2; |
---|
114 | |
---|
115 | // show_version : shall the version of Piwigo be displayed at the |
---|
116 | // bottom of each page ? |
---|
117 | $conf['show_version'] = true; |
---|
118 | |
---|
119 | // meta_ref to reference multiple sets of incorporated pages or elements |
---|
120 | // Set it false to avoid referencing in google, and other search engines. |
---|
121 | $conf['meta_ref'] = true; |
---|
122 | |
---|
123 | // links : list of external links to add in the menu. An example is the best |
---|
124 | // than a long explanation : |
---|
125 | // |
---|
126 | // Simple use: |
---|
127 | // for each link is associated a label |
---|
128 | // $conf['links'] = array( |
---|
129 | // 'http://piwigo.org' => 'PWG website', |
---|
130 | // 'http://piwigo.org/forum' => 'PWG forum', |
---|
131 | // ); |
---|
132 | // |
---|
133 | // Advenced use: |
---|
134 | // You can also used special options. Instead to pass a string like parameter value |
---|
135 | // you can pass a array with different optional parameter values |
---|
136 | // $conf['links'] = array( |
---|
137 | // 'http://piwigo.org' => array('label' => 'PWG website', 'new_window' => false, 'eval_visible' => 'return true;'), |
---|
138 | // 'http://piwigo.org/forum' => array('label' => 'For ADMIN', 'new_window' => true, 'eval_visible' => 'return is_admin();'), |
---|
139 | // 'http://piwigo.org/ext' => array('label' => 'For Guest', 'new_window' => true, 'eval_visible' => 'return is_a_guest();'), |
---|
140 | // 'http://piwigo.org/downloads' => |
---|
141 | // array('label' => 'PopUp', 'new_window' => true, |
---|
142 | // 'nw_name' => 'PopUp', 'nw_features' => 'width=800,height=450,location=no,status=no,toolbar=no,scrollbars=no,menubar=no'), |
---|
143 | // ); |
---|
144 | // Parameters: |
---|
145 | // 'label': |
---|
146 | // Label to display for the link, must be defined |
---|
147 | // 'new_window': |
---|
148 | // If true open link on tab/window |
---|
149 | // [Default value is true if it's not defined] |
---|
150 | // 'nw_name': |
---|
151 | // Name use when new_window is true |
---|
152 | // [Default value is '' if it's not defined] |
---|
153 | // 'nw_features': |
---|
154 | // features use when new_window is true |
---|
155 | // [Default value is '' if it's not defined] |
---|
156 | // 'eval_visible': |
---|
157 | // It's php code witch must return if the link is visible or not |
---|
158 | // [Default value is true if it's not defined] |
---|
159 | // |
---|
160 | // Equivalence: |
---|
161 | // $conf['links'] = array( |
---|
162 | // 'http://piwigo.org' => 'PWG website', |
---|
163 | // ); |
---|
164 | // $conf['links'] = array( |
---|
165 | // 'http://piwigo.org' => array('label' => 'PWG website', 'new_window' => false, 'visible' => 'return true;'), |
---|
166 | // ); |
---|
167 | // |
---|
168 | // If the array is empty, the "Links" box won't be displayed on the main |
---|
169 | // page. |
---|
170 | $conf['links'] = array(); |
---|
171 | |
---|
172 | // random_index_redirect: list of 'internal' links to use when no section is defined on index.php. |
---|
173 | // An example is the best than a long explanation : |
---|
174 | // |
---|
175 | // for each link is associated a php condition |
---|
176 | // '' condition is equivalent to 'return true;' |
---|
177 | // $conf['random_index_redirect'] = array( |
---|
178 | // PHPWG_ROOT_PATH.'index.php?/best_rated' => 'return true;', |
---|
179 | // PHPWG_ROOT_PATH.'index.php?/recent_pics' => 'return is_a_guest();', |
---|
180 | // PHPWG_ROOT_PATH.'random.php' => '', |
---|
181 | // PHPWG_ROOT_PATH.'index.php?/categories' => '', |
---|
182 | // ); |
---|
183 | $conf['random_index_redirect'] = array(); |
---|
184 | |
---|
185 | // List of notes to display on all header page |
---|
186 | // example $conf['header_notes'] = array('Test', 'Hello'); |
---|
187 | $conf['header_notes'] = array(); |
---|
188 | |
---|
189 | // show_thumbnail_caption : on thumbnails page, show thumbnail captions ? |
---|
190 | $conf['show_thumbnail_caption'] = true; |
---|
191 | |
---|
192 | // display_fromto: display the date creation bounds of a |
---|
193 | // category. |
---|
194 | $conf['display_fromto'] = false; |
---|
195 | |
---|
196 | // allow_random_representative : do you wish Piwigo to search among |
---|
197 | // categories elements a new representative at each reload ? |
---|
198 | // |
---|
199 | // If false, an element is randomly or manually chosen to represent its |
---|
200 | // category and remains the representative as long as an admin does not |
---|
201 | // change it. |
---|
202 | // |
---|
203 | // Warning : setting this parameter to true is CPU consuming. Each time you |
---|
204 | // change the value of this parameter from false to true, an administrator |
---|
205 | // must update categories informations in screen [Admin > General > |
---|
206 | // Maintenance]. |
---|
207 | $conf['allow_random_representative'] = false; |
---|
208 | |
---|
209 | // representative_cache_on_level: if a thumbnail is chosen as representative |
---|
210 | // but has higher privacy level than current user, Piwigo randomly selects |
---|
211 | // another thumbnail. Should be store this thumbnail in cache to avoid |
---|
212 | // another consuming SQL query on next page refresh? |
---|
213 | $conf['representative_cache_on_level'] = true; |
---|
214 | |
---|
215 | // representative_cache_on_subcats: if a category (= album) only contains |
---|
216 | // sub-categories, Piwigo randomly selects a thumbnail among sub-categories |
---|
217 | // representative. Should we store this thumbnail in cache to avoid another |
---|
218 | // "slightly" consuming SQL query on next page refresh? |
---|
219 | $conf['representative_cache_on_subcats'] = true; |
---|
220 | |
---|
221 | // allow_html_descriptions : authorize administrators to use HTML in |
---|
222 | // category and element description. |
---|
223 | $conf['allow_html_descriptions'] = true; |
---|
224 | |
---|
225 | // users_page: how many users to display in screen |
---|
226 | // Administration>Identification>Users? |
---|
227 | $conf['users_page'] = 20; |
---|
228 | |
---|
229 | // image level permissions available in the admin interface |
---|
230 | $conf['available_permission_levels'] = array(0,1,2,4,8); |
---|
231 | |
---|
232 | // check_upgrade_feed: check if there are database upgrade required. Set to |
---|
233 | // true, a message will strongly encourage you to upgrade your database if |
---|
234 | // needed. |
---|
235 | // |
---|
236 | // This configuration parameter is set to true in BSF branch and to false |
---|
237 | // elsewhere. |
---|
238 | $conf['check_upgrade_feed'] = true; |
---|
239 | |
---|
240 | // rate_items: available rates for a picture |
---|
241 | $conf['rate_items'] = array(0,1,2,3,4,5); |
---|
242 | |
---|
243 | // Define default method to use ('http' or 'html' in order to do redirect) |
---|
244 | $conf['default_redirect_method'] = 'http'; |
---|
245 | |
---|
246 | // Define using double password type in admin's users management panel |
---|
247 | $conf['double_password_type_in_admin'] = false; |
---|
248 | |
---|
249 | // Define if logins must be case sentitive or not at users registration. ie : |
---|
250 | // If set true, the login "user" will equal "User" or "USER" or "user", |
---|
251 | // etc. ... And it will be impossible to use such login variation to create a |
---|
252 | // new user account. |
---|
253 | $conf['insensitive_case_logon'] = false; |
---|
254 | |
---|
255 | // how should we check for unicity when adding a photo. Can be 'md5sum' or |
---|
256 | // 'filename' |
---|
257 | $conf['uniqueness_mode'] = 'md5sum'; |
---|
258 | |
---|
259 | // Library used for image resizing. Value could be 'auto', 'imagick', |
---|
260 | // 'ext_imagick' or 'gd'. If value is 'auto', library will be choosen in this |
---|
261 | // order. If choosen library is not available, another one will be picked up. |
---|
262 | $conf['graphics_library'] = 'auto'; |
---|
263 | |
---|
264 | // If library used is external installation of ImageMagick ('ext_imagick'), |
---|
265 | // you can define imagemagick directory. |
---|
266 | $conf['ext_imagick_dir'] = ''; |
---|
267 | |
---|
268 | // how many user comments to display by default on comments.php. Use 'all' |
---|
269 | // to display all user comments without pagination. Default available values |
---|
270 | // are array(5,10,20,50,'all') but you can set any other numeric value. |
---|
271 | $conf['comments_page_nb_comments'] = 10; |
---|
272 | |
---|
273 | // +-----------------------------------------------------------------------+ |
---|
274 | // | email | |
---|
275 | // +-----------------------------------------------------------------------+ |
---|
276 | |
---|
277 | // send_bcc_mail_webmaster: send bcc mail to webmaster. Set true for debug |
---|
278 | // or test. |
---|
279 | $conf['send_bcc_mail_webmaster'] = false; |
---|
280 | |
---|
281 | // define the name of sender mail: if value is empty, gallery title is used |
---|
282 | $conf['mail_sender_name'] = ''; |
---|
283 | |
---|
284 | // define the email of sender mail: if valie is empty, webmaster email is used |
---|
285 | $conf['mail_sender_email'] = ''; |
---|
286 | |
---|
287 | // set true to allow text/html emails |
---|
288 | $conf['mail_allow_html'] = true; |
---|
289 | |
---|
290 | // 'clear' or 'dark' |
---|
291 | $conf['mail_theme'] = 'clear'; |
---|
292 | |
---|
293 | // smtp configuration (work if fsockopen function is allowed for smtp port) |
---|
294 | // smtp_host: smtp server host |
---|
295 | // if null, regular mail function is used |
---|
296 | // format: hoststring[:port] |
---|
297 | // exemple: smtp.pwg.net:21 |
---|
298 | // smtp_user/smtp_password: user & password for smtp identication |
---|
299 | $conf['smtp_host'] = ''; |
---|
300 | $conf['smtp_user'] = ''; |
---|
301 | $conf['smtp_password'] = ''; |
---|
302 | |
---|
303 | // 'ssl' or 'tls' |
---|
304 | $conf['smtp_secure'] = null; |
---|
305 | |
---|
306 | // +-----------------------------------------------------------------------+ |
---|
307 | // | metadata | |
---|
308 | // +-----------------------------------------------------------------------+ |
---|
309 | |
---|
310 | // show_iptc: Show IPTC metadata on picture.php if asked by user |
---|
311 | $conf['show_iptc'] = false; |
---|
312 | |
---|
313 | // show_iptc_mapping : is used for showing IPTC metadata on picture.php |
---|
314 | // page. For each key of the array, you need to have the same key in the |
---|
315 | // $lang array. For example, if my first key is 'iptc_keywords' (associated |
---|
316 | // to '2#025') then you need to have $lang['iptc_keywords'] set in |
---|
317 | // language/$user['language']/common.lang.php. If you don't have the lang |
---|
318 | // var set, the key will be simply displayed |
---|
319 | // |
---|
320 | // To know how to associated iptc_field with their meaning, use |
---|
321 | // tools/metadata.php |
---|
322 | $conf['show_iptc_mapping'] = array( |
---|
323 | 'iptc_keywords' => '2#025', |
---|
324 | 'iptc_caption_writer' => '2#122', |
---|
325 | 'iptc_byline_title' => '2#085', |
---|
326 | 'iptc_caption' => '2#120' |
---|
327 | ); |
---|
328 | |
---|
329 | // use_iptc: Use IPTC data during database synchronization with files |
---|
330 | // metadata |
---|
331 | $conf['use_iptc'] = false; |
---|
332 | |
---|
333 | // use_iptc_mapping : in which IPTC fields will Piwigo find image |
---|
334 | // information ? This setting is used during metadata synchronisation. It |
---|
335 | // associates a piwigo_images column name to a IPTC key |
---|
336 | $conf['use_iptc_mapping'] = array( |
---|
337 | 'keywords' => '2#025', |
---|
338 | 'date_creation' => '2#055', |
---|
339 | 'author' => '2#122', |
---|
340 | 'name' => '2#005', |
---|
341 | 'comment' => '2#120' |
---|
342 | ); |
---|
343 | |
---|
344 | // show_exif: Show EXIF metadata on picture.php (table or line presentation |
---|
345 | // avalaible) |
---|
346 | $conf['show_exif'] = true; |
---|
347 | |
---|
348 | // show_exif_fields : in EXIF fields, you can choose to display fields in |
---|
349 | // sub-arrays, for example ['COMPUTED']['ApertureFNumber']. for this, add |
---|
350 | // 'COMPUTED;ApertureFNumber' in $conf['show_exif_fields'] |
---|
351 | // |
---|
352 | // The key displayed in picture.php will be $lang['exif_field_Make'] for |
---|
353 | // example and if it exists. For compound fields, only take into account the |
---|
354 | // last part : for key 'COMPUTED;ApertureFNumber', you need |
---|
355 | // $lang['exif_field_ApertureFNumber'] |
---|
356 | // |
---|
357 | // for PHP version newer than 4.1.2 : |
---|
358 | // $conf['show_exif_fields'] = array('CameraMake','CameraModel','DateTime'); |
---|
359 | // |
---|
360 | $conf['show_exif_fields'] = array( |
---|
361 | 'Make', |
---|
362 | 'Model', |
---|
363 | 'DateTimeOriginal', |
---|
364 | 'COMPUTED;ApertureFNumber' |
---|
365 | ); |
---|
366 | |
---|
367 | // use_exif: Use EXIF data during database synchronization with files |
---|
368 | // metadata |
---|
369 | $conf['use_exif'] = true; |
---|
370 | |
---|
371 | // use_exif_mapping: same behaviour as use_iptc_mapping |
---|
372 | $conf['use_exif_mapping'] = array( |
---|
373 | 'date_creation' => 'DateTimeOriginal' |
---|
374 | ); |
---|
375 | |
---|
376 | // allow_html_in_metadata: in case the origin of the photo is unsecure (user |
---|
377 | // upload), we remove HTML tags to avoid XSS (malicious execution of |
---|
378 | // javascript) |
---|
379 | $conf['allow_html_in_metadata'] = false; |
---|
380 | |
---|
381 | // +-----------------------------------------------------------------------+ |
---|
382 | // | sessions | |
---|
383 | // +-----------------------------------------------------------------------+ |
---|
384 | |
---|
385 | // session_use_cookies: specifies to use cookie to store |
---|
386 | // the session id on client side |
---|
387 | $conf['session_use_cookies'] = true; |
---|
388 | |
---|
389 | // session_use_only_cookies: specifies to only use cookie to store |
---|
390 | // the session id on client side |
---|
391 | $conf['session_use_only_cookies'] = true; |
---|
392 | |
---|
393 | // session_use_trans_sid: do not use transparent session id support |
---|
394 | $conf['session_use_trans_sid'] = false; |
---|
395 | |
---|
396 | // session_name: specifies the name of the session which is used as cookie name |
---|
397 | $conf['session_name'] = 'pwg_id'; |
---|
398 | |
---|
399 | // session_save_handler: comment the line below |
---|
400 | // to use file handler for sessions. |
---|
401 | $conf['session_save_handler'] = 'db'; |
---|
402 | |
---|
403 | // authorize_remembering : permits user to stay logged for a long time. It |
---|
404 | // creates a cookie on client side. |
---|
405 | $conf['authorize_remembering'] = true; |
---|
406 | |
---|
407 | // remember_me_name: specifies the name of the cookie used to stay logged |
---|
408 | $conf['remember_me_name'] = 'pwg_remember'; |
---|
409 | |
---|
410 | // remember_me_length : time of validity for "remember me" cookies, in |
---|
411 | // seconds. |
---|
412 | $conf['remember_me_length'] = 5184000; |
---|
413 | |
---|
414 | // session_length : time of validity for normal session, in seconds. |
---|
415 | $conf['session_length'] = 3600; |
---|
416 | |
---|
417 | // session_use_ip_address: avoid session hijacking by using a part of the IP |
---|
418 | // address |
---|
419 | $conf['session_use_ip_address'] = true; |
---|
420 | |
---|
421 | // +-----------------------------------------------------------------------+ |
---|
422 | // | debug/performance | |
---|
423 | // +-----------------------------------------------------------------------+ |
---|
424 | |
---|
425 | // show_queries : for debug purpose, show queries and execution times |
---|
426 | $conf['show_queries'] = false; |
---|
427 | |
---|
428 | // show_gt : display generation time at the bottom of each page |
---|
429 | $conf['show_gt'] = true; |
---|
430 | |
---|
431 | // debug_l10n : display a warning message each time an unset language key is |
---|
432 | // accessed |
---|
433 | $conf['debug_l10n'] = false; |
---|
434 | |
---|
435 | // activate template debugging - a new window will appear |
---|
436 | $conf['debug_template'] = false; |
---|
437 | |
---|
438 | // save copies of sent mails into local data dir |
---|
439 | $conf['debug_mail'] = false; |
---|
440 | |
---|
441 | // die_on_sql_error: if an SQL query fails, should everything stop? |
---|
442 | $conf['die_on_sql_error'] = true; |
---|
443 | |
---|
444 | // if true, some language strings are replaced during template compilation |
---|
445 | // (insted of template output). this results in better performance. however |
---|
446 | // any change in the language file will not be propagated until you purge |
---|
447 | // the compiled templates from the admin / maintenance menu |
---|
448 | $conf['compiled_template_cache_language'] = false; |
---|
449 | |
---|
450 | // This tells Smarty whether to check for recompiling or not. Recompiling |
---|
451 | // does not need to happen unless a template is changed. false results in |
---|
452 | // better performance. |
---|
453 | $conf['template_compile_check'] = true; |
---|
454 | |
---|
455 | // This forces Smarty to (re)compile templates on every invocation. This is |
---|
456 | // handy for development and debugging. It should never be used in a |
---|
457 | // production environment. |
---|
458 | $conf['template_force_compile'] = false; |
---|
459 | |
---|
460 | // activate merging of javascript / css files |
---|
461 | $conf['template_combine_files'] = true; |
---|
462 | |
---|
463 | // this permit to show the php errors reporting (see INI 'error_reporting' |
---|
464 | // for possible values) |
---|
465 | // gives an empty value '' to deactivate |
---|
466 | $conf['show_php_errors'] = E_ALL; |
---|
467 | |
---|
468 | // enable log for i derivative script |
---|
469 | $conf['enable_i_log'] = false; |
---|
470 | |
---|
471 | // +-----------------------------------------------------------------------+ |
---|
472 | // | authentication | |
---|
473 | // +-----------------------------------------------------------------------+ |
---|
474 | |
---|
475 | // apache_authentication : use Apache authentication as reference instead of |
---|
476 | // users table ? |
---|
477 | $conf['apache_authentication'] = false; |
---|
478 | |
---|
479 | // users_table: which table is the reference for users? Can be a different |
---|
480 | // table than Piwigo table |
---|
481 | // |
---|
482 | // If you decide to use another table than the default one, you need to |
---|
483 | // prepare your database by deleting some datas : |
---|
484 | // |
---|
485 | // delete from piwigo_user_access; |
---|
486 | // delete from piwigo_user_cache; |
---|
487 | // delete from piwigo_user_feed; |
---|
488 | // delete from piwigo_user_group; |
---|
489 | // delete from piwigo_user_infos; |
---|
490 | // delete from piwigo_sessions; |
---|
491 | // delete from piwigo_rate; |
---|
492 | // update piwigo_images set rating_score = null, added_by = <webmaster_id>; |
---|
493 | // delete from piwigo_caddie; |
---|
494 | // delete from piwigo_favorites; |
---|
495 | // |
---|
496 | // All informations contained in these tables and column are related to |
---|
497 | // piwigo_users table. |
---|
498 | $conf['users_table'] = null; |
---|
499 | |
---|
500 | // If you decide to use external authentication |
---|
501 | // change conf below by $conf['external_authentification'] = true; |
---|
502 | $conf['external_authentification'] = false; |
---|
503 | |
---|
504 | // Other tables can be changed, if you define associated constants |
---|
505 | // Example: |
---|
506 | // define('USER_INFOS_TABLE', 'pwg_main'.'user_infos'); |
---|
507 | |
---|
508 | // user_fields : mapping between generic field names and table specific |
---|
509 | // field names. For example, in PWG, the mail address is names |
---|
510 | // "mail_address" and in punbb, it's called "email". |
---|
511 | $conf['user_fields'] = array( |
---|
512 | 'id' => 'id', |
---|
513 | 'username' => 'username', |
---|
514 | 'password' => 'password', |
---|
515 | 'email' => 'mail_address' |
---|
516 | ); |
---|
517 | |
---|
518 | // password_hash: function hash the clear user password to store it in the |
---|
519 | // database. The function takes only one parameter: the clear password. |
---|
520 | $conf['password_hash'] = 'pwg_password_hash'; |
---|
521 | |
---|
522 | // password_verify: function that checks the password against its hash. The |
---|
523 | // function takes 2 mandatory parameter : clear password, hashed password + |
---|
524 | // an optional parameter user_id. The user_id is used to update the password |
---|
525 | // with the new hash introduced in Piwigo 2.5. See function |
---|
526 | // pwg_password_verify in include/functions_user.inc.php |
---|
527 | $conf['password_verify'] = 'pwg_password_verify'; |
---|
528 | |
---|
529 | // guest_id : id of the anonymous user |
---|
530 | $conf['guest_id'] = 2; |
---|
531 | |
---|
532 | // default_user_id : id of user used for default value |
---|
533 | $conf['default_user_id'] = $conf['guest_id']; |
---|
534 | |
---|
535 | // Registering process and guest/generic members get language from the browser |
---|
536 | // if language isn't available PHPWG_DEFAULT_LANGUAGE is used as previously |
---|
537 | $conf['browser_language'] = true; |
---|
538 | |
---|
539 | // webmaster_id : webmaster'id. |
---|
540 | $conf['webmaster_id'] = 1; |
---|
541 | |
---|
542 | // does the guest have access ? |
---|
543 | // (not a security feature, set your categories "private" too) |
---|
544 | // If false it'll be redirected from index.php to identification.php |
---|
545 | $conf['guest_access'] = true; |
---|
546 | |
---|
547 | // +-----------------------------------------------------------------------+ |
---|
548 | // | history | |
---|
549 | // +-----------------------------------------------------------------------+ |
---|
550 | |
---|
551 | // nb_logs_page : how many logs to display on a page |
---|
552 | $conf['nb_logs_page'] = 300; |
---|
553 | |
---|
554 | // +-----------------------------------------------------------------------+ |
---|
555 | // | urls | |
---|
556 | // +-----------------------------------------------------------------------+ |
---|
557 | |
---|
558 | // gallery_url : you can set a specific URL for the home page of your |
---|
559 | // gallery. This is for very specific use and you don't need to change this |
---|
560 | // setting when move your gallery to a new directory or a new domain name. |
---|
561 | $conf['gallery_url'] = null; |
---|
562 | |
---|
563 | // question_mark_in_urls : the generated urls contain a ? sign. This can be |
---|
564 | // changed to false only if the server translates PATH_INFO variable |
---|
565 | // (depends on the server AcceptPathInfo directive configuration) |
---|
566 | $conf['question_mark_in_urls'] = true; |
---|
567 | |
---|
568 | // php_extension_in_urls : if true, the urls generated for picture and |
---|
569 | // category will not contain the .php extension. This will work only if |
---|
570 | // .htaccess defines Options +MultiViews parameter or url rewriting rules |
---|
571 | // are active. |
---|
572 | $conf['php_extension_in_urls'] = true; |
---|
573 | |
---|
574 | // category_url_style : one of 'id' (default) or 'id-name'. 'id-name' |
---|
575 | // means that an simplified ascii represntation of the category name will |
---|
576 | // appear in the url |
---|
577 | $conf['category_url_style'] = 'id'; |
---|
578 | |
---|
579 | // picture_url_style : one of 'id' (default), 'id-file' or 'file'. 'id-file' |
---|
580 | // or 'file' mean that the file name (without extension will appear in the |
---|
581 | // url). Note that one aditionnal sql query will occur if 'file' is choosen. |
---|
582 | // Note that you might experience navigation issues if you choose 'file' |
---|
583 | // and your file names are not unique |
---|
584 | $conf['picture_url_style'] = 'id'; |
---|
585 | |
---|
586 | // tag_url_style : one of 'id-tag' (default), 'id' or 'tag'. |
---|
587 | // Note that if you choose 'tag' and the url (ascii) representation of your |
---|
588 | // tags is not unique, all tags with the same url representation will be shown |
---|
589 | $conf['tag_url_style'] = 'id-tag'; |
---|
590 | |
---|
591 | // +-----------------------------------------------------------------------+ |
---|
592 | // | tags | |
---|
593 | // +-----------------------------------------------------------------------+ |
---|
594 | |
---|
595 | // full_tag_cloud_items_number: number of tags to show in the full tag |
---|
596 | // cloud. Only the most represented tags will be shown |
---|
597 | $conf['full_tag_cloud_items_number'] = 200; |
---|
598 | |
---|
599 | // menubar_tag_cloud_items_number: number of tags to show in the tag |
---|
600 | // cloud in the menubar. Only the most represented tags will be shown |
---|
601 | $conf['menubar_tag_cloud_items_number'] = 20; |
---|
602 | |
---|
603 | // content_tag_cloud_items_number: number of related tags to show in the tag |
---|
604 | // cloud on the content page, when the current section is not a set of |
---|
605 | // tags. Only the most represented tags will be shown |
---|
606 | $conf['content_tag_cloud_items_number'] = 12; |
---|
607 | |
---|
608 | // tags_levels: number of levels to use for display. Each level is bind to a |
---|
609 | // CSS class tagLevelX. |
---|
610 | $conf['tags_levels'] = 5; |
---|
611 | |
---|
612 | // tags_default_display_mode: group tags by letter or display a tag cloud by |
---|
613 | // default? 'letters' or 'cloud'. |
---|
614 | $conf['tags_default_display_mode'] = 'cloud'; |
---|
615 | |
---|
616 | // tag_letters_column_number: how many columns to display tags by letter |
---|
617 | $conf['tag_letters_column_number'] = 4; |
---|
618 | |
---|
619 | // +-----------------------------------------------------------------------+ |
---|
620 | // | Notification by mail | |
---|
621 | // +-----------------------------------------------------------------------+ |
---|
622 | |
---|
623 | // Default Value for nbm user |
---|
624 | $conf['nbm_default_value_user_enabled'] = false; |
---|
625 | |
---|
626 | // Search list user to send quickly (List all without to check news) |
---|
627 | // More quickly but less fun to use |
---|
628 | $conf['nbm_list_all_enabled_users_to_send'] = false; |
---|
629 | |
---|
630 | // Max time used on one pass in order to send mails. |
---|
631 | // Timeout delay ratio. |
---|
632 | $conf['nbm_max_treatment_timeout_percent'] = 0.8; |
---|
633 | |
---|
634 | // If timeout cannot be compite with nbm_max_treatment_timeout_percent, |
---|
635 | // nbm_treatment_timeout_default is used by default |
---|
636 | $conf['nbm_treatment_timeout_default'] = 20; |
---|
637 | |
---|
638 | // Parameters used in get_recent_post_dates for the 2 kind of notification |
---|
639 | $conf['recent_post_dates'] = array( |
---|
640 | 'RSS' => array('max_dates' => 5, 'max_elements' => 6, 'max_cats' => 6), |
---|
641 | 'NBM' => array('max_dates' => 7, 'max_elements' => 3, 'max_cats' => 9) |
---|
642 | ); |
---|
643 | |
---|
644 | // the author shown in the RSS feed <author> element |
---|
645 | $conf['rss_feed_author'] = 'Piwigo notifier'; |
---|
646 | |
---|
647 | // +-----------------------------------------------------------------------+ |
---|
648 | // | Set admin layout | |
---|
649 | // +-----------------------------------------------------------------------+ |
---|
650 | |
---|
651 | $conf['admin_theme'] = 'clear'; |
---|
652 | |
---|
653 | // should we load the active plugins ? true=Yes, false=No |
---|
654 | $conf['enable_plugins']=true; |
---|
655 | |
---|
656 | // Web services are allowed (true) or completely forbidden (false) |
---|
657 | $conf['allow_web_services'] = true; |
---|
658 | |
---|
659 | // enable log for web services |
---|
660 | $conf['ws_enable_log'] = false; |
---|
661 | |
---|
662 | // web services log file path |
---|
663 | $conf['ws_log_filepath'] = '/tmp/piwigo_ws.log'; |
---|
664 | |
---|
665 | // Maximum number of images to be returned foreach call to the web service |
---|
666 | $conf['ws_max_images_per_page'] = 500; |
---|
667 | |
---|
668 | // Maximum number of users to be returned foreach call to the web service |
---|
669 | $conf['ws_max_users_per_page'] = 1000; |
---|
670 | |
---|
671 | // Display a link to subscribe to Piwigo Announcements Newsletter |
---|
672 | $conf['show_newsletter_subscription'] = true; |
---|
673 | |
---|
674 | // +-----------------------------------------------------------------------+ |
---|
675 | // | Filter | |
---|
676 | // +-----------------------------------------------------------------------+ |
---|
677 | // $conf['filter_pages'] contains configuration for each pages |
---|
678 | // o If values are not defined for a specific page, default value are used |
---|
679 | // o Array is composed by the basename of each page without extention |
---|
680 | // o List of value names: |
---|
681 | // - used: filter function are used |
---|
682 | // (if false nothing is done [start, cancel, stop, ...] |
---|
683 | // - cancel: cancel current started filter |
---|
684 | // - add_notes: add notes about current started filter on the header |
---|
685 | // o Empty configuration in order to disable completely filter functions |
---|
686 | // No filter, No icon,... |
---|
687 | // $conf['filter_pages'] = array(); |
---|
688 | $conf['filter_pages'] = array |
---|
689 | ( |
---|
690 | // Default page |
---|
691 | 'default' => array( |
---|
692 | 'used' => true, 'cancel' => false, 'add_notes' => false), |
---|
693 | // Real pages |
---|
694 | 'index' => array('add_notes' => true), |
---|
695 | 'tags' => array('add_notes' => true), |
---|
696 | 'search' => array('add_notes' => true), |
---|
697 | 'comments' => array('add_notes' => true), |
---|
698 | 'admin' => array('used' => false), |
---|
699 | 'feed' => array('used' => false), |
---|
700 | 'notification' => array('used' => false), |
---|
701 | 'nbm' => array('used' => false), |
---|
702 | 'popuphelp' => array('used' => false), |
---|
703 | 'profile' => array('used' => false), |
---|
704 | 'ws' => array('used' => false), |
---|
705 | 'identification' => array('cancel' => true), |
---|
706 | 'install' => array('cancel' => true), |
---|
707 | 'password' => array('cancel' => true), |
---|
708 | 'register' => array('cancel' => true), |
---|
709 | ); |
---|
710 | |
---|
711 | // +-----------------------------------------------------------------------+ |
---|
712 | // | Slideshow | |
---|
713 | // +-----------------------------------------------------------------------+ |
---|
714 | // slideshow_period : waiting time in seconds before loading a new page |
---|
715 | // during automated slideshow |
---|
716 | // slideshow_period_min, slideshow_period_max are bounds of slideshow_period |
---|
717 | // slideshow_period_step is the step of navigation between min and max |
---|
718 | $conf['slideshow_period_min'] = 1; |
---|
719 | $conf['slideshow_period_max'] = 10; |
---|
720 | $conf['slideshow_period_step'] = 1; |
---|
721 | $conf['slideshow_period'] = 4; |
---|
722 | |
---|
723 | // slideshow_repeat : slideshow loops on pictures |
---|
724 | $conf['slideshow_repeat'] = true; |
---|
725 | |
---|
726 | // $conf['light_slideshow'] indicates to use slideshow.tpl in state of |
---|
727 | // picture.tpl for slideshow |
---|
728 | // Take care to have slideshow.tpl in all available templates |
---|
729 | // Or set it false. |
---|
730 | // Check if Picture's plugins are compliant with it |
---|
731 | // Every plugin from 1.7 would be design to manage light_slideshow case. |
---|
732 | $conf['light_slideshow'] = true; |
---|
733 | |
---|
734 | // the local data directory is used to store data such as compiled templates, |
---|
735 | // plugin variables, combined css/javascript or resized images. Beware of |
---|
736 | // mandatory trailing slash. |
---|
737 | $conf['data_location'] = '_data/'; |
---|
738 | |
---|
739 | // where should the API/UploadForm add photos? This path must be relative to |
---|
740 | // the Piwigo installation directory (but can be outside, as long as it's |
---|
741 | // reachable from your webserver). |
---|
742 | $conf['upload_dir'] = './upload'; |
---|
743 | |
---|
744 | // where should the user be guided when there is no photo in his gallery yet? |
---|
745 | $conf['no_photo_yet_url'] = 'admin.php?page=photos_add'; |
---|
746 | |
---|
747 | // directory with themes inside |
---|
748 | $conf['themes_dir'] = PHPWG_ROOT_PATH.'themes'; |
---|
749 | |
---|
750 | // pLoader direct download url for windows |
---|
751 | $conf['ploader_download_windows'] = 'http://piwigo.org/ext/download.php?eid=270'; |
---|
752 | |
---|
753 | // pLoader direct download url for mac |
---|
754 | $conf['ploader_download_mac'] = 'http://piwigo.org/ext/download.php?eid=353'; |
---|
755 | |
---|
756 | // pLoader direct download url for linux |
---|
757 | $conf['ploader_download_linux'] = 'http://piwigo.org/ext/download.php?eid=269'; |
---|
758 | |
---|
759 | // enable the synchronization method for adding photos |
---|
760 | $conf['enable_synchronization'] = true; |
---|
761 | |
---|
762 | // permitted characters for files/directoris during synchronization |
---|
763 | $conf['sync_chars_regex'] = '/^[a-zA-Z0-9-_.]+$/'; |
---|
764 | |
---|
765 | // PEM url (default is http://piwigo.org/ext) |
---|
766 | $conf['alternative_pem_url'] = ''; |
---|
767 | |
---|
768 | // categories ID on PEM |
---|
769 | $conf['pem_plugins_category'] = 12; |
---|
770 | $conf['pem_themes_category'] = 10; |
---|
771 | $conf['pem_languages_category'] = 8; |
---|
772 | |
---|
773 | // based on the EXIF "orientation" tag, should we rotate photos added in the |
---|
774 | // upload form or through pwg.images.addSimple web API method? |
---|
775 | $conf['upload_form_automatic_rotation'] = true; |
---|
776 | |
---|
777 | // 0-'auto', 1-'derivative' 2-'script' |
---|
778 | $conf['derivative_url_style']=0; |
---|
779 | |
---|
780 | $conf['chmod_value']= substr_compare(PHP_SAPI, 'apa', 0, 3)==0 ? 0777 : 0755; |
---|
781 | |
---|
782 | // 'small', 'medium' or 'large' |
---|
783 | $conf['derivative_default_size'] = 'medium'; |
---|
784 | |
---|
785 | // below which size (in pixels, ie width*height) do we remove metadata |
---|
786 | // EXIF/IPTC... from derivative? |
---|
787 | $conf['derivatives_strip_metadata_threshold'] = 256000; |
---|
788 | |
---|
789 | //Maximum Ajax requests at once, for thumbnails on-the-fly generation |
---|
790 | $conf['max_requests']=3; |
---|
791 | |
---|
792 | // one of '', 'images', 'all' |
---|
793 | //TODO: Put this in admin and also manage .htaccess in #sites and upload folders |
---|
794 | $conf['original_url_protection'] = ''; |
---|
795 | |
---|
796 | |
---|
797 | // Default behaviour when a new album is created: should the new album inherit the group/user |
---|
798 | // permissions from its parent? Note that config is only used for Ftp synchro, |
---|
799 | // and if that option is not explicitly transmit when the album is created. |
---|
800 | $conf['inheritance_by_default'] = false; |
---|
801 | |
---|
802 | ?> |
---|