[770] | 1 | <?php |
---|
| 2 | // +-----------------------------------------------------------------------+ |
---|
[8728] | 3 | // | Piwigo - a PHP based photo gallery | |
---|
[2297] | 4 | // +-----------------------------------------------------------------------+ |
---|
[8728] | 5 | // | Copyright(C) 2008-2011 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 |
---|
[5215] | 33 | * local/config/config.inc.php. See tools/config.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'; |
---|
[6951] | 73 | // will sort images by the manually defined rank of images in this album. |
---|
[2517] | 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_visible : at creation, must a category be visible or not ? |
---|
| 125 | // Warning : if the parent category is invisible, the category is |
---|
| 126 | // automatically create invisible. (invisible = locked) |
---|
[1278] | 127 | $conf['newcat_default_visible'] = true; |
---|
[858] | 128 | |
---|
| 129 | // newcat_default_status : at creation, must a category be public or private |
---|
| 130 | // ? Warning : if the parent category is private, the category is |
---|
| 131 | // automatically create private. |
---|
| 132 | $conf['newcat_default_status'] = 'public'; |
---|
| 133 | |
---|
| 134 | // level_separator : character string used for separating a category level |
---|
| 135 | // to the sub level. Suggestions : ' / ', ' » ', ' → ', ' - ', |
---|
| 136 | // ' >' |
---|
| 137 | $conf['level_separator'] = ' / '; |
---|
| 138 | |
---|
| 139 | // paginate_pages_around : on paginate navigation bar, how many pages |
---|
| 140 | // display before and after the current page ? |
---|
| 141 | $conf['paginate_pages_around'] = 2; |
---|
| 142 | |
---|
| 143 | // tn_width : default width for thumbnails creation |
---|
| 144 | $conf['tn_width'] = 128; |
---|
| 145 | |
---|
| 146 | // tn_height : default height for thumbnails creation |
---|
[937] | 147 | $conf['tn_height'] = 128; |
---|
[858] | 148 | |
---|
[3271] | 149 | // tn_compression_level: compression level for thumbnail creation. 0 is low |
---|
| 150 | // quality, 100 is high quality. |
---|
| 151 | $conf['tn_compression_level'] = 75; |
---|
| 152 | |
---|
[2339] | 153 | // show_version : shall the version of Piwigo be displayed at the |
---|
[858] | 154 | // bottom of each page ? |
---|
| 155 | $conf['show_version'] = true; |
---|
| 156 | |
---|
[3041] | 157 | // meta_ref to reference multiple sets of incorporated pages or elements |
---|
| 158 | // Set it false to avoid referencing in google, and other search engines. |
---|
| 159 | $conf['meta_ref'] = true; |
---|
[1763] | 160 | |
---|
[858] | 161 | // links : list of external links to add in the menu. An example is the best |
---|
| 162 | // than a long explanation : |
---|
| 163 | // |
---|
[1728] | 164 | // Simple use: |
---|
| 165 | // for each link is associated a label |
---|
| 166 | // $conf['links'] = array( |
---|
[2339] | 167 | // 'http://piwigo.org' => 'PWG website', |
---|
[3133] | 168 | // 'http://piwigo.org/forum' => 'PWG forum', |
---|
[1728] | 169 | // ); |
---|
[858] | 170 | // |
---|
[1728] | 171 | // Advenced use: |
---|
[2084] | 172 | // You can also used special options. Instead to pass a string like parameter value |
---|
[1728] | 173 | // you can pass a array with different optional parameter values |
---|
| 174 | // $conf['links'] = array( |
---|
[2339] | 175 | // 'http://piwigo.org' => array('label' => 'PWG website', 'new_window' => false, 'eval_visible' => 'return true;'), |
---|
[3133] | 176 | // 'http://piwigo.org/forum' => array('label' => 'For ADMIN', 'new_window' => true, 'eval_visible' => 'return is_admin();'), |
---|
| 177 | // 'http://piwigo.org/ext' => array('label' => 'For Guest', 'new_window' => true, 'eval_visible' => 'return is_a_guest();'), |
---|
| 178 | // 'http://piwigo.org/downloads' => |
---|
[2084] | 179 | // array('label' => 'PopUp', 'new_window' => true, |
---|
[1743] | 180 | // 'nw_name' => 'PopUp', 'nw_features' => 'width=800,height=450,location=no,status=no,toolbar=no,scrollbars=no,menubar=no'), |
---|
[1728] | 181 | // ); |
---|
[1736] | 182 | // Parameters: |
---|
| 183 | // 'label': |
---|
| 184 | // Label to display for the link, must be defined |
---|
| 185 | // 'new_window': |
---|
| 186 | // If true open link on tab/window |
---|
| 187 | // [Default value is true if it's not defined] |
---|
[1743] | 188 | // 'nw_name': |
---|
| 189 | // Name use when new_window is true |
---|
| 190 | // [Default value is '' if it's not defined] |
---|
| 191 | // 'nw_features': |
---|
| 192 | // features use when new_window is true |
---|
| 193 | // [Default value is '' if it's not defined] |
---|
[1736] | 194 | // 'eval_visible': |
---|
| 195 | // It's php code witch must return if the link is visible or not |
---|
| 196 | // [Default value is true if it's not defined] |
---|
| 197 | // |
---|
[1728] | 198 | // Equivalence: |
---|
| 199 | // $conf['links'] = array( |
---|
[2339] | 200 | // 'http://piwigo.org' => 'PWG website', |
---|
[1728] | 201 | // ); |
---|
| 202 | // $conf['links'] = array( |
---|
[2339] | 203 | // 'http://piwigo.org' => array('label' => 'PWG website', 'new_window' => false, 'visible' => 'return true;'), |
---|
[1728] | 204 | // ); |
---|
| 205 | // |
---|
[858] | 206 | // If the array is empty, the "Links" box won't be displayed on the main |
---|
| 207 | // page. |
---|
| 208 | $conf['links'] = array(); |
---|
| 209 | |
---|
[1788] | 210 | // random_index_redirect: list of 'internal' links to use when no section is defined on index.php. |
---|
| 211 | // An example is the best than a long explanation : |
---|
| 212 | // |
---|
| 213 | // for each link is associated a php condition |
---|
| 214 | // '' condition is equivalent to 'return true;' |
---|
| 215 | // $conf['random_index_redirect'] = array( |
---|
| 216 | // PHPWG_ROOT_PATH.'index.php?/best_rated' => 'return true;', |
---|
[2029] | 217 | // PHPWG_ROOT_PATH.'index.php?/recent_pics' => 'return is_a_guest();', |
---|
[1788] | 218 | // PHPWG_ROOT_PATH.'random.php' => '', |
---|
| 219 | // PHPWG_ROOT_PATH.'index.php?/categories' => '', |
---|
| 220 | // ); |
---|
| 221 | $conf['random_index_redirect'] = array(); |
---|
| 222 | |
---|
[3095] | 223 | // reverse_home_title: if Piwigo is your home page for a better robot index |
---|
| 224 | // we recommend to set it true (Only index page will reverse its title) |
---|
| 225 | $conf['reverse_home_title'] = false; |
---|
| 226 | |
---|
[1677] | 227 | // List of notes to display on all header page |
---|
| 228 | // example $conf['header_notes'] = array('Test', 'Hello'); |
---|
| 229 | $conf['header_notes'] = array(); |
---|
| 230 | |
---|
[858] | 231 | // show_thumbnail_caption : on thumbnails page, show thumbnail captions ? |
---|
| 232 | $conf['show_thumbnail_caption'] = true; |
---|
| 233 | |
---|
| 234 | // show_picture_name_on_title : on picture presentation page, show picture |
---|
| 235 | // name ? |
---|
| 236 | $conf['show_picture_name_on_title'] = true; |
---|
| 237 | |
---|
[2803] | 238 | // display_fromto: display the date creation bounds of a |
---|
[1970] | 239 | // category. |
---|
| 240 | $conf['display_fromto'] = false; |
---|
| 241 | |
---|
[2339] | 242 | // allow_random_representative : do you wish Piwigo to search among |
---|
[858] | 243 | // categories elements a new representative at each reload ? |
---|
| 244 | // |
---|
| 245 | // If false, an element is randomly or manually chosen to represent its |
---|
| 246 | // category and remains the representative as long as an admin does not |
---|
| 247 | // change it. |
---|
| 248 | // |
---|
| 249 | // Warning : setting this parameter to true is CPU consuming. Each time you |
---|
| 250 | // change the value of this parameter from false to true, an administrator |
---|
| 251 | // must update categories informations in screen [Admin > General > |
---|
| 252 | // Maintenance]. |
---|
| 253 | $conf['allow_random_representative'] = false; |
---|
| 254 | |
---|
| 255 | // allow_html_descriptions : authorize administrators to use HTML in |
---|
| 256 | // category and element description. |
---|
| 257 | $conf['allow_html_descriptions'] = true; |
---|
| 258 | |
---|
[862] | 259 | // prefix_thumbnail : string before filename. Thumbnail's prefix must only |
---|
| 260 | // contain characters among : a to z (case insensitive), "-" or "_". |
---|
[858] | 261 | $conf['prefix_thumbnail'] = 'TN-'; |
---|
| 262 | |
---|
[3720] | 263 | // dir_thumbnail : directory where thumbnail reside. |
---|
| 264 | $conf['dir_thumbnail'] = 'thumbnail'; |
---|
| 265 | |
---|
[880] | 266 | // users_page: how many users to display in screen |
---|
| 267 | // Administration>Identification>Users? |
---|
| 268 | $conf['users_page'] = 20; |
---|
| 269 | |
---|
[2084] | 270 | // image level permissions available in the admin interface |
---|
| 271 | $conf['available_permission_levels'] = array(0,1,2,4,8); |
---|
| 272 | |
---|
[901] | 273 | // mail_options: only set it true if you have a send mail warning with |
---|
| 274 | // "options" parameter missing on mail() function execution. |
---|
| 275 | $conf['mail_options'] = false; |
---|
| 276 | |
---|
[1021] | 277 | // send_bcc_mail_webmaster: send bcc mail to webmaster. Set true for debug |
---|
| 278 | // or test. |
---|
[1018] | 279 | $conf['send_bcc_mail_webmaster'] = false; |
---|
| 280 | |
---|
[1642] | 281 | // default_email_format: |
---|
| 282 | // Define the default email format use to send email |
---|
| 283 | // Value could be text/plain or text/html |
---|
[1905] | 284 | $conf['default_email_format'] = 'text/html'; |
---|
[1642] | 285 | |
---|
[3938] | 286 | // alternative_email_format: |
---|
| 287 | // Define the alternative email format use to send email |
---|
| 288 | // Value could be text/plain or text/html |
---|
| 289 | $conf['alternative_email_format'] = 'text/plain'; |
---|
| 290 | |
---|
[2284] | 291 | // define the name of sender mail: |
---|
| 292 | // If value is empty, gallery title is used |
---|
| 293 | $conf['mail_sender_name'] = ''; |
---|
| 294 | |
---|
[2106] | 295 | // smtp configuration |
---|
| 296 | // (work if fsockopen function is allowed for smtp port) |
---|
| 297 | // smtp_host: smtp server host |
---|
| 298 | // if null, regular mail function is used |
---|
| 299 | // format: hoststring[:port] |
---|
| 300 | // exemple: smtp.pwg.net:21 |
---|
| 301 | // smtp_user/smtp_password: user & password for smtp identication |
---|
| 302 | $conf['smtp_host'] = ''; |
---|
| 303 | $conf['smtp_user'] = ''; |
---|
| 304 | $conf['smtp_password'] = ''; |
---|
| 305 | |
---|
| 306 | |
---|
[953] | 307 | // check_upgrade_feed: check if there are database upgrade required. Set to |
---|
| 308 | // true, a message will strongly encourage you to upgrade your database if |
---|
| 309 | // needed. |
---|
| 310 | // |
---|
| 311 | // This configuration parameter is set to true in BSF branch and to false |
---|
| 312 | // elsewhere. |
---|
| 313 | $conf['check_upgrade_feed'] = true; |
---|
| 314 | |
---|
[1084] | 315 | // rate_items: available rates for a picture |
---|
| 316 | $conf['rate_items'] = array(0,1,2,3,4,5); |
---|
| 317 | |
---|
[1649] | 318 | // Define default method to use ('http' or 'html' in order to do redirect) |
---|
| 319 | $conf['default_redirect_method'] = 'http'; |
---|
| 320 | |
---|
[3935] | 321 | // Define using double password type in admin's users management panel |
---|
| 322 | $conf['double_password_type_in_admin'] = false; |
---|
| 323 | |
---|
[4429] | 324 | // Define if logins must be case sentitive or not at users registration. ie : |
---|
| 325 | // If set true, the login "user" will equal "User" or "USER" or "user", |
---|
| 326 | // etc. ... And it will be impossible to use such login variation to create a |
---|
[6411] | 327 | // new user account. |
---|
[5060] | 328 | $conf['insensitive_case_logon'] = false; |
---|
[4429] | 329 | |
---|
[4954] | 330 | // how should we check for unicity when adding a photo. Can be 'md5sum' or |
---|
| 331 | // 'filename' |
---|
| 332 | $conf['uniqueness_mode'] = 'md5sum'; |
---|
| 333 | |
---|
[858] | 334 | // +-----------------------------------------------------------------------+ |
---|
| 335 | // | metadata | |
---|
| 336 | // +-----------------------------------------------------------------------+ |
---|
| 337 | |
---|
| 338 | // show_iptc: Show IPTC metadata on picture.php if asked by user |
---|
| 339 | $conf['show_iptc'] = false; |
---|
| 340 | |
---|
[770] | 341 | // show_iptc_mapping : is used for showing IPTC metadata on picture.php |
---|
| 342 | // page. For each key of the array, you need to have the same key in the |
---|
| 343 | // $lang array. For example, if my first key is 'iptc_keywords' (associated |
---|
| 344 | // to '2#025') then you need to have $lang['iptc_keywords'] set in |
---|
| 345 | // language/$user['language']/common.lang.php. If you don't have the lang |
---|
| 346 | // var set, the key will be simply displayed |
---|
| 347 | // |
---|
| 348 | // To know how to associated iptc_field with their meaning, use |
---|
| 349 | // tools/metadata.php |
---|
| 350 | $conf['show_iptc_mapping'] = array( |
---|
| 351 | 'iptc_keywords' => '2#025', |
---|
| 352 | 'iptc_caption_writer' => '2#122', |
---|
| 353 | 'iptc_byline_title' => '2#085', |
---|
| 354 | 'iptc_caption' => '2#120' |
---|
| 355 | ); |
---|
| 356 | |
---|
[858] | 357 | // use_iptc: Use IPTC data during database synchronization with files |
---|
| 358 | // metadata |
---|
| 359 | $conf['use_iptc'] = false; |
---|
| 360 | |
---|
[2339] | 361 | // use_iptc_mapping : in which IPTC fields will Piwigo find image |
---|
[770] | 362 | // information ? This setting is used during metadata synchronisation. It |
---|
[2339] | 363 | // associates a piwigo_images column name to a IPTC key |
---|
[770] | 364 | $conf['use_iptc_mapping'] = array( |
---|
| 365 | 'keywords' => '2#025', |
---|
| 366 | 'date_creation' => '2#055', |
---|
| 367 | 'author' => '2#122', |
---|
| 368 | 'name' => '2#005', |
---|
| 369 | 'comment' => '2#120' |
---|
| 370 | ); |
---|
| 371 | |
---|
[858] | 372 | // show_exif: Show EXIF metadata on picture.php (table or line presentation |
---|
| 373 | // avalaible) |
---|
| 374 | $conf['show_exif'] = true; |
---|
| 375 | |
---|
[770] | 376 | // show_exif_fields : in EXIF fields, you can choose to display fields in |
---|
| 377 | // sub-arrays, for example ['COMPUTED']['ApertureFNumber']. for this, add |
---|
| 378 | // 'COMPUTED;ApertureFNumber' in $conf['show_exif_fields'] |
---|
| 379 | // |
---|
| 380 | // The key displayed in picture.php will be $lang['exif_field_Make'] for |
---|
| 381 | // example and if it exists. For compound fields, only take into account the |
---|
| 382 | // last part : for key 'COMPUTED;ApertureFNumber', you need |
---|
| 383 | // $lang['exif_field_ApertureFNumber'] |
---|
| 384 | // |
---|
| 385 | // for PHP version newer than 4.1.2 : |
---|
| 386 | // $conf['show_exif_fields'] = array('CameraMake','CameraModel','DateTime'); |
---|
[1059] | 387 | // |
---|
[858] | 388 | $conf['show_exif_fields'] = array( |
---|
| 389 | 'Make', |
---|
| 390 | 'Model', |
---|
| 391 | 'DateTimeOriginal', |
---|
| 392 | 'COMPUTED;ApertureFNumber' |
---|
| 393 | ); |
---|
[770] | 394 | |
---|
[858] | 395 | // use_exif: Use EXIF data during database synchronization with files |
---|
| 396 | // metadata |
---|
[1682] | 397 | $conf['use_exif'] = true; |
---|
[770] | 398 | |
---|
[858] | 399 | // use_exif_mapping: same behaviour as use_iptc_mapping |
---|
| 400 | $conf['use_exif_mapping'] = array( |
---|
| 401 | 'date_creation' => 'DateTimeOriginal' |
---|
| 402 | ); |
---|
[770] | 403 | |
---|
[858] | 404 | // +-----------------------------------------------------------------------+ |
---|
| 405 | // | sessions | |
---|
| 406 | // +-----------------------------------------------------------------------+ |
---|
| 407 | |
---|
[1059] | 408 | // session_use_cookies: specifies to use cookie to store |
---|
[1007] | 409 | // the session id on client side |
---|
| 410 | $conf['session_use_cookies'] = true; |
---|
[1004] | 411 | |
---|
[1059] | 412 | // session_use_only_cookies: specifies to only use cookie to store |
---|
[1007] | 413 | // the session id on client side |
---|
| 414 | $conf['session_use_only_cookies'] = true; |
---|
[1004] | 415 | |
---|
[1007] | 416 | // session_use_trans_sid: do not use transparent session id support |
---|
| 417 | $conf['session_use_trans_sid'] = false; |
---|
[1004] | 418 | |
---|
[1007] | 419 | // session_name: specifies the name of the session which is used as cookie name |
---|
[1004] | 420 | $conf['session_name'] = 'pwg_id'; |
---|
| 421 | |
---|
[1059] | 422 | // session_save_handler: comment the line below |
---|
[1007] | 423 | // to use file handler for sessions. |
---|
[1004] | 424 | $conf['session_save_handler'] = 'db'; |
---|
| 425 | |
---|
[858] | 426 | // authorize_remembering : permits user to stay logged for a long time. It |
---|
| 427 | // creates a cookie on client side. |
---|
| 428 | $conf['authorize_remembering'] = true; |
---|
| 429 | |
---|
[1493] | 430 | // remember_me_name: specifies the name of the cookie used to stay logged |
---|
| 431 | $conf['remember_me_name'] = 'pwg_remember'; |
---|
| 432 | |
---|
[770] | 433 | // remember_me_length : time of validity for "remember me" cookies, in |
---|
| 434 | // seconds. |
---|
[1568] | 435 | $conf['remember_me_length'] = 5184000; |
---|
[770] | 436 | |
---|
[1568] | 437 | // session_length : time of validity for normal session, in seconds. |
---|
| 438 | $conf['session_length'] = 3600; |
---|
| 439 | |
---|
[858] | 440 | // +-----------------------------------------------------------------------+ |
---|
[2790] | 441 | // | debug/performance | |
---|
[858] | 442 | // +-----------------------------------------------------------------------+ |
---|
[770] | 443 | |
---|
| 444 | // show_queries : for debug purpose, show queries and execution times |
---|
| 445 | $conf['show_queries'] = false; |
---|
| 446 | |
---|
| 447 | // show_gt : display generation time at the bottom of each page |
---|
| 448 | $conf['show_gt'] = true; |
---|
| 449 | |
---|
[858] | 450 | // debug_l10n : display a warning message each time an unset language key is |
---|
| 451 | // accessed |
---|
| 452 | $conf['debug_l10n'] = false; |
---|
[770] | 453 | |
---|
[2216] | 454 | // activate template debugging - a new window will appear |
---|
| 455 | $conf['debug_template'] = false; |
---|
| 456 | |
---|
[6411] | 457 | // save copies of sent mails into local data dir |
---|
| 458 | $conf['debug_mail'] = false; |
---|
| 459 | |
---|
[1221] | 460 | // die_on_sql_error: if an SQL query fails, should everything stop? |
---|
| 461 | $conf['die_on_sql_error'] = true; |
---|
| 462 | |
---|
[2790] | 463 | // if true, some language strings are replaced during template compilation |
---|
| 464 | // (insted of template output). this results in better performance. however |
---|
| 465 | // any change in the language file will not be propagated until you purge |
---|
| 466 | // the compiled templates from the admin / maintenance menu |
---|
| 467 | $conf['compiled_template_cache_language'] = false; |
---|
| 468 | |
---|
| 469 | // This tells Smarty whether to check for recompiling or not. Recompiling |
---|
| 470 | // does not need to happen unless a template is changed. false results in |
---|
| 471 | // better performance. |
---|
| 472 | $conf['template_compile_check'] = true; |
---|
| 473 | |
---|
[5208] | 474 | // This forces Smarty to (re)compile templates on every invocation. This is |
---|
| 475 | // handy for development and debugging. It should never be used in a |
---|
| 476 | // production environment. |
---|
| 477 | $conf['template_force_compile'] = false; |
---|
| 478 | |
---|
[8012] | 479 | // activate merging of javascript / css files |
---|
| 480 | $conf['template_combine_files'] = true; |
---|
| 481 | |
---|
[2859] | 482 | // this permit to show the php errors reporting (see INI 'error_reporting' |
---|
| 483 | // for possible values) |
---|
| 484 | // gives an empty value '' to deactivate |
---|
| 485 | $conf['show_php_errors'] = E_ALL; |
---|
| 486 | |
---|
[858] | 487 | // +-----------------------------------------------------------------------+ |
---|
| 488 | // | authentication | |
---|
| 489 | // +-----------------------------------------------------------------------+ |
---|
[770] | 490 | |
---|
[804] | 491 | // apache_authentication : use Apache authentication as reference instead of |
---|
| 492 | // users table ? |
---|
| 493 | $conf['apache_authentication'] = false; |
---|
[808] | 494 | |
---|
[2104] | 495 | // users_table: which table is the reference for users? Can be a different |
---|
[2339] | 496 | // table than Piwigo table |
---|
[865] | 497 | // |
---|
| 498 | // If you decide to use another table than the default one, you need to |
---|
| 499 | // prepare your database by deleting some datas : |
---|
| 500 | // |
---|
[2339] | 501 | // delete from piwigo_user_access; |
---|
| 502 | // delete from piwigo_user_cache; |
---|
| 503 | // delete from piwigo_user_feed; |
---|
| 504 | // delete from piwigo_user_group; |
---|
| 505 | // delete from piwigo_user_infos; |
---|
| 506 | // delete from piwigo_sessions; |
---|
| 507 | // delete from piwigo_rate; |
---|
| 508 | // update piwigo_images set average_rate = null; |
---|
| 509 | // delete from piwigo_caddie; |
---|
| 510 | // delete from piwigo_favorites; |
---|
[865] | 511 | // |
---|
| 512 | // All informations contained in these tables and column are related to |
---|
[2339] | 513 | // piwigo_users table. |
---|
[4357] | 514 | $conf['users_table'] = $prefixeTable.'users'; |
---|
[808] | 515 | |
---|
[7501] | 516 | // If you decide to use external authentication |
---|
[6510] | 517 | // change conf below by $conf['external_authentification'] = true; |
---|
| 518 | $conf['external_authentification'] = false; |
---|
| 519 | |
---|
[2104] | 520 | // Other tables can be changed, if you define associated constants |
---|
| 521 | // Example: |
---|
| 522 | // define('USER_INFOS_TABLE', 'pwg_main'.'user_infos'); |
---|
[2096] | 523 | |
---|
[808] | 524 | // user_fields : mapping between generic field names and table specific |
---|
| 525 | // field names. For example, in PWG, the mail address is names |
---|
| 526 | // "mail_address" and in punbb, it's called "email". |
---|
| 527 | $conf['user_fields'] = array( |
---|
| 528 | 'id' => 'id', |
---|
| 529 | 'username' => 'username', |
---|
| 530 | 'password' => 'password', |
---|
| 531 | 'email' => 'mail_address' |
---|
| 532 | ); |
---|
| 533 | |
---|
| 534 | // pass_convert : function to crypt or hash the clear user password to store |
---|
| 535 | // it in the database |
---|
| 536 | $conf['pass_convert'] = create_function('$s', 'return md5($s);'); |
---|
| 537 | |
---|
| 538 | // guest_id : id of the anonymous user |
---|
| 539 | $conf['guest_id'] = 2; |
---|
[1926] | 540 | // default_user_id : id of user used for default value |
---|
| 541 | $conf['default_user_id'] = $conf['guest_id']; |
---|
[809] | 542 | |
---|
[2371] | 543 | // Registering process and guest/generic members get language from the browser |
---|
| 544 | // if language isn't available PHPWG_DEFAULT_LANGUAGE is used as previously |
---|
| 545 | $conf['browser_language'] = true; |
---|
| 546 | |
---|
[858] | 547 | // webmaster_id : webmaster'id. |
---|
| 548 | $conf['webmaster_id'] = 1; |
---|
[825] | 549 | |
---|
[1470] | 550 | // does the guest have access ? |
---|
| 551 | // (not a security feature, set your categories "private" too) |
---|
| 552 | // If false it'll be redirected from index.php to identification.php |
---|
| 553 | $conf['guest_access'] = true; |
---|
| 554 | |
---|
[858] | 555 | // +-----------------------------------------------------------------------+ |
---|
[901] | 556 | // | history | |
---|
[894] | 557 | // +-----------------------------------------------------------------------+ |
---|
| 558 | |
---|
| 559 | // nb_logs_page : how many logs to display on a page |
---|
| 560 | $conf['nb_logs_page'] = 300; |
---|
| 561 | |
---|
[1094] | 562 | // +-----------------------------------------------------------------------+ |
---|
| 563 | // | urls | |
---|
| 564 | // +-----------------------------------------------------------------------+ |
---|
| 565 | |
---|
| 566 | // question_mark_in_urls : the generated urls contain a ? sign. This can be |
---|
| 567 | // changed to false only if the server translates PATH_INFO variable |
---|
| 568 | // (depends on the server AcceptPathInfo directive configuration) |
---|
| 569 | $conf['question_mark_in_urls'] = true; |
---|
| 570 | |
---|
| 571 | // php_extension_in_urls : if true, the urls generated for picture and |
---|
| 572 | // category will not contain the .php extension. This will work only if |
---|
| 573 | // .htaccess defines Options +MultiViews parameter or url rewriting rules |
---|
| 574 | // are active. |
---|
| 575 | $conf['php_extension_in_urls'] = true; |
---|
| 576 | |
---|
[1131] | 577 | // category_url_style : one of 'id' (default) or 'id-name'. 'id-name' |
---|
| 578 | // means that an simplified ascii represntation of the category name will |
---|
| 579 | // appear in the url |
---|
| 580 | $conf['category_url_style'] = 'id'; |
---|
| 581 | |
---|
| 582 | // picture_url_style : one of 'id' (default), 'id-file' or 'file'. 'id-file' |
---|
| 583 | // or 'file' mean that the file name (without extension will appear in the |
---|
| 584 | // url). Note that one aditionnal sql query will occur if 'file' is choosen. |
---|
| 585 | // Note that you might experience navigation issues if you choose 'file' |
---|
| 586 | // and your file names are not unique |
---|
| 587 | $conf['picture_url_style'] = 'id'; |
---|
| 588 | |
---|
| 589 | // tag_url_style : one of 'id-tag' (default), 'id' or 'tag'. |
---|
| 590 | // Note that if you choose 'tag' and the url (ascii) representation of your |
---|
| 591 | // tags is not unique, all tags with the same url representation will be shown |
---|
| 592 | $conf['tag_url_style'] = 'id-tag'; |
---|
| 593 | |
---|
[1116] | 594 | // +-----------------------------------------------------------------------+ |
---|
[1119] | 595 | // | tags | |
---|
| 596 | // +-----------------------------------------------------------------------+ |
---|
| 597 | |
---|
| 598 | // full_tag_cloud_items_number: number of tags to show in the full tag |
---|
| 599 | // cloud. Only the most represented tags will be shown |
---|
| 600 | $conf['full_tag_cloud_items_number'] = 200; |
---|
| 601 | |
---|
[1537] | 602 | // menubar_tag_cloud_items_number: number of tags to show in the tag |
---|
| 603 | // cloud in the menubar. Only the most represented tags will be shown |
---|
[8757] | 604 | $conf['menubar_tag_cloud_items_number'] = 20; |
---|
[1537] | 605 | |
---|
[6716] | 606 | // content_tag_cloud_items_number: number of related tags to show in the tag |
---|
| 607 | // cloud on the content page, when the current section is not a set of |
---|
| 608 | // tags. Only the most represented tags will be shown |
---|
[1537] | 609 | $conf['content_tag_cloud_items_number'] = 12; |
---|
| 610 | |
---|
[1119] | 611 | // tags_levels: number of levels to use for display. Each level is bind to a |
---|
| 612 | // CSS class tagLevelX. |
---|
[1120] | 613 | $conf['tags_levels'] = 5; |
---|
[1119] | 614 | |
---|
[2362] | 615 | // tags_default_display_mode: group tags by letter or display a tag cloud by |
---|
| 616 | // default? 'letters' or 'cloud'. |
---|
| 617 | $conf['tags_default_display_mode'] = 'cloud'; |
---|
| 618 | |
---|
| 619 | // tag_letters_column_number: how many columns to display tags by letter |
---|
| 620 | $conf['tag_letters_column_number'] = 4; |
---|
| 621 | |
---|
[1119] | 622 | // +-----------------------------------------------------------------------+ |
---|
[1116] | 623 | // | Notification by mail | |
---|
| 624 | // +-----------------------------------------------------------------------+ |
---|
| 625 | |
---|
| 626 | // Default Value for nbm user |
---|
| 627 | $conf['nbm_default_value_user_enabled'] = false; |
---|
| 628 | |
---|
[1531] | 629 | // Search list user to send quickly (List all without to check news) |
---|
[1116] | 630 | // More quickly but less fun to use |
---|
| 631 | $conf['nbm_list_all_enabled_users_to_send'] = false; |
---|
| 632 | |
---|
[1531] | 633 | // Max time used on one pass in order to send mails. |
---|
| 634 | // Timeout delay ratio. |
---|
[1156] | 635 | $conf['nbm_max_treatment_timeout_percent'] = 0.8; |
---|
| 636 | |
---|
[1531] | 637 | // If timeout cannot be compite with nbm_max_treatment_timeout_percent, |
---|
| 638 | // nbm_treatment_timeout_default is used by default |
---|
| 639 | $conf['nbm_treatment_timeout_default'] = 20; |
---|
| 640 | |
---|
[1871] | 641 | // Parameters used in get_recent_post_dates for the 2 kind of notification |
---|
| 642 | $conf['recent_post_dates'] = array( |
---|
| 643 | 'RSS' => array('max_dates' => 5, 'max_elements' => 6, 'max_cats' => 6), |
---|
| 644 | 'NBM' => array('max_dates' => 7, 'max_elements' => 3, 'max_cats' => 9) |
---|
| 645 | ); |
---|
| 646 | |
---|
[2595] | 647 | // the author shown in the RSS feed <author> element |
---|
| 648 | $conf['rss_feed_author'] = 'Piwigo notifier'; |
---|
| 649 | |
---|
[1377] | 650 | // +-----------------------------------------------------------------------+ |
---|
[2313] | 651 | // | Set admin layout | |
---|
[1377] | 652 | // +-----------------------------------------------------------------------+ |
---|
| 653 | |
---|
[5123] | 654 | $conf['admin_theme'] = 'roma'; |
---|
[1377] | 655 | |
---|
[1616] | 656 | // should we load the active plugins ? true=Yes, false=No |
---|
| 657 | $conf['enable_plugins']=true; |
---|
[1660] | 658 | |
---|
[1781] | 659 | // Web services are allowed (true) or completely forbidden (false) |
---|
| 660 | $conf['allow_web_services'] = true; |
---|
| 661 | |
---|
[3662] | 662 | // enable log for web services |
---|
| 663 | $conf['ws_enable_log'] = false; |
---|
| 664 | |
---|
| 665 | // web services log file path |
---|
| 666 | $conf['ws_log_filepath'] = '/tmp/piwigo_ws.log'; |
---|
| 667 | |
---|
[1781] | 668 | // Maximum number of images to be returned foreach call to the web service |
---|
| 669 | $conf['ws_max_images_per_page'] = 500; |
---|
| 670 | |
---|
[3382] | 671 | // Display a link to subscribe to Piwigo Announcements Newsletter |
---|
| 672 | $conf['show_newsletter_subscription'] = true; |
---|
| 673 | |
---|
[1677] | 674 | // +-----------------------------------------------------------------------+ |
---|
| 675 | // | Filter | |
---|
| 676 | // +-----------------------------------------------------------------------+ |
---|
[1722] | 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(); |
---|
[1677] | 688 | $conf['filter_pages'] = array |
---|
| 689 | ( |
---|
[1722] | 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), |
---|
[1677] | 709 | ); |
---|
| 710 | |
---|
[1730] | 711 | // +-----------------------------------------------------------------------+ |
---|
[2218] | 712 | // | Slideshow | |
---|
[1730] | 713 | // +-----------------------------------------------------------------------+ |
---|
[2218] | 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 | |
---|
[2084] | 726 | // $conf['light_slideshow'] indicates to use slideshow.tpl in state of |
---|
[1730] | 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. |
---|
[2084] | 732 | $conf['light_slideshow'] = true; |
---|
[1730] | 733 | |
---|
[2216] | 734 | // the local data directory is used to store data such as compiled templates |
---|
| 735 | // or other plugin variables etc |
---|
| 736 | $conf['local_data_dir'] = dirname(dirname(__FILE__)).'/_data'; |
---|
[5014] | 737 | |
---|
[6052] | 738 | // where should the API/UploadForm add photos? This path must be relative to |
---|
| 739 | // the Piwigo installation directory (but can be outside, as long as it's |
---|
| 740 | // reachable from your webserver). |
---|
| 741 | $conf['upload_dir'] = './upload'; |
---|
[5138] | 742 | |
---|
| 743 | // where should the user be guided when there is no photo in his gallery yet? |
---|
| 744 | $conf['no_photo_yet_url'] = 'admin.php?page=photos_add'; |
---|
[5153] | 745 | |
---|
| 746 | // directory with themes inside |
---|
| 747 | $conf['themes_dir'] = PHPWG_ROOT_PATH.'themes'; |
---|
[5182] | 748 | |
---|
| 749 | // pLoader direct download url for windows |
---|
| 750 | $conf['ploader_download_windows'] = 'http://piwigo.org/ext/download.php?eid=270'; |
---|
| 751 | |
---|
| 752 | // pLoader direct download url for mac |
---|
| 753 | $conf['ploader_download_mac'] = 'http://piwigo.org/ext/download.php?eid=353'; |
---|
| 754 | |
---|
| 755 | // pLoader direct download url for linux |
---|
| 756 | $conf['ploader_download_linux'] = 'http://piwigo.org/ext/download.php?eid=269'; |
---|
[6365] | 757 | |
---|
| 758 | // enable the synchronization method for adding photos |
---|
| 759 | $conf['enable_synchronization'] = true; |
---|
[7501] | 760 | |
---|
| 761 | // PEM url |
---|
| 762 | $conf['alternative_pem_url'] = ''; |
---|
| 763 | |
---|
[8763] | 764 | // based on the EXIF "orientation" tag, should we rotate photos added in the |
---|
| 765 | // upload form or through pwg.images.addSimple web API method? |
---|
| 766 | $conf['upload_form_automatic_rotation'] = true; |
---|
[7501] | 767 | ?> |
---|