[770] | 1 | <?php |
---|
| 2 | // +-----------------------------------------------------------------------+ |
---|
| 3 | // | PhpWebGallery - a PHP based picture gallery | |
---|
| 4 | // | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net | |
---|
[1730] | 5 | // | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net | |
---|
[770] | 6 | // +-----------------------------------------------------------------------+ |
---|
[1857] | 7 | // | file : $Id: config_default.inc.php 2195 2008-01-24 21:00:34Z mathiasm $ |
---|
[770] | 8 | // | last update : $Date: 2008-01-24 21:00:34 +0000 (Thu, 24 Jan 2008) $ |
---|
| 9 | // | last modifier : $Author: mathiasm $ |
---|
| 10 | // | revision : $Revision: 2195 $ |
---|
| 11 | // +-----------------------------------------------------------------------+ |
---|
| 12 | // | This program is free software; you can redistribute it and/or modify | |
---|
| 13 | // | it under the terms of the GNU General Public License as published by | |
---|
| 14 | // | the Free Software Foundation | |
---|
| 15 | // | | |
---|
| 16 | // | This program is distributed in the hope that it will be useful, but | |
---|
| 17 | // | WITHOUT ANY WARRANTY; without even the implied warranty of | |
---|
| 18 | // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
---|
| 19 | // | General Public License for more details. | |
---|
| 20 | // | | |
---|
| 21 | // | You should have received a copy of the GNU General Public License | |
---|
| 22 | // | along with this program; if not, write to the Free Software | |
---|
| 23 | // | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | |
---|
| 24 | // | USA. | |
---|
| 25 | // +-----------------------------------------------------------------------+ |
---|
| 26 | |
---|
| 27 | /** |
---|
| 28 | * configuration page |
---|
| 29 | * |
---|
| 30 | * Set configuration parameters that are not in the table config. In the |
---|
| 31 | * application, configuration parameters are considered in the same way |
---|
| 32 | * coming from config table or config_default.inc.php. |
---|
| 33 | * |
---|
| 34 | * It is recommended to let config_default.inc.php as provided and to |
---|
| 35 | * overwrite configuration in your local configuration file |
---|
[870] | 36 | * config_local.inc.php. See tools/config_local.inc.php as an example. |
---|
[770] | 37 | * |
---|
| 38 | * Why having some parameters in config table and others in |
---|
| 39 | * config_*.inc.php? Modifying config_*.inc.php is a "hard" task for low |
---|
| 40 | * skilled users, they need a GUI for this : admin/configuration. But only |
---|
| 41 | * parameters that might be modified by low skilled users are in config |
---|
| 42 | * table, other parameters are in config_*.inc.php |
---|
| 43 | */ |
---|
| 44 | |
---|
[858] | 45 | // +-----------------------------------------------------------------------+ |
---|
| 46 | // | misc | |
---|
| 47 | // +-----------------------------------------------------------------------+ |
---|
| 48 | |
---|
[770] | 49 | // order_by : how to change the order of display for images in a category ? |
---|
| 50 | // |
---|
| 51 | // There are several fields that can order the display : |
---|
| 52 | // |
---|
| 53 | // - date_available : the date of the adding to the gallery |
---|
| 54 | // - file : the name of the file |
---|
| 55 | // - id : element identifier |
---|
| 56 | // - date_creation : date of element creation |
---|
| 57 | // |
---|
| 58 | // Once you've chosen which field(s) to use for ordering, you must chose the |
---|
| 59 | // ascending or descending order for each field. examples : |
---|
| 60 | // |
---|
| 61 | // 1. $conf['order_by'] = " order by date_available desc, file asc"; |
---|
| 62 | // will order pictures by date_available descending & by filename ascending |
---|
| 63 | // |
---|
| 64 | // 2. $conf['order_by'] = " order by file asc"; |
---|
| 65 | // will only order pictures by file ascending without taking into account |
---|
| 66 | // the date_available |
---|
| 67 | $conf['order_by'] = ' ORDER BY date_available DESC, file ASC, id ASC'; |
---|
| 68 | |
---|
| 69 | // slideshow_period : waiting time in seconds before loading a new page |
---|
| 70 | // during automated slideshow |
---|
| 71 | $conf['slideshow_period'] = 4; |
---|
| 72 | |
---|
| 73 | // file_ext : file extensions (case sensitive) authorized |
---|
[1635] | 74 | $conf['file_ext'] = array('jpg','JPG','jpeg','JPEG', |
---|
| 75 | 'png','PNG','gif','GIF','mpg','zip', |
---|
[770] | 76 | 'avi','mp3','ogg'); |
---|
| 77 | |
---|
| 78 | // picture_ext : file extensions for picture file, must be a subset of |
---|
| 79 | // file_ext |
---|
[1635] | 80 | $conf['picture_ext'] = array('jpg','JPG','jpeg','JPEG', |
---|
| 81 | 'png','PNG','gif','GIF'); |
---|
[770] | 82 | |
---|
| 83 | // top_number : number of element to display for "best rated" and "most |
---|
| 84 | // visited" categories |
---|
| 85 | $conf['top_number'] = 15; |
---|
| 86 | |
---|
| 87 | // anti-flood_time : number of seconds between 2 comments : 0 to disable |
---|
| 88 | $conf['anti-flood_time'] = 60; |
---|
| 89 | |
---|
[1610] | 90 | // qualified spam comments are not registered (false will register them |
---|
| 91 | // but they will require admin validation) |
---|
| 92 | $conf['comment_spam_reject'] = true; |
---|
| 93 | |
---|
| 94 | // maximum number of links in a comment before it is qualified spam |
---|
| 95 | $conf['comment_spam_max_links'] = 3; |
---|
| 96 | |
---|
| 97 | // if the ip address of a comenteer is in spamhaus.org block list, the |
---|
| 98 | // comment is qualified spam |
---|
| 99 | $conf['comment_spam_check_ip'] = false; |
---|
| 100 | |
---|
[858] | 101 | // calendar_datefield : date field of table "images" used for calendar |
---|
| 102 | // catgory |
---|
| 103 | $conf['calendar_datefield'] = 'date_creation'; |
---|
| 104 | |
---|
[1057] | 105 | // calendar_show_any : the calendar shows an aditional 'any' button in the |
---|
| 106 | // year/month/week/day navigation bars |
---|
| 107 | $conf['calendar_show_any'] = true; |
---|
| 108 | |
---|
[1059] | 109 | // calendar_show_empty : the calendar shows month/weeks/days even if there are |
---|
| 110 | //no elements for these |
---|
| 111 | $conf['calendar_show_empty'] = true; |
---|
| 112 | |
---|
[1061] | 113 | // calendar_month_cell_width, calendar_month_cell_height : define the |
---|
| 114 | // width and the height of a cell in the monthly calendar when viewing a |
---|
| 115 | // given month. a value of 0 means that the pretty view is not shown. |
---|
| 116 | // a good suggestion would be to have the width and the height equal |
---|
[1837] | 117 | // and smaller than tn_width and tn_height. |
---|
[1061] | 118 | $conf['calendar_month_cell_width'] =80; |
---|
| 119 | $conf['calendar_month_cell_height']=80; |
---|
| 120 | |
---|
[858] | 121 | // newcat_default_commentable : at creation, must a category be commentable |
---|
| 122 | // or not ? |
---|
[1278] | 123 | $conf['newcat_default_commentable'] = true; |
---|
[858] | 124 | |
---|
| 125 | // newcat_default_uploadable : at creation, must a category be uploadable or |
---|
| 126 | // not ? |
---|
[1278] | 127 | $conf['newcat_default_uploadable'] = false; |
---|
[858] | 128 | |
---|
| 129 | // newcat_default_visible : at creation, must a category be visible or not ? |
---|
| 130 | // Warning : if the parent category is invisible, the category is |
---|
| 131 | // automatically create invisible. (invisible = locked) |
---|
[1278] | 132 | $conf['newcat_default_visible'] = true; |
---|
[858] | 133 | |
---|
| 134 | // newcat_default_status : at creation, must a category be public or private |
---|
| 135 | // ? Warning : if the parent category is private, the category is |
---|
| 136 | // automatically create private. |
---|
| 137 | $conf['newcat_default_status'] = 'public'; |
---|
| 138 | |
---|
| 139 | // level_separator : character string used for separating a category level |
---|
| 140 | // to the sub level. Suggestions : ' / ', ' » ', ' → ', ' - ', |
---|
| 141 | // ' >' |
---|
| 142 | $conf['level_separator'] = ' / '; |
---|
| 143 | |
---|
| 144 | // paginate_pages_around : on paginate navigation bar, how many pages |
---|
| 145 | // display before and after the current page ? |
---|
| 146 | $conf['paginate_pages_around'] = 2; |
---|
| 147 | |
---|
| 148 | // tn_width : default width for thumbnails creation |
---|
| 149 | $conf['tn_width'] = 128; |
---|
| 150 | |
---|
| 151 | // tn_height : default height for thumbnails creation |
---|
[937] | 152 | $conf['tn_height'] = 128; |
---|
[858] | 153 | |
---|
| 154 | // show_version : shall the version of PhpWebGallery be displayed at the |
---|
| 155 | // bottom of each page ? |
---|
[2195] | 156 | $conf['show_version'] = false; |
---|
[858] | 157 | |
---|
[1763] | 158 | |
---|
[858] | 159 | // links : list of external links to add in the menu. An example is the best |
---|
| 160 | // than a long explanation : |
---|
| 161 | // |
---|
[1728] | 162 | // Simple use: |
---|
| 163 | // for each link is associated a label |
---|
| 164 | // $conf['links'] = array( |
---|
| 165 | // 'http://phpwebgallery.net' => 'PWG website', |
---|
| 166 | // 'http://forum.phpwebgallery.net' => 'PWG forum', |
---|
| 167 | // 'http://phpwebgallery.net/doc' => 'PWG wiki' |
---|
| 168 | // ); |
---|
[858] | 169 | // |
---|
[1728] | 170 | // Advenced use: |
---|
| 171 | // You can also used special options. Instead to pass a string like parameter value |
---|
| 172 | // you can pass a array with different optional parameter values |
---|
| 173 | // $conf['links'] = array( |
---|
[1736] | 174 | // 'http://phpwebgallery.net' => array('label' => 'PWG website', 'new_window' => false, 'eval_visible' => 'return true;'), |
---|
[1728] | 175 | // 'http://forum.phpwebgallery.net' => array('label' => 'For ADMIN', 'new_window' => true, 'eval_visible' => 'return is_admin();'), |
---|
| 176 | // 'http://phpwebgallery.net/doc' => array('label' => 'For Guest', 'new_window' => true, 'eval_visible' => 'return $user[\'is_the_guest\'];'), |
---|
[1743] | 177 | // 'http://download.gna.org/phpwebgallery/' => |
---|
| 178 | // array('label' => 'PopUp', 'new_window' => true, |
---|
| 179 | // 'nw_name' => 'PopUp', 'nw_features' => 'width=800,height=450,location=no,status=no,toolbar=no,scrollbars=no,menubar=no'), |
---|
[1728] | 180 | // ); |
---|
[1736] | 181 | // Parameters: |
---|
| 182 | // 'label': |
---|
| 183 | // Label to display for the link, must be defined |
---|
| 184 | // 'new_window': |
---|
| 185 | // If true open link on tab/window |
---|
| 186 | // [Default value is true if it's not defined] |
---|
[1743] | 187 | // 'nw_name': |
---|
| 188 | // Name use when new_window is true |
---|
| 189 | // [Default value is '' if it's not defined] |
---|
| 190 | // 'nw_features': |
---|
| 191 | // features use when new_window is true |
---|
| 192 | // [Default value is '' if it's not defined] |
---|
[1736] | 193 | // 'eval_visible': |
---|
| 194 | // It's php code witch must return if the link is visible or not |
---|
| 195 | // [Default value is true if it's not defined] |
---|
| 196 | // |
---|
[1728] | 197 | // Equivalence: |
---|
| 198 | // $conf['links'] = array( |
---|
| 199 | // 'http://phpwebgallery.net' => 'PWG website', |
---|
| 200 | // ); |
---|
| 201 | // $conf['links'] = array( |
---|
| 202 | // 'http://phpwebgallery.net' => array('label' => 'PWG website', 'new_window' => false, 'visible' => 'return true;'), |
---|
| 203 | // ); |
---|
| 204 | // |
---|
[858] | 205 | // If the array is empty, the "Links" box won't be displayed on the main |
---|
| 206 | // page. |
---|
| 207 | $conf['links'] = array(); |
---|
| 208 | |
---|
[1788] | 209 | // random_index_redirect: list of 'internal' links to use when no section is defined on index.php. |
---|
| 210 | // An example is the best than a long explanation : |
---|
| 211 | // |
---|
| 212 | // for each link is associated a php condition |
---|
| 213 | // '' condition is equivalent to 'return true;' |
---|
| 214 | // $conf['random_index_redirect'] = array( |
---|
| 215 | // PHPWG_ROOT_PATH.'index.php?/best_rated' => 'return true;', |
---|
| 216 | // PHPWG_ROOT_PATH.'index.php?/recent_pics' => 'return $user[\'is_the_guest\'];', |
---|
| 217 | // PHPWG_ROOT_PATH.'random.php' => '', |
---|
| 218 | // PHPWG_ROOT_PATH.'index.php?/categories' => '', |
---|
| 219 | // ); |
---|
| 220 | $conf['random_index_redirect'] = array(); |
---|
| 221 | |
---|
[1677] | 222 | // List of notes to display on all header page |
---|
| 223 | // example $conf['header_notes'] = array('Test', 'Hello'); |
---|
| 224 | $conf['header_notes'] = array(); |
---|
| 225 | |
---|
[858] | 226 | // show_thumbnail_caption : on thumbnails page, show thumbnail captions ? |
---|
| 227 | $conf['show_thumbnail_caption'] = true; |
---|
| 228 | |
---|
| 229 | // show_picture_name_on_title : on picture presentation page, show picture |
---|
| 230 | // name ? |
---|
| 231 | $conf['show_picture_name_on_title'] = true; |
---|
| 232 | |
---|
[1132] | 233 | // subcatify: display thumbnails representing a category a different way |
---|
| 234 | // than thumbnails representing a picture. |
---|
| 235 | $conf['subcatify'] = true; |
---|
| 236 | |
---|
[858] | 237 | // allow_random_representative : do you wish PhpWebGallery to search among |
---|
| 238 | // categories elements a new representative at each reload ? |
---|
| 239 | // |
---|
| 240 | // If false, an element is randomly or manually chosen to represent its |
---|
| 241 | // category and remains the representative as long as an admin does not |
---|
| 242 | // change it. |
---|
| 243 | // |
---|
| 244 | // Warning : setting this parameter to true is CPU consuming. Each time you |
---|
| 245 | // change the value of this parameter from false to true, an administrator |
---|
| 246 | // must update categories informations in screen [Admin > General > |
---|
| 247 | // Maintenance]. |
---|
| 248 | $conf['allow_random_representative'] = false; |
---|
| 249 | |
---|
| 250 | // allow_html_descriptions : authorize administrators to use HTML in |
---|
| 251 | // category and element description. |
---|
| 252 | $conf['allow_html_descriptions'] = true; |
---|
| 253 | |
---|
[862] | 254 | // prefix_thumbnail : string before filename. Thumbnail's prefix must only |
---|
| 255 | // contain characters among : a to z (case insensitive), "-" or "_". |
---|
[858] | 256 | $conf['prefix_thumbnail'] = 'TN-'; |
---|
| 257 | |
---|
[880] | 258 | // users_page: how many users to display in screen |
---|
| 259 | // Administration>Identification>Users? |
---|
| 260 | $conf['users_page'] = 20; |
---|
| 261 | |
---|
[901] | 262 | // mail_options: only set it true if you have a send mail warning with |
---|
| 263 | // "options" parameter missing on mail() function execution. |
---|
| 264 | $conf['mail_options'] = false; |
---|
| 265 | |
---|
[1021] | 266 | // send_bcc_mail_webmaster: send bcc mail to webmaster. Set true for debug |
---|
| 267 | // or test. |
---|
[1018] | 268 | $conf['send_bcc_mail_webmaster'] = false; |
---|
| 269 | |
---|
[1531] | 270 | // enabled_format_email: |
---|
[1537] | 271 | // on true email will be formatted with name and address |
---|
[1531] | 272 | // on false email will be only address |
---|
| 273 | // There are webhosting wich not allow email formatted (Lycos, ...) |
---|
| 274 | $conf['enabled_format_email'] = true; |
---|
| 275 | |
---|
[1642] | 276 | // default_email_format: |
---|
| 277 | // Define the default email format use to send email |
---|
| 278 | // Value could be text/plain or text/html |
---|
[1905] | 279 | $conf['default_email_format'] = 'text/html'; |
---|
[1642] | 280 | |
---|
[2105] | 281 | // smtp configuration |
---|
| 282 | // (work if fsockopen function is allowed for smtp port) |
---|
| 283 | // smtp_host: smtp server host |
---|
| 284 | // if null, regular mail function is used |
---|
| 285 | // format: hoststring[:port] |
---|
| 286 | // exemple: smtp.pwg.net:21 |
---|
| 287 | // smtp_user/smtp_password: user & password for smtp identication |
---|
| 288 | $conf['smtp_host'] = ''; |
---|
| 289 | $conf['smtp_user'] = ''; |
---|
| 290 | $conf['smtp_password'] = ''; |
---|
| 291 | |
---|
| 292 | |
---|
[953] | 293 | // check_upgrade_feed: check if there are database upgrade required. Set to |
---|
| 294 | // true, a message will strongly encourage you to upgrade your database if |
---|
| 295 | // needed. |
---|
| 296 | // |
---|
| 297 | // This configuration parameter is set to true in BSF branch and to false |
---|
| 298 | // elsewhere. |
---|
[2195] | 299 | $conf['check_upgrade_feed'] = false; |
---|
[953] | 300 | |
---|
[1084] | 301 | // rate_items: available rates for a picture |
---|
| 302 | $conf['rate_items'] = array(0,1,2,3,4,5); |
---|
| 303 | |
---|
[1649] | 304 | // Define default method to use ('http' or 'html' in order to do redirect) |
---|
| 305 | $conf['default_redirect_method'] = 'http'; |
---|
| 306 | |
---|
[858] | 307 | // +-----------------------------------------------------------------------+ |
---|
| 308 | // | metadata | |
---|
| 309 | // +-----------------------------------------------------------------------+ |
---|
| 310 | |
---|
| 311 | // show_iptc: Show IPTC metadata on picture.php if asked by user |
---|
| 312 | $conf['show_iptc'] = false; |
---|
| 313 | |
---|
[770] | 314 | // show_iptc_mapping : is used for showing IPTC metadata on picture.php |
---|
| 315 | // page. For each key of the array, you need to have the same key in the |
---|
| 316 | // $lang array. For example, if my first key is 'iptc_keywords' (associated |
---|
| 317 | // to '2#025') then you need to have $lang['iptc_keywords'] set in |
---|
| 318 | // language/$user['language']/common.lang.php. If you don't have the lang |
---|
| 319 | // var set, the key will be simply displayed |
---|
| 320 | // |
---|
| 321 | // To know how to associated iptc_field with their meaning, use |
---|
| 322 | // tools/metadata.php |
---|
| 323 | $conf['show_iptc_mapping'] = array( |
---|
| 324 | 'iptc_keywords' => '2#025', |
---|
| 325 | 'iptc_caption_writer' => '2#122', |
---|
| 326 | 'iptc_byline_title' => '2#085', |
---|
| 327 | 'iptc_caption' => '2#120' |
---|
| 328 | ); |
---|
| 329 | |
---|
[858] | 330 | // use_iptc: Use IPTC data during database synchronization with files |
---|
| 331 | // metadata |
---|
| 332 | $conf['use_iptc'] = false; |
---|
| 333 | |
---|
[770] | 334 | // use_iptc_mapping : in which IPTC fields will PhpWebGallery find image |
---|
| 335 | // information ? This setting is used during metadata synchronisation. It |
---|
| 336 | // associates a phpwebgallery_images column name to a IPTC key |
---|
| 337 | $conf['use_iptc_mapping'] = array( |
---|
| 338 | 'keywords' => '2#025', |
---|
| 339 | 'date_creation' => '2#055', |
---|
| 340 | 'author' => '2#122', |
---|
| 341 | 'name' => '2#005', |
---|
| 342 | 'comment' => '2#120' |
---|
| 343 | ); |
---|
| 344 | |
---|
[858] | 345 | // show_exif: Show EXIF metadata on picture.php (table or line presentation |
---|
| 346 | // avalaible) |
---|
| 347 | $conf['show_exif'] = true; |
---|
| 348 | |
---|
[770] | 349 | // show_exif_fields : in EXIF fields, you can choose to display fields in |
---|
| 350 | // sub-arrays, for example ['COMPUTED']['ApertureFNumber']. for this, add |
---|
| 351 | // 'COMPUTED;ApertureFNumber' in $conf['show_exif_fields'] |
---|
| 352 | // |
---|
| 353 | // The key displayed in picture.php will be $lang['exif_field_Make'] for |
---|
| 354 | // example and if it exists. For compound fields, only take into account the |
---|
| 355 | // last part : for key 'COMPUTED;ApertureFNumber', you need |
---|
| 356 | // $lang['exif_field_ApertureFNumber'] |
---|
| 357 | // |
---|
| 358 | // for PHP version newer than 4.1.2 : |
---|
| 359 | // $conf['show_exif_fields'] = array('CameraMake','CameraModel','DateTime'); |
---|
[1059] | 360 | // |
---|
[858] | 361 | $conf['show_exif_fields'] = array( |
---|
| 362 | 'Make', |
---|
| 363 | 'Model', |
---|
| 364 | 'DateTimeOriginal', |
---|
| 365 | 'COMPUTED;ApertureFNumber' |
---|
| 366 | ); |
---|
[770] | 367 | |
---|
[858] | 368 | // use_exif: Use EXIF data during database synchronization with files |
---|
| 369 | // metadata |
---|
[1682] | 370 | $conf['use_exif'] = true; |
---|
[770] | 371 | |
---|
[858] | 372 | // use_exif_mapping: same behaviour as use_iptc_mapping |
---|
| 373 | $conf['use_exif_mapping'] = array( |
---|
| 374 | 'date_creation' => 'DateTimeOriginal' |
---|
| 375 | ); |
---|
[770] | 376 | |
---|
[858] | 377 | // +-----------------------------------------------------------------------+ |
---|
| 378 | // | sessions | |
---|
| 379 | // +-----------------------------------------------------------------------+ |
---|
| 380 | |
---|
[1059] | 381 | // session_use_cookies: specifies to use cookie to store |
---|
[1007] | 382 | // the session id on client side |
---|
| 383 | $conf['session_use_cookies'] = true; |
---|
[1004] | 384 | |
---|
[1059] | 385 | // session_use_only_cookies: specifies to only use cookie to store |
---|
[1007] | 386 | // the session id on client side |
---|
| 387 | $conf['session_use_only_cookies'] = true; |
---|
[1004] | 388 | |
---|
[1007] | 389 | // session_use_trans_sid: do not use transparent session id support |
---|
| 390 | $conf['session_use_trans_sid'] = false; |
---|
[1004] | 391 | |
---|
[1007] | 392 | // session_name: specifies the name of the session which is used as cookie name |
---|
[1004] | 393 | $conf['session_name'] = 'pwg_id'; |
---|
| 394 | |
---|
[1059] | 395 | // session_save_handler: comment the line below |
---|
[1007] | 396 | // to use file handler for sessions. |
---|
[1004] | 397 | $conf['session_save_handler'] = 'db'; |
---|
| 398 | |
---|
[858] | 399 | // authorize_remembering : permits user to stay logged for a long time. It |
---|
| 400 | // creates a cookie on client side. |
---|
| 401 | $conf['authorize_remembering'] = true; |
---|
| 402 | |
---|
[1493] | 403 | // remember_me_name: specifies the name of the cookie used to stay logged |
---|
| 404 | $conf['remember_me_name'] = 'pwg_remember'; |
---|
| 405 | |
---|
[770] | 406 | // remember_me_length : time of validity for "remember me" cookies, in |
---|
| 407 | // seconds. |
---|
[1568] | 408 | $conf['remember_me_length'] = 5184000; |
---|
[770] | 409 | |
---|
[1568] | 410 | // session_length : time of validity for normal session, in seconds. |
---|
| 411 | $conf['session_length'] = 3600; |
---|
| 412 | |
---|
[858] | 413 | // +-----------------------------------------------------------------------+ |
---|
| 414 | // | debug | |
---|
| 415 | // +-----------------------------------------------------------------------+ |
---|
[770] | 416 | |
---|
| 417 | // show_queries : for debug purpose, show queries and execution times |
---|
| 418 | $conf['show_queries'] = false; |
---|
| 419 | |
---|
| 420 | // show_gt : display generation time at the bottom of each page |
---|
[2195] | 421 | $conf['show_gt'] = false; |
---|
[770] | 422 | |
---|
[858] | 423 | // debug_l10n : display a warning message each time an unset language key is |
---|
| 424 | // accessed |
---|
| 425 | $conf['debug_l10n'] = false; |
---|
[770] | 426 | |
---|
[1221] | 427 | // die_on_sql_error: if an SQL query fails, should everything stop? |
---|
[2195] | 428 | $conf['die_on_sql_error'] = false; |
---|
[1221] | 429 | |
---|
[858] | 430 | // +-----------------------------------------------------------------------+ |
---|
| 431 | // | authentication | |
---|
| 432 | // +-----------------------------------------------------------------------+ |
---|
[770] | 433 | |
---|
[804] | 434 | // apache_authentication : use Apache authentication as reference instead of |
---|
| 435 | // users table ? |
---|
| 436 | $conf['apache_authentication'] = false; |
---|
[808] | 437 | |
---|
[865] | 438 | // users_table: which table is the reference for users? Can be a different |
---|
[808] | 439 | // table than PhpWebGallery table |
---|
[865] | 440 | // |
---|
| 441 | // If you decide to use another table than the default one, you need to |
---|
| 442 | // prepare your database by deleting some datas : |
---|
| 443 | // |
---|
| 444 | // delete from phpwebgallery_user_access; |
---|
| 445 | // delete from phpwebgallery_user_cache; |
---|
| 446 | // delete from phpwebgallery_user_feed; |
---|
| 447 | // delete from phpwebgallery_user_group; |
---|
| 448 | // delete from phpwebgallery_user_infos; |
---|
| 449 | // delete from phpwebgallery_sessions; |
---|
| 450 | // delete from phpwebgallery_rate; |
---|
| 451 | // update phpwebgallery_images set average_rate = NULL; |
---|
| 452 | // delete from phpwebgallery_caddie; |
---|
| 453 | // delete from phpwebgallery_favorites; |
---|
| 454 | // |
---|
| 455 | // All informations contained in these tables and column are related to |
---|
| 456 | // phpwebgallery_users table. |
---|
[808] | 457 | $conf['users_table'] = $prefixeTable.'users'; |
---|
| 458 | |
---|
| 459 | // user_fields : mapping between generic field names and table specific |
---|
| 460 | // field names. For example, in PWG, the mail address is names |
---|
| 461 | // "mail_address" and in punbb, it's called "email". |
---|
| 462 | $conf['user_fields'] = array( |
---|
| 463 | 'id' => 'id', |
---|
| 464 | 'username' => 'username', |
---|
| 465 | 'password' => 'password', |
---|
| 466 | 'email' => 'mail_address' |
---|
| 467 | ); |
---|
| 468 | |
---|
| 469 | // pass_convert : function to crypt or hash the clear user password to store |
---|
| 470 | // it in the database |
---|
| 471 | $conf['pass_convert'] = create_function('$s', 'return md5($s);'); |
---|
| 472 | |
---|
| 473 | // guest_id : id of the anonymous user |
---|
| 474 | $conf['guest_id'] = 2; |
---|
[1926] | 475 | // default_user_id : id of user used for default value |
---|
| 476 | $conf['default_user_id'] = $conf['guest_id']; |
---|
[809] | 477 | |
---|
[858] | 478 | // webmaster_id : webmaster'id. |
---|
| 479 | $conf['webmaster_id'] = 1; |
---|
[825] | 480 | |
---|
[1087] | 481 | // allow to use adviser mode |
---|
| 482 | $conf['allow_adviser'] = false; |
---|
| 483 | |
---|
[1470] | 484 | // does the guest have access ? |
---|
| 485 | // (not a security feature, set your categories "private" too) |
---|
| 486 | // If false it'll be redirected from index.php to identification.php |
---|
| 487 | $conf['guest_access'] = true; |
---|
| 488 | |
---|
[858] | 489 | // +-----------------------------------------------------------------------+ |
---|
| 490 | // | upload | |
---|
| 491 | // +-----------------------------------------------------------------------+ |
---|
[833] | 492 | |
---|
[858] | 493 | // upload_maxfilesize: maximum filesize for the uploaded pictures. In |
---|
| 494 | // kilobytes. |
---|
| 495 | $conf['upload_maxfilesize'] = 200; |
---|
[833] | 496 | |
---|
[858] | 497 | // upload_maxheight: maximum height authorized for the uploaded images. In |
---|
| 498 | // pixels. |
---|
| 499 | $conf['upload_maxheight'] = 800; |
---|
[850] | 500 | |
---|
[858] | 501 | // upload_maxwidth: maximum width authorized for the uploaded images. In |
---|
[900] | 502 | // pixels. |
---|
[858] | 503 | $conf['upload_maxwidth'] = 800; |
---|
[850] | 504 | |
---|
[858] | 505 | // upload_maxheight_thumbnail: maximum height authorized for the uploaded |
---|
| 506 | // thumbnails |
---|
[1848] | 507 | $conf['upload_maxheight_thumbnail'] = 128; |
---|
[858] | 508 | |
---|
| 509 | // upload_maxwidth_thumbnail: maximum width authorized for the uploaded |
---|
| 510 | // thumbnails |
---|
[1848] | 511 | $conf['upload_maxwidth_thumbnail'] = 128; |
---|
[894] | 512 | |
---|
| 513 | // +-----------------------------------------------------------------------+ |
---|
[901] | 514 | // | history | |
---|
[894] | 515 | // +-----------------------------------------------------------------------+ |
---|
| 516 | |
---|
| 517 | // nb_logs_page : how many logs to display on a page |
---|
| 518 | $conf['nb_logs_page'] = 300; |
---|
| 519 | |
---|
[1094] | 520 | // +-----------------------------------------------------------------------+ |
---|
| 521 | // | urls | |
---|
| 522 | // +-----------------------------------------------------------------------+ |
---|
| 523 | |
---|
| 524 | // question_mark_in_urls : the generated urls contain a ? sign. This can be |
---|
| 525 | // changed to false only if the server translates PATH_INFO variable |
---|
| 526 | // (depends on the server AcceptPathInfo directive configuration) |
---|
| 527 | $conf['question_mark_in_urls'] = true; |
---|
| 528 | |
---|
| 529 | // php_extension_in_urls : if true, the urls generated for picture and |
---|
| 530 | // category will not contain the .php extension. This will work only if |
---|
| 531 | // .htaccess defines Options +MultiViews parameter or url rewriting rules |
---|
| 532 | // are active. |
---|
| 533 | $conf['php_extension_in_urls'] = true; |
---|
| 534 | |
---|
[1131] | 535 | // category_url_style : one of 'id' (default) or 'id-name'. 'id-name' |
---|
| 536 | // means that an simplified ascii represntation of the category name will |
---|
| 537 | // appear in the url |
---|
| 538 | $conf['category_url_style'] = 'id'; |
---|
| 539 | |
---|
| 540 | // picture_url_style : one of 'id' (default), 'id-file' or 'file'. 'id-file' |
---|
| 541 | // or 'file' mean that the file name (without extension will appear in the |
---|
| 542 | // url). Note that one aditionnal sql query will occur if 'file' is choosen. |
---|
| 543 | // Note that you might experience navigation issues if you choose 'file' |
---|
| 544 | // and your file names are not unique |
---|
| 545 | $conf['picture_url_style'] = 'id'; |
---|
| 546 | |
---|
| 547 | // tag_url_style : one of 'id-tag' (default), 'id' or 'tag'. |
---|
| 548 | // Note that if you choose 'tag' and the url (ascii) representation of your |
---|
| 549 | // tags is not unique, all tags with the same url representation will be shown |
---|
| 550 | $conf['tag_url_style'] = 'id-tag'; |
---|
| 551 | |
---|
[1116] | 552 | // +-----------------------------------------------------------------------+ |
---|
[1119] | 553 | // | tags | |
---|
| 554 | // +-----------------------------------------------------------------------+ |
---|
| 555 | |
---|
| 556 | // full_tag_cloud_items_number: number of tags to show in the full tag |
---|
| 557 | // cloud. Only the most represented tags will be shown |
---|
| 558 | $conf['full_tag_cloud_items_number'] = 200; |
---|
| 559 | |
---|
[1537] | 560 | // menubar_tag_cloud_items_number: number of tags to show in the tag |
---|
| 561 | // cloud in the menubar. Only the most represented tags will be shown |
---|
| 562 | $conf['menubar_tag_cloud_items_number'] = 100; |
---|
| 563 | |
---|
| 564 | // content_tag_cloud_items_number: number of tags to show in the tag |
---|
| 565 | // cloud on the content page. Only the most represented tags will be shown |
---|
| 566 | $conf['content_tag_cloud_items_number'] = 12; |
---|
| 567 | |
---|
[1119] | 568 | // tags_levels: number of levels to use for display. Each level is bind to a |
---|
| 569 | // CSS class tagLevelX. |
---|
[1120] | 570 | $conf['tags_levels'] = 5; |
---|
[1119] | 571 | |
---|
| 572 | // +-----------------------------------------------------------------------+ |
---|
[1116] | 573 | // | Notification by mail | |
---|
| 574 | // +-----------------------------------------------------------------------+ |
---|
| 575 | |
---|
| 576 | // Default Value for nbm user |
---|
| 577 | $conf['nbm_default_value_user_enabled'] = false; |
---|
| 578 | |
---|
[1531] | 579 | // Search list user to send quickly (List all without to check news) |
---|
[1116] | 580 | // More quickly but less fun to use |
---|
| 581 | $conf['nbm_list_all_enabled_users_to_send'] = false; |
---|
| 582 | |
---|
[1531] | 583 | // Max time used on one pass in order to send mails. |
---|
| 584 | // Timeout delay ratio. |
---|
[1156] | 585 | $conf['nbm_max_treatment_timeout_percent'] = 0.8; |
---|
| 586 | |
---|
[1531] | 587 | // If timeout cannot be compite with nbm_max_treatment_timeout_percent, |
---|
| 588 | // nbm_treatment_timeout_default is used by default |
---|
| 589 | $conf['nbm_treatment_timeout_default'] = 20; |
---|
| 590 | |
---|
[1871] | 591 | // Parameters used in get_recent_post_dates for the 2 kind of notification |
---|
| 592 | $conf['recent_post_dates'] = array( |
---|
| 593 | 'RSS' => array('max_dates' => 5, 'max_elements' => 6, 'max_cats' => 6), |
---|
| 594 | 'NBM' => array('max_dates' => 7, 'max_elements' => 3, 'max_cats' => 9) |
---|
| 595 | ); |
---|
| 596 | |
---|
[1377] | 597 | // +-----------------------------------------------------------------------+ |
---|
| 598 | // | Set default admin layout | |
---|
| 599 | // +-----------------------------------------------------------------------+ |
---|
| 600 | |
---|
| 601 | // Must be user setable in future |
---|
[1410] | 602 | // Default value of admin layout |
---|
| 603 | // Step 1, default_admin_layout is not defined |
---|
| 604 | // null value, user_layout is used for admin layout |
---|
| 605 | // defined value, this value are used for admin layout |
---|
[1537] | 606 | // Next on step 2, default_admin_layout will be used |
---|
[1412] | 607 | // if there are not checked like admin layout |
---|
[1410] | 608 | // stored on user informations |
---|
| 609 | //$conf['default_admin_layout']='yoga/dark'; |
---|
[1377] | 610 | |
---|
[1616] | 611 | // should we load the active plugins ? true=Yes, false=No |
---|
| 612 | $conf['enable_plugins']=true; |
---|
[1660] | 613 | |
---|
| 614 | // +-----------------------------------------------------------------------+ |
---|
[1677] | 615 | // | Set default for Web Service | |
---|
[1660] | 616 | // +-----------------------------------------------------------------------+ |
---|
| 617 | |
---|
[1781] | 618 | // Web services are allowed (true) or completely forbidden (false) |
---|
| 619 | $conf['allow_web_services'] = true; |
---|
| 620 | |
---|
| 621 | // Maximum number of images to be returned foreach call to the web service |
---|
| 622 | $conf['ws_max_images_per_page'] = 500; |
---|
| 623 | |
---|
[1853] | 624 | // On Access control false / Admim Web Service need Php cURL extension |
---|
[1747] | 625 | // Controls are done on public basis or |
---|
| 626 | // if connected on member authorization basis |
---|
[1781] | 627 | $conf['ws_access_control'] = false; |
---|
[1747] | 628 | |
---|
| 629 | // On Access control true |
---|
| 630 | // Additionnal controls are made based on Web Service Access Table |
---|
| 631 | |
---|
[1660] | 632 | // Max returned rows number ( > 0 ) |
---|
| 633 | $conf['ws_allowed_limit'] = array(1,2,3,5,10,25); |
---|
| 634 | |
---|
| 635 | // By default can be delayed by 0, 1, 2, 3, 5, 7, 14 or 30 days |
---|
| 636 | // 0 it's Now(), don't remove that one |
---|
| 637 | $conf['ws_postponed_start'] = array(0,1,2,3,5,7,14,30); /* In days */ |
---|
| 638 | |
---|
| 639 | // By default 10, 5, 2, 1 year(s) or 6, 3, 1 month(s) |
---|
| 640 | // or 15, 10, 7, 5, 1, 0 day(s) |
---|
| 641 | // 0 it's temporary closed (Useful for one access) |
---|
| 642 | $conf['ws_durations'] = array(3650,1825,730,365,182,91,30,15,10,7,5,1,0); |
---|
| 643 | |
---|
[1677] | 644 | // +-----------------------------------------------------------------------+ |
---|
| 645 | // | Filter | |
---|
| 646 | // +-----------------------------------------------------------------------+ |
---|
[1722] | 647 | // $conf['filter_pages'] contains configuration for each pages |
---|
| 648 | // o If values are not defined for a specific page, default value are used |
---|
| 649 | // o Array is composed by the basename of each page without extention |
---|
| 650 | // o List of value names: |
---|
| 651 | // - used: filter function are used |
---|
| 652 | // (if false nothing is done [start, cancel, stop, ...] |
---|
| 653 | // - cancel: cancel current started filter |
---|
| 654 | // - add_notes: add notes about current started filter on the header |
---|
| 655 | // o Empty configuration in order to disable completely filter functions |
---|
| 656 | // No filter, No icon,... |
---|
| 657 | // $conf['filter_pages'] = array(); |
---|
[1677] | 658 | $conf['filter_pages'] = array |
---|
| 659 | ( |
---|
[1722] | 660 | // Default page |
---|
| 661 | 'default' => array( |
---|
| 662 | 'used' => true, 'cancel' => false, 'add_notes' => false), |
---|
| 663 | // Real pages |
---|
| 664 | 'index' => array('add_notes' => true), |
---|
| 665 | 'tags' => array('add_notes' => true), |
---|
| 666 | 'search' => array('add_notes' => true), |
---|
| 667 | 'comments' => array('add_notes' => true), |
---|
| 668 | 'admin' => array('used' => false), |
---|
| 669 | 'feed' => array('used' => false), |
---|
| 670 | 'notification' => array('used' => false), |
---|
| 671 | 'nbm' => array('used' => false), |
---|
| 672 | 'popuphelp' => array('used' => false), |
---|
| 673 | 'profile' => array('used' => false), |
---|
| 674 | 'web_service' => array('used' => false), |
---|
| 675 | 'ws' => array('used' => false), |
---|
| 676 | 'identification' => array('cancel' => true), |
---|
| 677 | 'install' => array('cancel' => true), |
---|
| 678 | 'password' => array('cancel' => true), |
---|
| 679 | 'register' => array('cancel' => true), |
---|
| 680 | 'upgrade_feed' => array('cancel' => true), |
---|
[1677] | 681 | ); |
---|
| 682 | |
---|
[1730] | 683 | // +-----------------------------------------------------------------------+ |
---|
| 684 | // | Light slideshow | |
---|
| 685 | // +-----------------------------------------------------------------------+ |
---|
| 686 | // $conf['light_slideshow'] indicates to use slideshow.tpl in state of |
---|
| 687 | // picture.tpl for slideshow |
---|
| 688 | // Take care to have slideshow.tpl in all available templates |
---|
| 689 | // Or set it false. |
---|
| 690 | // Check if Picture's plugins are compliant with it |
---|
| 691 | // Every plugin from 1.7 would be design to manage light_slideshow case. |
---|
| 692 | $conf['light_slideshow'] = true; |
---|
| 693 | |
---|
[770] | 694 | ?> |
---|