source: trunk/include/config.inc.php @ 602

Last change on this file since 602 was 602, checked in by plg, 19 years ago
  • admin/cat_options page added : manage options for the whole categories tree (uploadable, commentable). status and visible will be soon added
  • admin.php : $conf_link var to avoid lines longer than 79 characters
  • config.upload_available configuration parameter disappear : it's simpler to manage with cat_options
  • config.show_comments idem : new column categories.commentable, each categories can be commentable or not
  • categories.site_id becomes a nullable column : a virtual category does belong to no site
  • function display_select_categories has a new argument : $CSS_classes array to optionnaly assign a CSS class to each category in the select field
  • added informations in include/config.inc.php for setting default value of :
  • categories.visible
  • categories.status
  • categories.uploadable
  • categories.commentable
  • 2 new indexes images_i3(average_rate) and images_i4(hit) : optimizes best rated and most visited categories
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 7.8 KB
Line 
1<?php
2// +-----------------------------------------------------------------------+
3// | PhpWebGallery - a PHP based picture gallery                           |
4// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
5// | Copyright (C) 2003-2004 PhpWebGallery Team - http://phpwebgallery.net |
6// +-----------------------------------------------------------------------+
7// | branch        : BSF (Best So Far)
8// | file          : $RCSfile$
9// | last update   : $Date: 2004-11-13 13:43:53 +0000 (Sat, 13 Nov 2004) $
10// | last modifier : $Author: plg $
11// | revision      : $Revision: 602 $
12// +-----------------------------------------------------------------------+
13// | This program is free software; you can redistribute it and/or modify  |
14// | it under the terms of the GNU General Public License as published by  |
15// | the Free Software Foundation                                          |
16// |                                                                       |
17// | This program is distributed in the hope that it will be useful, but   |
18// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
19// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
20// | General Public License for more details.                              |
21// |                                                                       |
22// | You should have received a copy of the GNU General Public License     |
23// | along with this program; if not, write to the Free Software           |
24// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
25// | USA.                                                                  |
26// +-----------------------------------------------------------------------+
27
28/**
29 *                           configuration page
30 *
31 * Set configuration parameters that are not in the table config. In the
32 * application, configuration parameters are considered in the same way
33 * coming from config table or config.inc.php.
34 *
35 * Why having some parameters in config table and others in config.inc.php ?
36 * Modifying config.inc.php is a "hard" task for low skilled users, they
37 * need a GUI for this : admin/configuration. But only parameters that might
38 * be modified by low skilled users are in config table, other parameters
39 * are in config.inc.php
40 */
41
42// order_by : how to change the order of display for images in a category ?
43//
44// There are several fields that can order the display :
45//
46//  - date_available : the date of the adding to the gallery
47//  - file : the name of the file
48//  - id : element identifier
49//  - date_creation : date of element creation
50//
51// Once you've chosen which field(s) to use for ordering, you must chose the
52// ascending or descending order for each field.  examples :
53//
54// 1. $conf['order_by'] = " order by date_available desc, file asc";
55//    will order pictures by date_available descending & by filename ascending
56//
57// 2. $conf['order_by'] = " order by file asc";
58//    will only order pictures by file ascending without taking into account
59//    the date_available
60$conf['order_by'] = ' ORDER BY date_available DESC, file ASC, id ASC';
61
62// slideshow_period : waiting time in seconds before loading a new page
63// during automated slideshow
64$conf['slideshow_period'] = 4;
65
66// last_days : options for X last days to displays for comments
67$conf['last_days'] = array(1,2,3,10,30,365);
68
69// file_ext : file extensions (case sensitive) authorized
70$conf['file_ext'] = array('jpg','JPG','png','PNG','gif','GIF','mpg','zip',
71                          'avi','mp3','ogg');
72
73// picture_ext : file extensions for picture file, must be a subset of
74// file_ext
75$conf['picture_ext'] = array('jpg','JPG','png','PNG','gif','GIF');
76
77// top_number : number of element to display for "best rated" and "most
78// visited" categories
79$conf['top_number'] = 10;
80
81// anti-flood_time : number of seconds between 2 comments : 0 to disable
82$conf['anti-flood_time'] = 60;
83
84// max_LOV_categories : maximum number of categories to display in a list of
85// value. Over this limit, a textfield is displayed, asking for a category
86// identifier
87$conf['max_LOV_categories'] = 50;
88
89// show_iptc_mapping : is used for showing IPTC metadata on picture.php
90// page. For each key of the array, you need to have the same key in the
91// $lang array. For example, if my first key is 'iptc_keywords' (associated
92// to '2#025') then you need to have $lang['iptc_keywords'] set in
93// language/$user['language']/common.lang.php. If you don't have the lang
94// var set, the key will be simply displayed
95//
96// To know how to associated iptc_field with their meaning, use
97// tools/metadata.php
98$conf['show_iptc_mapping'] = array(
99  'iptc_keywords'        => '2#025',
100  'iptc_caption_writer'  => '2#122',
101  'iptc_byline_title'    => '2#085',
102  'iptc_caption'         => '2#120'
103  );
104
105// use_iptc_mapping : in which IPTC fields will PhpWebGallery find image
106// information ? This setting is used during metadata synchronisation. It
107// associates a phpwebgallery_images column name to a IPTC key
108$conf['use_iptc_mapping'] = array(
109  'keywords'        => '2#025',
110  'date_creation'   => '2#055',
111  'author'          => '2#122',
112  'name'            => '2#005',
113  'comment'         => '2#120'
114  );
115
116// show_exif_fields : in EXIF fields, you can choose to display fields in
117// sub-arrays, for example ['COMPUTED']['ApertureFNumber']. for this, add
118// 'COMPUTED;ApertureFNumber' in $conf['show_exif_fields']
119//
120// The key displayed in picture.php will be $lang['exif_field_Make'] for
121// example and if it exists. For compound fields, only take into account the
122// last part : for key 'COMPUTED;ApertureFNumber', you need
123// $lang['exif_field_ApertureFNumber']
124//
125// for PHP version newer than 4.1.2 :
126// $conf['show_exif_fields'] = array('CameraMake','CameraModel','DateTime');
127//
128$conf['show_exif_fields'] = array('Make',
129                                  'Model',
130                                  'DateTime',
131                                  'COMPUTED;ApertureFNumber');
132
133// calendar_datefield : date field of table "images" used for calendar
134// catgory
135$conf['calendar_datefield'] = 'date_creation';
136
137// rate : enable feature for rating elements
138$conf['rate'] = true;
139
140// remember_me_length : time of validity for "remember me" cookies, in
141// seconds.
142$conf['remember_me_length'] = 31536000;
143
144// session_length : time of validity for normal session, in seconds.
145$conf['session_length'] = 3600;
146
147// session_id_size : a session identifier is compound of alphanumeric
148// characters and is case sensitive. Each character is among 62
149// possibilities. The number of possible sessions is
150// 62^$conf['session_id_size'].
151//
152// 62^5  =             916,132,832
153// 62^10 = 839,299,365,868,340,224
154//
155$conf['session_id_size'] = 10;
156
157// info_nb_elements_page : number of elements to display per page on
158// admin/infos_images
159$conf['info_nb_elements_page'] = 5;
160
161// default_language : language used if language set in user database is not
162// available
163$conf['default_language'] = 'en_UK.iso-8859-1';
164
165// show_queries : for debug purpose, show queries and execution times
166$conf['show_queries'] = false;
167
168// show_gt : display generation time at the bottom of each page
169$conf['show_gt'] = true;
170
171// Default options for new categories.
172//
173// Some options for categories (commentable, uploadable, status, visible)
174// must be set directly in the database by changing the corresponding
175// default values of the column. Examples :
176//
177// ALTER TABLE phpwebgallery_categories ALTER visible SET DEFAULT 'true';
178// ALTER TABLE phpwebgallery_categories ALTER status SET DEFAULT 'private';
179// ALTER TABLE phpwebgallery_categories ALTER uploadable SET DEFAULT 'true';
180// ALTER TABLE phpwebgallery_categories ALTER commentable SET DEFAULT 'false';
181//
182// MySQL default values are used when inserting a row and that no value is
183// given for the column. In PhpWebGallery, the above columns are not valued
184// during categories insertion, so default values are important.
185?>
Note: See TracBrowser for help on using the repository browser.