[770] | 1 | <?php |
---|
| 2 | // +-----------------------------------------------------------------------+ |
---|
[2297] | 3 | // | Piwigo - a PHP based picture gallery | |
---|
| 4 | // +-----------------------------------------------------------------------+ |
---|
[3046] | 5 | // | Copyright(C) 2008-2009 Piwigo Team http://piwigo.org | |
---|
[2297] | 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 | // +-----------------------------------------------------------------------+ |
---|
[770] | 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 |
---|
[870] | 33 | * config_local.inc.php. See tools/config_local.inc.php as an example. |
---|
[770] | 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 | |
---|
[858] | 42 | // +-----------------------------------------------------------------------+ |
---|
| 43 | // | misc | |
---|
| 44 | // +-----------------------------------------------------------------------+ |
---|
| 45 | |
---|
[770] | 46 | // order_by : how to change the order of display for images in a category ? |
---|
| 47 | // |
---|
| 48 | // There are several fields that can order the display : |
---|
| 49 | // |
---|
| 50 | // - date_available : the date of the adding to the gallery |
---|
| 51 | // - file : the name of the file |
---|
| 52 | // - id : element identifier |
---|
| 53 | // - date_creation : date of element creation |
---|
| 54 | // |
---|
| 55 | // Once you've chosen which field(s) to use for ordering, you must chose the |
---|
| 56 | // ascending or descending order for each field. examples : |
---|
| 57 | // |
---|
| 58 | // 1. $conf['order_by'] = " order by date_available desc, file asc"; |
---|
| 59 | // will order pictures by date_available descending & by filename ascending |
---|
| 60 | // |
---|
| 61 | // 2. $conf['order_by'] = " order by file asc"; |
---|
| 62 | // will only order pictures by file ascending without taking into account |
---|
| 63 | // the date_available |
---|
| 64 | $conf['order_by'] = ' ORDER BY date_available DESC, file ASC, id ASC'; |
---|
| 65 | |
---|
[2517] | 66 | // order_by_inside_category : inside a category, images can also be ordered |
---|
| 67 | // by rank. A manually defined rank on each image for the category. |
---|
| 68 | // |
---|
| 69 | // In addition to fields of #images table, you can use the |
---|
| 70 | // #image_category.rank column |
---|
| 71 | // |
---|
| 72 | // $conf['order_by_inside_category'] = ' ORDER BY rank'; |
---|
| 73 | // will sort images by the manually defined rank of images in this category. |
---|
| 74 | $conf['order_by_inside_category'] = $conf['order_by']; |
---|
| 75 | |
---|
[770] | 76 | // file_ext : file extensions (case sensitive) authorized |
---|
[1635] | 77 | $conf['file_ext'] = array('jpg','JPG','jpeg','JPEG', |
---|
| 78 | 'png','PNG','gif','GIF','mpg','zip', |
---|
[770] | 79 | 'avi','mp3','ogg'); |
---|
| 80 | |
---|
| 81 | // picture_ext : file extensions for picture file, must be a subset of |
---|
| 82 | // file_ext |
---|
[1635] | 83 | $conf['picture_ext'] = array('jpg','JPG','jpeg','JPEG', |
---|
| 84 | 'png','PNG','gif','GIF'); |
---|
[770] | 85 | |
---|
| 86 | // top_number : number of element to display for "best rated" and "most |
---|
| 87 | // visited" categories |
---|
| 88 | $conf['top_number'] = 15; |
---|
| 89 | |
---|
| 90 | // anti-flood_time : number of seconds between 2 comments : 0 to disable |
---|
| 91 | $conf['anti-flood_time'] = 60; |
---|
| 92 | |
---|
[1610] | 93 | // qualified spam comments are not registered (false will register them |
---|
| 94 | // but they will require admin validation) |
---|
| 95 | $conf['comment_spam_reject'] = true; |
---|
| 96 | |
---|
| 97 | // maximum number of links in a comment before it is qualified spam |
---|
| 98 | $conf['comment_spam_max_links'] = 3; |
---|
| 99 | |
---|
[858] | 100 | // calendar_datefield : date field of table "images" used for calendar |
---|
| 101 | // catgory |
---|
| 102 | $conf['calendar_datefield'] = 'date_creation'; |
---|
| 103 | |
---|
[1057] | 104 | // calendar_show_any : the calendar shows an aditional 'any' button in the |
---|
| 105 | // year/month/week/day navigation bars |
---|
| 106 | $conf['calendar_show_any'] = true; |
---|
| 107 | |
---|
[1059] | 108 | // calendar_show_empty : the calendar shows month/weeks/days even if there are |
---|
| 109 | //no elements for these |
---|
| 110 | $conf['calendar_show_empty'] = true; |
---|
| 111 | |
---|
[1061] | 112 | // calendar_month_cell_width, calendar_month_cell_height : define the |
---|
| 113 | // width and the height of a cell in the monthly calendar when viewing a |
---|
| 114 | // given month. a value of 0 means that the pretty view is not shown. |
---|
| 115 | // a good suggestion would be to have the width and the height equal |
---|
[1837] | 116 | // and smaller than tn_width and tn_height. |
---|
[1061] | 117 | $conf['calendar_month_cell_width'] =80; |
---|
| 118 | $conf['calendar_month_cell_height']=80; |
---|
| 119 | |
---|
[858] | 120 | // newcat_default_commentable : at creation, must a category be commentable |
---|
| 121 | // or not ? |
---|
[1278] | 122 | $conf['newcat_default_commentable'] = true; |
---|
[858] | 123 | |
---|
| 124 | // newcat_default_uploadable : at creation, must a category be uploadable or |
---|
| 125 | // not ? |
---|
[1278] | 126 | $conf['newcat_default_uploadable'] = false; |
---|
[858] | 127 | |
---|
| 128 | // newcat_default_visible : at creation, must a category be visible or not ? |
---|
| 129 | // Warning : if the parent category is invisible, the category is |
---|
| 130 | // automatically create invisible. (invisible = locked) |
---|
[1278] | 131 | $conf['newcat_default_visible'] = true; |
---|
[858] | 132 | |
---|
| 133 | // newcat_default_status : at creation, must a category be public or private |
---|
| 134 | // ? Warning : if the parent category is private, the category is |
---|
| 135 | // automatically create private. |
---|
| 136 | $conf['newcat_default_status'] = 'public'; |
---|
| 137 | |
---|
| 138 | // level_separator : character string used for separating a category level |
---|
| 139 | // to the sub level. Suggestions : ' / ', ' » ', ' → ', ' - ', |
---|
| 140 | // ' >' |
---|
| 141 | $conf['level_separator'] = ' / '; |
---|
| 142 | |
---|
| 143 | // paginate_pages_around : on paginate navigation bar, how many pages |
---|
| 144 | // display before and after the current page ? |
---|
| 145 | $conf['paginate_pages_around'] = 2; |
---|
| 146 | |
---|
| 147 | // tn_width : default width for thumbnails creation |
---|
| 148 | $conf['tn_width'] = 128; |
---|
| 149 | |
---|
| 150 | // tn_height : default height for thumbnails creation |
---|
[937] | 151 | $conf['tn_height'] = 128; |
---|
[858] | 152 | |
---|
[3270] | 153 | // tn_compression_level: compression level for thumbnail creation. 0 is low |
---|
| 154 | // quality, 100 is high quality. |
---|
| 155 | $conf['tn_compression_level'] = 75; |
---|
| 156 | |
---|
[2339] | 157 | // show_version : shall the version of Piwigo be displayed at the |
---|
[858] | 158 | // bottom of each page ? |
---|
| 159 | $conf['show_version'] = true; |
---|
| 160 | |
---|
[3040] | 161 | // meta_ref to reference multiple sets of incorporated pages or elements |
---|
| 162 | // Set it false to avoid referencing in google, and other search engines. |
---|
| 163 | $conf['meta_ref'] = true; |
---|
[1763] | 164 | |
---|
[858] | 165 | // links : list of external links to add in the menu. An example is the best |
---|
| 166 | // than a long explanation : |
---|
| 167 | // |
---|
[1728] | 168 | // Simple use: |
---|
| 169 | // for each link is associated a label |
---|
| 170 | // $conf['links'] = array( |
---|
[2339] | 171 | // 'http://piwigo.org' => 'PWG website', |
---|
[3132] | 172 | // 'http://piwigo.org/forum' => 'PWG forum', |
---|
[1728] | 173 | // ); |
---|
[858] | 174 | // |
---|
[1728] | 175 | // Advenced use: |
---|
[2084] | 176 | // You can also used special options. Instead to pass a string like parameter value |
---|
[1728] | 177 | // you can pass a array with different optional parameter values |
---|
| 178 | // $conf['links'] = array( |
---|
[2339] | 179 | // 'http://piwigo.org' => array('label' => 'PWG website', 'new_window' => false, 'eval_visible' => 'return true;'), |
---|
[3132] | 180 | // 'http://piwigo.org/forum' => array('label' => 'For ADMIN', 'new_window' => true, 'eval_visible' => 'return is_admin();'), |
---|
| 181 | // 'http://piwigo.org/ext' => array('label' => 'For Guest', 'new_window' => true, 'eval_visible' => 'return is_a_guest();'), |
---|
| 182 | // 'http://piwigo.org/downloads' => |
---|
[2084] | 183 | // array('label' => 'PopUp', 'new_window' => true, |
---|
[1743] | 184 | // 'nw_name' => 'PopUp', 'nw_features' => 'width=800,height=450,location=no,status=no,toolbar=no,scrollbars=no,menubar=no'), |
---|
[1728] | 185 | // ); |
---|
[1736] | 186 | // Parameters: |
---|
| 187 | // 'label': |
---|
| 188 | // Label to display for the link, must be defined |
---|
| 189 | // 'new_window': |
---|
| 190 | // If true open link on tab/window |
---|
| 191 | // [Default value is true if it's not defined] |
---|
[1743] | 192 | // 'nw_name': |
---|
| 193 | // Name use when new_window is true |
---|
| 194 | // [Default value is '' if it's not defined] |
---|
| 195 | // 'nw_features': |
---|
| 196 | // features use when new_window is true |
---|
| 197 | // [Default value is '' if it's not defined] |
---|
[1736] | 198 | // 'eval_visible': |
---|
| 199 | // It's php code witch must return if the link is visible or not |
---|
| 200 | // [Default value is true if it's not defined] |
---|
| 201 | // |
---|
[1728] | 202 | // Equivalence: |
---|
| 203 | // $conf['links'] = array( |
---|
[2339] | 204 | // 'http://piwigo.org' => 'PWG website', |
---|
[1728] | 205 | // ); |
---|
| 206 | // $conf['links'] = array( |
---|
[2339] | 207 | // 'http://piwigo.org' => array('label' => 'PWG website', 'new_window' => false, 'visible' => 'return true;'), |
---|
[1728] | 208 | // ); |
---|
| 209 | // |
---|
[858] | 210 | // If the array is empty, the "Links" box won't be displayed on the main |
---|
| 211 | // page. |
---|
| 212 | $conf['links'] = array(); |
---|
| 213 | |
---|
[1788] | 214 | // random_index_redirect: list of 'internal' links to use when no section is defined on index.php. |
---|
| 215 | // An example is the best than a long explanation : |
---|
| 216 | // |
---|
| 217 | // for each link is associated a php condition |
---|
| 218 | // '' condition is equivalent to 'return true;' |
---|
| 219 | // $conf['random_index_redirect'] = array( |
---|
| 220 | // PHPWG_ROOT_PATH.'index.php?/best_rated' => 'return true;', |
---|
[2029] | 221 | // PHPWG_ROOT_PATH.'index.php?/recent_pics' => 'return is_a_guest();', |
---|
[1788] | 222 | // PHPWG_ROOT_PATH.'random.php' => '', |
---|
| 223 | // PHPWG_ROOT_PATH.'index.php?/categories' => '', |
---|
| 224 | // ); |
---|
| 225 | $conf['random_index_redirect'] = array(); |
---|
| 226 | |
---|
[3090] | 227 | // reverse_home_title: if Piwigo is your home page for a better robot index |
---|
| 228 | // we recommend to set it true (Only index page will reverse its title) |
---|
| 229 | $conf['reverse_home_title'] = false; |
---|
| 230 | |
---|
[1677] | 231 | // List of notes to display on all header page |
---|
| 232 | // example $conf['header_notes'] = array('Test', 'Hello'); |
---|
| 233 | $conf['header_notes'] = array(); |
---|
| 234 | |
---|
[858] | 235 | // show_thumbnail_caption : on thumbnails page, show thumbnail captions ? |
---|
| 236 | $conf['show_thumbnail_caption'] = true; |
---|
| 237 | |
---|
| 238 | // show_picture_name_on_title : on picture presentation page, show picture |
---|
| 239 | // name ? |
---|
| 240 | $conf['show_picture_name_on_title'] = true; |
---|
| 241 | |
---|
[2802] | 242 | // display_fromto: display the date creation bounds of a |
---|
[1970] | 243 | // category. |
---|
| 244 | $conf['display_fromto'] = false; |
---|
| 245 | |
---|
[2339] | 246 | // allow_random_representative : do you wish Piwigo to search among |
---|
[858] | 247 | // categories elements a new representative at each reload ? |
---|
| 248 | // |
---|
| 249 | // If false, an element is randomly or manually chosen to represent its |
---|
| 250 | // category and remains the representative as long as an admin does not |
---|
| 251 | // change it. |
---|
| 252 | // |
---|
| 253 | // Warning : setting this parameter to true is CPU consuming. Each time you |
---|
| 254 | // change the value of this parameter from false to true, an administrator |
---|
| 255 | // must update categories informations in screen [Admin > General > |
---|
| 256 | // Maintenance]. |
---|
| 257 | $conf['allow_random_representative'] = false; |
---|
| 258 | |
---|
| 259 | // allow_html_descriptions : authorize administrators to use HTML in |
---|
| 260 | // category and element description. |
---|
| 261 | $conf['allow_html_descriptions'] = true; |
---|
| 262 | |
---|
[862] | 263 | // prefix_thumbnail : string before filename. Thumbnail's prefix must only |
---|
| 264 | // contain characters among : a to z (case insensitive), "-" or "_". |
---|
[858] | 265 | $conf['prefix_thumbnail'] = 'TN-'; |
---|
| 266 | |
---|
[880] | 267 | // users_page: how many users to display in screen |
---|
| 268 | // Administration>Identification>Users? |
---|
| 269 | $conf['users_page'] = 20; |
---|
| 270 | |
---|
[2084] | 271 | // image level permissions available in the admin interface |
---|
| 272 | $conf['available_permission_levels'] = array(0,1,2,4,8); |
---|
| 273 | |
---|
[901] | 274 | // mail_options: only set it true if you have a send mail warning with |
---|
| 275 | // "options" parameter missing on mail() function execution. |
---|
| 276 | $conf['mail_options'] = false; |
---|
| 277 | |
---|
[1021] | 278 | // send_bcc_mail_webmaster: send bcc mail to webmaster. Set true for debug |
---|
| 279 | // or test. |
---|
[1018] | 280 | $conf['send_bcc_mail_webmaster'] = false; |
---|
| 281 | |
---|
[1642] | 282 | // default_email_format: |
---|
| 283 | // Define the default email format use to send email |
---|
| 284 | // Value could be text/plain or text/html |
---|
[1905] | 285 | $conf['default_email_format'] = 'text/html'; |
---|
[1642] | 286 | |
---|
[3937] | 287 | // alternative_email_format: |
---|
| 288 | // Define the alternative email format use to send email |
---|
| 289 | // Value could be text/plain or text/html |
---|
| 290 | $conf['alternative_email_format'] = 'text/plain'; |
---|
| 291 | |
---|
[2284] | 292 | // define the name of sender mail: |
---|
| 293 | // If value is empty, gallery title is used |
---|
| 294 | $conf['mail_sender_name'] = ''; |
---|
| 295 | |
---|
[2106] | 296 | // smtp configuration |
---|
| 297 | // (work if fsockopen function is allowed for smtp port) |
---|
| 298 | // smtp_host: smtp server host |
---|
| 299 | // if null, regular mail function is used |
---|
| 300 | // format: hoststring[:port] |
---|
| 301 | // exemple: smtp.pwg.net:21 |
---|
| 302 | // smtp_user/smtp_password: user & password for smtp identication |
---|
| 303 | $conf['smtp_host'] = ''; |
---|
| 304 | $conf['smtp_user'] = ''; |
---|
| 305 | $conf['smtp_password'] = ''; |
---|
| 306 | |
---|
| 307 | |
---|
[953] | 308 | // check_upgrade_feed: check if there are database upgrade required. Set to |
---|
| 309 | // true, a message will strongly encourage you to upgrade your database if |
---|
| 310 | // needed. |
---|
| 311 | // |
---|
| 312 | // This configuration parameter is set to true in BSF branch and to false |
---|
| 313 | // elsewhere. |
---|
| 314 | $conf['check_upgrade_feed'] = true; |
---|
| 315 | |
---|
[1084] | 316 | // rate_items: available rates for a picture |
---|
| 317 | $conf['rate_items'] = array(0,1,2,3,4,5); |
---|
| 318 | |
---|
[1649] | 319 | // Define default method to use ('http' or 'html' in order to do redirect) |
---|
| 320 | $conf['default_redirect_method'] = 'http'; |
---|
| 321 | |
---|
[3945] | 322 | // Define using double password type in admin's users management panel |
---|
| 323 | $conf['double_password_type_in_admin'] = false; |
---|
| 324 | |
---|
[4953] | 325 | // how should we check for unicity when adding a photo. Can be 'md5sum' or |
---|
| 326 | // 'filename' |
---|
| 327 | $conf['uniqueness_mode'] = 'md5sum'; |
---|
| 328 | |
---|
[858] | 329 | // +-----------------------------------------------------------------------+ |
---|
| 330 | // | metadata | |
---|
| 331 | // +-----------------------------------------------------------------------+ |
---|
| 332 | |
---|
| 333 | // show_iptc: Show IPTC metadata on picture.php if asked by user |
---|
| 334 | $conf['show_iptc'] = false; |
---|
| 335 | |
---|
[770] | 336 | // show_iptc_mapping : is used for showing IPTC metadata on picture.php |
---|
| 337 | // page. For each key of the array, you need to have the same key in the |
---|
| 338 | // $lang array. For example, if my first key is 'iptc_keywords' (associated |
---|
| 339 | // to '2#025') then you need to have $lang['iptc_keywords'] set in |
---|
| 340 | // language/$user['language']/common.lang.php. If you don't have the lang |
---|
| 341 | // var set, the key will be simply displayed |
---|
| 342 | // |
---|
| 343 | // To know how to associated iptc_field with their meaning, use |
---|
| 344 | // tools/metadata.php |
---|
| 345 | $conf['show_iptc_mapping'] = array( |
---|
| 346 | 'iptc_keywords' => '2#025', |
---|
| 347 | 'iptc_caption_writer' => '2#122', |
---|
| 348 | 'iptc_byline_title' => '2#085', |
---|
| 349 | 'iptc_caption' => '2#120' |
---|
| 350 | ); |
---|
| 351 | |
---|
[858] | 352 | // use_iptc: Use IPTC data during database synchronization with files |
---|
| 353 | // metadata |
---|
| 354 | $conf['use_iptc'] = false; |
---|
| 355 | |
---|
[2339] | 356 | // use_iptc_mapping : in which IPTC fields will Piwigo find image |
---|
[770] | 357 | // information ? This setting is used during metadata synchronisation. It |
---|
[2339] | 358 | // associates a piwigo_images column name to a IPTC key |
---|
[770] | 359 | $conf['use_iptc_mapping'] = array( |
---|
| 360 | 'keywords' => '2#025', |
---|
| 361 | 'date_creation' => '2#055', |
---|
| 362 | 'author' => '2#122', |
---|
| 363 | 'name' => '2#005', |
---|
| 364 | 'comment' => '2#120' |
---|
| 365 | ); |
---|
| 366 | |
---|
[858] | 367 | // show_exif: Show EXIF metadata on picture.php (table or line presentation |
---|
| 368 | // avalaible) |
---|
| 369 | $conf['show_exif'] = true; |
---|
| 370 | |
---|
[770] | 371 | // show_exif_fields : in EXIF fields, you can choose to display fields in |
---|
| 372 | // sub-arrays, for example ['COMPUTED']['ApertureFNumber']. for this, add |
---|
| 373 | // 'COMPUTED;ApertureFNumber' in $conf['show_exif_fields'] |
---|
| 374 | // |
---|
| 375 | // The key displayed in picture.php will be $lang['exif_field_Make'] for |
---|
| 376 | // example and if it exists. For compound fields, only take into account the |
---|
| 377 | // last part : for key 'COMPUTED;ApertureFNumber', you need |
---|
| 378 | // $lang['exif_field_ApertureFNumber'] |
---|
| 379 | // |
---|
| 380 | // for PHP version newer than 4.1.2 : |
---|
| 381 | // $conf['show_exif_fields'] = array('CameraMake','CameraModel','DateTime'); |
---|
[1059] | 382 | // |
---|
[858] | 383 | $conf['show_exif_fields'] = array( |
---|
| 384 | 'Make', |
---|
| 385 | 'Model', |
---|
| 386 | 'DateTimeOriginal', |
---|
| 387 | 'COMPUTED;ApertureFNumber' |
---|
| 388 | ); |
---|
[770] | 389 | |
---|
[858] | 390 | // use_exif: Use EXIF data during database synchronization with files |
---|
| 391 | // metadata |
---|
[1682] | 392 | $conf['use_exif'] = true; |
---|
[770] | 393 | |
---|
[858] | 394 | // use_exif_mapping: same behaviour as use_iptc_mapping |
---|
| 395 | $conf['use_exif_mapping'] = array( |
---|
| 396 | 'date_creation' => 'DateTimeOriginal' |
---|
| 397 | ); |
---|
[770] | 398 | |
---|
[858] | 399 | // +-----------------------------------------------------------------------+ |
---|
| 400 | // | sessions | |
---|
| 401 | // +-----------------------------------------------------------------------+ |
---|
| 402 | |
---|
[1059] | 403 | // session_use_cookies: specifies to use cookie to store |
---|
[1007] | 404 | // the session id on client side |
---|
| 405 | $conf['session_use_cookies'] = true; |
---|
[1004] | 406 | |
---|
[1059] | 407 | // session_use_only_cookies: specifies to only use cookie to store |
---|
[1007] | 408 | // the session id on client side |
---|
| 409 | $conf['session_use_only_cookies'] = true; |
---|
[1004] | 410 | |
---|
[1007] | 411 | // session_use_trans_sid: do not use transparent session id support |
---|
| 412 | $conf['session_use_trans_sid'] = false; |
---|
[1004] | 413 | |
---|
[1007] | 414 | // session_name: specifies the name of the session which is used as cookie name |
---|
[1004] | 415 | $conf['session_name'] = 'pwg_id'; |
---|
| 416 | |
---|
[1059] | 417 | // session_save_handler: comment the line below |
---|
[1007] | 418 | // to use file handler for sessions. |
---|
[1004] | 419 | $conf['session_save_handler'] = 'db'; |
---|
| 420 | |
---|
[858] | 421 | // authorize_remembering : permits user to stay logged for a long time. It |
---|
| 422 | // creates a cookie on client side. |
---|
| 423 | $conf['authorize_remembering'] = true; |
---|
| 424 | |
---|
[1493] | 425 | // remember_me_name: specifies the name of the cookie used to stay logged |
---|
| 426 | $conf['remember_me_name'] = 'pwg_remember'; |
---|
| 427 | |
---|
[770] | 428 | // remember_me_length : time of validity for "remember me" cookies, in |
---|
| 429 | // seconds. |
---|
[1568] | 430 | $conf['remember_me_length'] = 5184000; |
---|
[770] | 431 | |
---|
[1568] | 432 | // session_length : time of validity for normal session, in seconds. |
---|
| 433 | $conf['session_length'] = 3600; |
---|
| 434 | |
---|
[858] | 435 | // +-----------------------------------------------------------------------+ |
---|
[2789] | 436 | // | debug/performance | |
---|
[858] | 437 | // +-----------------------------------------------------------------------+ |
---|
[770] | 438 | |
---|
| 439 | // show_queries : for debug purpose, show queries and execution times |
---|
| 440 | $conf['show_queries'] = false; |
---|
| 441 | |
---|
| 442 | // show_gt : display generation time at the bottom of each page |
---|
| 443 | $conf['show_gt'] = true; |
---|
| 444 | |
---|
[858] | 445 | // debug_l10n : display a warning message each time an unset language key is |
---|
| 446 | // accessed |
---|
| 447 | $conf['debug_l10n'] = false; |
---|
[770] | 448 | |
---|
[2216] | 449 | // activate template debugging - a new window will appear |
---|
| 450 | $conf['debug_template'] = false; |
---|
| 451 | |
---|
[1221] | 452 | // die_on_sql_error: if an SQL query fails, should everything stop? |
---|
| 453 | $conf['die_on_sql_error'] = true; |
---|
| 454 | |
---|
[2789] | 455 | // if true, some language strings are replaced during template compilation |
---|
| 456 | // (insted of template output). this results in better performance. however |
---|
| 457 | // any change in the language file will not be propagated until you purge |
---|
| 458 | // the compiled templates from the admin / maintenance menu |
---|
| 459 | $conf['compiled_template_cache_language'] = false; |
---|
| 460 | |
---|
| 461 | // This tells Smarty whether to check for recompiling or not. Recompiling |
---|
| 462 | // does not need to happen unless a template is changed. false results in |
---|
| 463 | // better performance. |
---|
| 464 | $conf['template_compile_check'] = true; |
---|
| 465 | |
---|
[2858] | 466 | // this permit to show the php errors reporting (see INI 'error_reporting' |
---|
| 467 | // for possible values) |
---|
| 468 | // gives an empty value '' to deactivate |
---|
| 469 | $conf['show_php_errors'] = E_ALL; |
---|
| 470 | |
---|
[858] | 471 | // +-----------------------------------------------------------------------+ |
---|
| 472 | // | authentication | |
---|
| 473 | // +-----------------------------------------------------------------------+ |
---|
[770] | 474 | |
---|
[804] | 475 | // apache_authentication : use Apache authentication as reference instead of |
---|
| 476 | // users table ? |
---|
| 477 | $conf['apache_authentication'] = false; |
---|
[808] | 478 | |
---|
[2104] | 479 | // users_table: which table is the reference for users? Can be a different |
---|
[2339] | 480 | // table than Piwigo table |
---|
[865] | 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 | // |
---|
[2339] | 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 average_rate = null; |
---|
| 493 | // delete from piwigo_caddie; |
---|
| 494 | // delete from piwigo_favorites; |
---|
[865] | 495 | // |
---|
| 496 | // All informations contained in these tables and column are related to |
---|
[2339] | 497 | // piwigo_users table. |
---|
[2104] | 498 | $conf['users_table'] = $prefixeTable.'users'; |
---|
[808] | 499 | |
---|
[2104] | 500 | // Other tables can be changed, if you define associated constants |
---|
| 501 | // Example: |
---|
| 502 | // define('USER_INFOS_TABLE', 'pwg_main'.'user_infos'); |
---|
[2096] | 503 | |
---|
[2104] | 504 | |
---|
[808] | 505 | // user_fields : mapping between generic field names and table specific |
---|
| 506 | // field names. For example, in PWG, the mail address is names |
---|
| 507 | // "mail_address" and in punbb, it's called "email". |
---|
| 508 | $conf['user_fields'] = array( |
---|
| 509 | 'id' => 'id', |
---|
| 510 | 'username' => 'username', |
---|
| 511 | 'password' => 'password', |
---|
| 512 | 'email' => 'mail_address' |
---|
| 513 | ); |
---|
| 514 | |
---|
| 515 | // pass_convert : function to crypt or hash the clear user password to store |
---|
| 516 | // it in the database |
---|
| 517 | $conf['pass_convert'] = create_function('$s', 'return md5($s);'); |
---|
| 518 | |
---|
| 519 | // guest_id : id of the anonymous user |
---|
| 520 | $conf['guest_id'] = 2; |
---|
[1926] | 521 | // default_user_id : id of user used for default value |
---|
| 522 | $conf['default_user_id'] = $conf['guest_id']; |
---|
[809] | 523 | |
---|
[2371] | 524 | // Registering process and guest/generic members get language from the browser |
---|
| 525 | // if language isn't available PHPWG_DEFAULT_LANGUAGE is used as previously |
---|
| 526 | $conf['browser_language'] = true; |
---|
| 527 | |
---|
[858] | 528 | // webmaster_id : webmaster'id. |
---|
| 529 | $conf['webmaster_id'] = 1; |
---|
[825] | 530 | |
---|
[1087] | 531 | // allow to use adviser mode |
---|
| 532 | $conf['allow_adviser'] = false; |
---|
| 533 | |
---|
[1470] | 534 | // does the guest have access ? |
---|
| 535 | // (not a security feature, set your categories "private" too) |
---|
| 536 | // If false it'll be redirected from index.php to identification.php |
---|
| 537 | $conf['guest_access'] = true; |
---|
| 538 | |
---|
[858] | 539 | // +-----------------------------------------------------------------------+ |
---|
| 540 | // | upload | |
---|
| 541 | // +-----------------------------------------------------------------------+ |
---|
[833] | 542 | |
---|
[858] | 543 | // upload_maxfilesize: maximum filesize for the uploaded pictures. In |
---|
| 544 | // kilobytes. |
---|
| 545 | $conf['upload_maxfilesize'] = 200; |
---|
[833] | 546 | |
---|
[858] | 547 | // upload_maxheight: maximum height authorized for the uploaded images. In |
---|
| 548 | // pixels. |
---|
| 549 | $conf['upload_maxheight'] = 800; |
---|
[850] | 550 | |
---|
[858] | 551 | // upload_maxwidth: maximum width authorized for the uploaded images. In |
---|
[900] | 552 | // pixels. |
---|
[858] | 553 | $conf['upload_maxwidth'] = 800; |
---|
[850] | 554 | |
---|
[858] | 555 | // upload_maxheight_thumbnail: maximum height authorized for the uploaded |
---|
| 556 | // thumbnails |
---|
[1848] | 557 | $conf['upload_maxheight_thumbnail'] = 128; |
---|
[858] | 558 | |
---|
| 559 | // upload_maxwidth_thumbnail: maximum width authorized for the uploaded |
---|
| 560 | // thumbnails |
---|
[1848] | 561 | $conf['upload_maxwidth_thumbnail'] = 128; |
---|
[894] | 562 | |
---|
| 563 | // +-----------------------------------------------------------------------+ |
---|
[901] | 564 | // | history | |
---|
[894] | 565 | // +-----------------------------------------------------------------------+ |
---|
| 566 | |
---|
| 567 | // nb_logs_page : how many logs to display on a page |
---|
| 568 | $conf['nb_logs_page'] = 300; |
---|
| 569 | |
---|
[1094] | 570 | // +-----------------------------------------------------------------------+ |
---|
| 571 | // | urls | |
---|
| 572 | // +-----------------------------------------------------------------------+ |
---|
| 573 | |
---|
| 574 | // question_mark_in_urls : the generated urls contain a ? sign. This can be |
---|
| 575 | // changed to false only if the server translates PATH_INFO variable |
---|
| 576 | // (depends on the server AcceptPathInfo directive configuration) |
---|
| 577 | $conf['question_mark_in_urls'] = true; |
---|
| 578 | |
---|
| 579 | // php_extension_in_urls : if true, the urls generated for picture and |
---|
| 580 | // category will not contain the .php extension. This will work only if |
---|
| 581 | // .htaccess defines Options +MultiViews parameter or url rewriting rules |
---|
| 582 | // are active. |
---|
| 583 | $conf['php_extension_in_urls'] = true; |
---|
| 584 | |
---|
[1131] | 585 | // category_url_style : one of 'id' (default) or 'id-name'. 'id-name' |
---|
| 586 | // means that an simplified ascii represntation of the category name will |
---|
| 587 | // appear in the url |
---|
| 588 | $conf['category_url_style'] = 'id'; |
---|
| 589 | |
---|
| 590 | // picture_url_style : one of 'id' (default), 'id-file' or 'file'. 'id-file' |
---|
| 591 | // or 'file' mean that the file name (without extension will appear in the |
---|
| 592 | // url). Note that one aditionnal sql query will occur if 'file' is choosen. |
---|
| 593 | // Note that you might experience navigation issues if you choose 'file' |
---|
| 594 | // and your file names are not unique |
---|
| 595 | $conf['picture_url_style'] = 'id'; |
---|
| 596 | |
---|
| 597 | // tag_url_style : one of 'id-tag' (default), 'id' or 'tag'. |
---|
| 598 | // Note that if you choose 'tag' and the url (ascii) representation of your |
---|
| 599 | // tags is not unique, all tags with the same url representation will be shown |
---|
| 600 | $conf['tag_url_style'] = 'id-tag'; |
---|
| 601 | |
---|
[1116] | 602 | // +-----------------------------------------------------------------------+ |
---|
[1119] | 603 | // | tags | |
---|
| 604 | // +-----------------------------------------------------------------------+ |
---|
| 605 | |
---|
| 606 | // full_tag_cloud_items_number: number of tags to show in the full tag |
---|
| 607 | // cloud. Only the most represented tags will be shown |
---|
| 608 | $conf['full_tag_cloud_items_number'] = 200; |
---|
| 609 | |
---|
[1537] | 610 | // menubar_tag_cloud_items_number: number of tags to show in the tag |
---|
| 611 | // cloud in the menubar. Only the most represented tags will be shown |
---|
| 612 | $conf['menubar_tag_cloud_items_number'] = 100; |
---|
| 613 | |
---|
| 614 | // content_tag_cloud_items_number: number of tags to show in the tag |
---|
| 615 | // cloud on the content page. Only the most represented tags will be shown |
---|
| 616 | $conf['content_tag_cloud_items_number'] = 12; |
---|
| 617 | |
---|
[1119] | 618 | // tags_levels: number of levels to use for display. Each level is bind to a |
---|
| 619 | // CSS class tagLevelX. |
---|
[1120] | 620 | $conf['tags_levels'] = 5; |
---|
[1119] | 621 | |
---|
[2362] | 622 | // tags_default_display_mode: group tags by letter or display a tag cloud by |
---|
| 623 | // default? 'letters' or 'cloud'. |
---|
| 624 | $conf['tags_default_display_mode'] = 'cloud'; |
---|
| 625 | |
---|
| 626 | // tag_letters_column_number: how many columns to display tags by letter |
---|
| 627 | $conf['tag_letters_column_number'] = 4; |
---|
| 628 | |
---|
[1119] | 629 | // +-----------------------------------------------------------------------+ |
---|
[1116] | 630 | // | Notification by mail | |
---|
| 631 | // +-----------------------------------------------------------------------+ |
---|
| 632 | |
---|
| 633 | // Default Value for nbm user |
---|
| 634 | $conf['nbm_default_value_user_enabled'] = false; |
---|
| 635 | |
---|
[1531] | 636 | // Search list user to send quickly (List all without to check news) |
---|
[1116] | 637 | // More quickly but less fun to use |
---|
| 638 | $conf['nbm_list_all_enabled_users_to_send'] = false; |
---|
| 639 | |
---|
[1531] | 640 | // Max time used on one pass in order to send mails. |
---|
| 641 | // Timeout delay ratio. |
---|
[1156] | 642 | $conf['nbm_max_treatment_timeout_percent'] = 0.8; |
---|
| 643 | |
---|
[1531] | 644 | // If timeout cannot be compite with nbm_max_treatment_timeout_percent, |
---|
| 645 | // nbm_treatment_timeout_default is used by default |
---|
| 646 | $conf['nbm_treatment_timeout_default'] = 20; |
---|
| 647 | |
---|
[1871] | 648 | // Parameters used in get_recent_post_dates for the 2 kind of notification |
---|
| 649 | $conf['recent_post_dates'] = array( |
---|
| 650 | 'RSS' => array('max_dates' => 5, 'max_elements' => 6, 'max_cats' => 6), |
---|
| 651 | 'NBM' => array('max_dates' => 7, 'max_elements' => 3, 'max_cats' => 9) |
---|
| 652 | ); |
---|
| 653 | |
---|
[2595] | 654 | // the author shown in the RSS feed <author> element |
---|
| 655 | $conf['rss_feed_author'] = 'Piwigo notifier'; |
---|
| 656 | |
---|
[1377] | 657 | // +-----------------------------------------------------------------------+ |
---|
[2313] | 658 | // | Set admin layout | |
---|
[1377] | 659 | // +-----------------------------------------------------------------------+ |
---|
| 660 | |
---|
[2530] | 661 | $conf['admin_layout'] = 'goto/roma'; |
---|
[1377] | 662 | |
---|
[1616] | 663 | // should we load the active plugins ? true=Yes, false=No |
---|
| 664 | $conf['enable_plugins']=true; |
---|
[1660] | 665 | |
---|
[1781] | 666 | // Web services are allowed (true) or completely forbidden (false) |
---|
| 667 | $conf['allow_web_services'] = true; |
---|
| 668 | |
---|
[3661] | 669 | // enable log for web services |
---|
| 670 | $conf['ws_enable_log'] = false; |
---|
| 671 | |
---|
| 672 | // web services log file path |
---|
| 673 | $conf['ws_log_filepath'] = '/tmp/piwigo_ws.log'; |
---|
| 674 | |
---|
[1781] | 675 | // Maximum number of images to be returned foreach call to the web service |
---|
| 676 | $conf['ws_max_images_per_page'] = 500; |
---|
| 677 | |
---|
[3381] | 678 | // Display a link to subscribe to Piwigo Announcements Newsletter |
---|
| 679 | $conf['show_newsletter_subscription'] = true; |
---|
| 680 | |
---|
[1677] | 681 | // +-----------------------------------------------------------------------+ |
---|
| 682 | // | Filter | |
---|
| 683 | // +-----------------------------------------------------------------------+ |
---|
[1722] | 684 | // $conf['filter_pages'] contains configuration for each pages |
---|
| 685 | // o If values are not defined for a specific page, default value are used |
---|
| 686 | // o Array is composed by the basename of each page without extention |
---|
| 687 | // o List of value names: |
---|
| 688 | // - used: filter function are used |
---|
| 689 | // (if false nothing is done [start, cancel, stop, ...] |
---|
| 690 | // - cancel: cancel current started filter |
---|
| 691 | // - add_notes: add notes about current started filter on the header |
---|
| 692 | // o Empty configuration in order to disable completely filter functions |
---|
| 693 | // No filter, No icon,... |
---|
| 694 | // $conf['filter_pages'] = array(); |
---|
[1677] | 695 | $conf['filter_pages'] = array |
---|
| 696 | ( |
---|
[1722] | 697 | // Default page |
---|
| 698 | 'default' => array( |
---|
| 699 | 'used' => true, 'cancel' => false, 'add_notes' => false), |
---|
| 700 | // Real pages |
---|
| 701 | 'index' => array('add_notes' => true), |
---|
| 702 | 'tags' => array('add_notes' => true), |
---|
| 703 | 'search' => array('add_notes' => true), |
---|
| 704 | 'comments' => array('add_notes' => true), |
---|
| 705 | 'admin' => array('used' => false), |
---|
| 706 | 'feed' => array('used' => false), |
---|
| 707 | 'notification' => array('used' => false), |
---|
| 708 | 'nbm' => array('used' => false), |
---|
| 709 | 'popuphelp' => array('used' => false), |
---|
| 710 | 'profile' => array('used' => false), |
---|
| 711 | 'ws' => array('used' => false), |
---|
| 712 | 'identification' => array('cancel' => true), |
---|
| 713 | 'install' => array('cancel' => true), |
---|
| 714 | 'password' => array('cancel' => true), |
---|
| 715 | 'register' => array('cancel' => true), |
---|
[1677] | 716 | ); |
---|
| 717 | |
---|
[1730] | 718 | // +-----------------------------------------------------------------------+ |
---|
[2218] | 719 | // | Slideshow | |
---|
[1730] | 720 | // +-----------------------------------------------------------------------+ |
---|
[2218] | 721 | // slideshow_period : waiting time in seconds before loading a new page |
---|
| 722 | // during automated slideshow |
---|
| 723 | // slideshow_period_min, slideshow_period_max are bounds of slideshow_period |
---|
| 724 | // slideshow_period_step is the step of navigation between min and max |
---|
| 725 | $conf['slideshow_period_min'] = 1; |
---|
| 726 | $conf['slideshow_period_max'] = 10; |
---|
| 727 | $conf['slideshow_period_step'] = 1; |
---|
| 728 | $conf['slideshow_period'] = 4; |
---|
| 729 | |
---|
| 730 | // slideshow_repeat : slideshow loops on pictures |
---|
| 731 | $conf['slideshow_repeat'] = true; |
---|
| 732 | |
---|
[2084] | 733 | // $conf['light_slideshow'] indicates to use slideshow.tpl in state of |
---|
[1730] | 734 | // picture.tpl for slideshow |
---|
| 735 | // Take care to have slideshow.tpl in all available templates |
---|
| 736 | // Or set it false. |
---|
| 737 | // Check if Picture's plugins are compliant with it |
---|
| 738 | // Every plugin from 1.7 would be design to manage light_slideshow case. |
---|
[2084] | 739 | $conf['light_slideshow'] = true; |
---|
[1730] | 740 | |
---|
[2216] | 741 | // the local data directory is used to store data such as compiled templates |
---|
| 742 | // or other plugin variables etc |
---|
| 743 | $conf['local_data_dir'] = dirname(dirname(__FILE__)).'/_data'; |
---|
[5013] | 744 | |
---|
| 745 | // where should the API add photos? |
---|
| 746 | $conf['upload_dir'] = PHPWG_ROOT_PATH.'upload'; |
---|
[2334] | 747 | ?> |
---|