forked from sandboxgangster/Part-DB
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig_defaults.php
executable file
·294 lines (246 loc) · 20.2 KB
/
config_defaults.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
<?php
/*
part-db version 0.1
Copyright (C) 2005 Christoph Lechner
http://www.cl-projects.de/
part-db version 0.2+
Copyright (C) 2009 K. Jacobs and others (see authors.php)
http://code.google.com/p/part-db/
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
$Id$
Changelog (sorted by date):
[DATE] [NICKNAME] [CHANGES]
2012-09-02 kami89 - moved nearly all constants to database and some stuff to "start_session.php"
2012-09-16 kami89 - defines replaced with a config array
- moved constants from database back to this file :-)
2012-09-16 kami89 - renamed from "config.php_template" to "config_defaults.php" because now
it will be included in "start_session.php" for loading default values
*/
/********************************************************************************
*
* ATTENTION!
* - Do not edit this file!
* - Do not copy this file to data/config.php!
* - Use the installer for creating your config.php!
*
*********************************************************************************/
/********************************************************************************
*
* Below, there are attributes which will be stored in the user's "config.php".
* They are only used until the save_config() function is executed for first time.
* This is normally done during/after the installation process.
*
* Please Note:
* For boolean variables, you should always give a variable name, that
* you can answer it with 'false' in the default value.
* Example: Use "disable_footprints" instead of "enable_footprints",
* because the default is "disable_footprints == false".
* Reason: If a config variable is undefined, the default value
* will be used automatically.
*
*********************************************************************************/
// the version of the user's config.php. If this version is lower than $config['system']['current_config_version'] (see below),
// the user's config.php must be updated (see updates/config_update_steps.php)
$config['system']['current_config_version'] = 0; // do not change this!! Zero means "a version before 0.3.0 RC1"
// database settings
$config['db']['type'] = 'mysql';
$config['db']['host'] = 'localhost';
$config['db']['name'] = '';
$config['db']['user'] = '';
$config['db']['password'] = '';
$config['db']['charset'] = 'utf8'; ///< @todo THIS IS NOT USED AT THE MOMENT (hardcoded to "uft8" in class.Database.php)!! Do we need this parameter?!?!
$config['db']['auto_update'] = false;
$config['db']['backup']['name'] = ''; // If you use an external database backup system, set here "MySQLDumper" for example
$config['db']['backup']['url'] = ''; // the link to the database backup system, e.g. "../mysqldumper/"
$config['db']['update_error']['version'] = -1; // Momerize the database version in case of an error (see Database::update())
$config['db']['update_error']['next_step'] = 0; // Momerize the position of the update step in case of an error (see Database::update())
// html/template settings
$config['html']['http_charset'] = 'utf-8'; ///< @todo remove this parameter completely, I think we don't need it! temporary hardcoded in start_session.php
$config['html']['theme'] = 'standard';
$config['html']['custom_css'] = '';
// system update settings
$config['update']['type'] = 'stable';
// startup page settings
$config['startup']['custom_banner'] = '';
$config['startup']['disable_update_list'] = false;
// devices settings
$config['devices']['disable'] = false;
// footprints settings
$config['footprints']['disable'] = false;
// manufacturers settings
$config['manufacturers']['disable'] = false;
// automatic datasheets settings ("automatic datasheets" means auto-created links to datasheetcatalog.net and so on)
$config['auto_datasheets']['disable'] = false;
// tools settings
$config['tools']['footprints']['autoload'] = false; // If true, all footprint pictures will be listed automatically (default value is "false" because of the long time for loading)
// navigation menu settings
$config['menu']['disable_help'] = false; // help
$config['menu']['disable_config'] = false; // system
$config['menu']['enable_debug'] = false; // system -> debugging
$config['menu']['disable_labels'] = false; // tools -> labels
$config['menu']['disable_calculator'] = false; // tools -> calculator
$config['menu']['disable_iclogos'] = false; // tools -> iclogos
$config['menu']['disable_footprints'] = false; // tools -> footprints
// popup settings
$config['popup']['modal'] = true;
$config['popup']['width'] = 1000;
$config['popup']['height'] = 800;
// debug settings
$config['debug']['enable'] = false;
$config['debug']['template_debugging_enable'] = false;
$config['debug']['request_debugging_enable'] = false;
// admin settings
$config['admin']['password'] = NULL; // NULL means "not yet initialized" (important for "install.php")
// installation complete steps (can also be used for updates, for example if a user input is needed for an update)
// if at least one of them is 'false', the installer will be shown automatically
$config['installation_complete']['locales'] = false;
$config['installation_complete']['admin_password'] = false;
$config['installation_complete']['database'] = false;
$config['installation_complete']['db_backup_path'] = false;
// miscellaneous settings
$config['timezone'] = 'Europe/Berlin';
$config['language'] = 'de_DE';
$config['is_online_demo'] = false; // disables some (safety-)critical features
$config['developer_mode'] = false; // enables the "Debug-Tools" menu
$config['page_title'] = 'Part-DB Elektronische Bauteile-Datenbank';
/********************************************************************************
*
* Below, there are attributes which we don't want to save in the user's "config.php".
* (This is done by the two code lines below this comment:) */
$config_defaults = $config; // we need the default values in lib/lib.php/save_config()
$manual_config = array(); // ...this too...
/* If you explicity want to use other values in your installation, you have to copy the
* lines you want to redefine into your "config.php", and replace "$config" with "$manual_config".
*
* If you miss an attribute, like a language or money format, please contact us.
* Then we could add the new attribute to Part-DB, for all users of Part-DB.
*
* For Developers: Attention!!
* If you change here something, the change will take affect for all users of Part-DB!
* New options are no problem, but if you change or remove some things, it can make trouble!
* So, be carefully with changes in this section.
*
* Legend:
* (*) The order in the array is the same as the order in the dropdown-lists,
* so the default value should be defined first.
*
*********************************************************************************/
// system version: this must be increased for every release(-candidate)!
// IMPORTANT: please note that (for example) "0.3.0" is a HIGHER (!) version than "0.3.0.RC5".
$config['system']['version'] = '0.3.0'; // examples: '0.2.2' or '0.2.2.RC2' (see class.SystemVersion.php)
// the version of the latest config style. Increase this for one if we need an update for the user's config.php (see also updates/config_update_steps.php)
$config['system']['latest_config_version'] = 2; // only increase for one!
// minimum requirements of the system (PHP, PHP Modules, Apache, ...) [used in "install.php"]
$config['requirements']['php_version'] = '5.3.0';
$config['requirements']['pdo'] = true; // PDO must be installed
// HTTP charsets* (the key is used for the HTML header, the value is only used for displaying)
$config['http_charsets']['utf-8'] = 'UTF-8 Unicode';
//$config['http_charsets']['ISO-8859-1'] = 'ISO-8859-1'; ///< @todo remove the choice of the http charset!
// database types* (the key is used for the class "Database", the value is only used for displaying)
$config['db_types']['mysql'] = 'MySQL';
//$config['db_types']['sqlite'] = 'SQLite 3';
// database charsets* (the key is used for the class "Database", the value is only used for displaying)
$config['db_charsets']['utf8'] = 'UTF-8 Unicode (utf8)';
//$config['db_charsets']['latin2'] = 'ISO 8859-2 Central European (latin2)';
//$config['db_charsets']['cp1250'] = 'Windows Central European (cp1250)';
//$config['db_charsets']['macce'] = 'Mac Central European (macce)';
// timezones* (the key is used for "date_default_timezone_set()", the value is only used for displaying)
$config['timezones']['UTC'] = 'UTC';
$config['timezones']['Europe/Berlin'] = 'Europe/Berlin';
$config['timezones']['Europe/London'] = 'Europe/London';
$config['timezones']['Europe/Zurich'] = 'Europe/Zurich';
// languages (the key is used for "setlocale()", the value is only used for displaying)
$config['languages']['POSIX'] = '[POSIX] C-Standard';
$config['languages']['de_AT'] = '[de_AT] Deutsch (Österreich)';
$config['languages']['de_BE'] = '[de_BE] Deutsch (Belgien)';
$config['languages']['de_CH'] = '[de_CH] Deutsch (Schweiz)';
$config['languages']['de_DE'] = '[de_DE] Deutsch (Deutschland)';
$config['languages']['de_LI'] = '[de_LI] Deutsch (Liechtenstein)';
$config['languages']['de_LU'] = '[de_LU] Deutsch (Luxemburg)';
$config['languages']['en_GB'] = '[en_GB] English (United Kingdom)';
$config['languages']['en_US'] = '[en_US] Endlish (United States)';
// table settings
// available columns: hover_picture,id,name,description,name_description,comment,instock,mininstock,instock_mininstock,category,footprint,manufacturer,
// storelocation, suppliers,datasheets,button_increment,button_decrement,average_single_price,single_prices,supplier_partnrs,attachements
$config['table']['category_parts']['columns'] = 'hover_picture;name;description;instock_mininstock;footprint;storelocation;datasheets;attachements;button_decrement;button_increment';
$config['table']['search_parts']['columns'] = 'hover_picture;name;description;instock_mininstock;footprint;storelocation;suppliers;supplier_partnrs;single_prices;datasheets;attachements;button_decrement;button_increment';
$config['table']['obsolete_parts']['columns'] = 'hover_picture;name;description;instock_mininstock;footprint;storelocation;suppliers;supplier_partnrs;single_prices';
$config['table']['noprice_parts']['columns'] = 'hover_picture;name;description;instock_mininstock;footprint;storelocation;suppliers;supplier_partnrs';
$config['table']['order_parts']['columns'] = 'hover_picture;name_description;instock_mininstock;footprint;storelocation;suppliers_radiobuttons;supplier_partnrs;single_prices;total_prices;order_quantity_edit;order_options';
$config['table']['searched_device_parts']['columns'] = 'hover_picture;quantity_edit;mountnames_edit;name;description;footprint;storelocation';
$config['table']['device_parts']['columns'] = 'hover_picture;name_description;quantity_edit;mountnames_edit;footprint;instock;storelocation;suppliers;supplier_partnrs;single_prices;total_prices';
$config['table']['imported_parts']['columns'] = 'hover_picture;name;description;instock_mininstock;footprint;storelocation;suppliers;supplier_partnrs;single_prices;datasheets;attachements';
// export configurations for order parts*
$config['export']['orderparts'][0]['format'] = 'CSV';
$config['export']['orderparts'][0]['name'] = 'Standard 1 (mit den jeweils markierten Lieferanten)';
$config['export']['orderparts'][0]['separator'] = ';';
$config['export']['orderparts'][0]['header'] = true;
$config['export']['orderparts'][0]['mimetype'] = 'text/csv';
$config['export']['orderparts'][0]['columns'] = 'name;description;instock;mininstock;footprint;storelocation;order_supplier;order_supplierpartnr;order_quantity;order_single_price;order_total_price';
$config['export']['orderparts'][1]['format'] = 'CSV';
$config['export']['orderparts'][1]['name'] = 'Standard 2 (alle Teile mit allen Lieferanten)';
$config['export']['orderparts'][1]['separator'] = ';';
$config['export']['orderparts'][1]['header'] = true;
$config['export']['orderparts'][1]['mimetype'] = 'text/csv';
$config['export']['orderparts'][1]['columns'] = 'name;description;instock;mininstock;footprint;storelocation;suppliers;supplierpartnrs;order_quantity;single_prices;order_total_prices';
$config['export']['orderparts'][2]['format'] = 'CSV';
$config['export']['orderparts'][2]['name'] = 'Distrelec Online-Bestellung';
$config['export']['orderparts'][2]['separator'] = ',';
$config['export']['orderparts'][2]['header'] = false;
$config['export']['orderparts'][2]['mimetype'] = 'text/csv';
$config['export']['orderparts'][2]['columns'] = 'order_quantity;order_supplierpartnr;'; // the last column is empty
$config['export']['orderparts'][3]['format'] = 'XML';
$config['export']['orderparts'][3]['name'] = 'Standard 1 (mit den jeweils markierten Lieferanten)';
$config['export']['orderparts'][3]['mimetype'] = 'text/xml';
$config['export']['orderparts'][3]['columns'] = 'name;description;instock;mininstock;footprint;storelocation;order_supplier;order_supplierpartnr;order_quantity;order_single_price;order_total_price';
$config['export']['orderparts'][4]['format'] = 'XML';
$config['export']['orderparts'][4]['name'] = 'Standard 2 (alle Teile mit allen Lieferanten)';
$config['export']['orderparts'][4]['mimetype'] = 'text/xml';
$config['export']['orderparts'][4]['columns'] = 'name;description;instock;mininstock;footprint;storelocation;suppliers;supplierpartnrs;order_quantity;single_prices;order_total_prices';
// IMPORTANT: If you add your own export formats to your config.php, use letters instead of numbers as array indexes!! e.g. $config['export']['orderparts']['A']['format'] = 'foo';
// export configurations for device parts*
$config['export']['deviceparts'][0]['format'] = 'CSV';
$config['export']['deviceparts'][0]['name'] = 'Standard';
$config['export']['deviceparts'][0]['separator'] = ';';
$config['export']['deviceparts'][0]['header'] = true;
$config['export']['deviceparts'][0]['mimetype'] = 'text/csv';
$config['export']['deviceparts'][0]['columns'] = 'name;description;footprint;total_mount_quantity;instock;storelocation;suppliers;supplierpartnrs;single_prices;total_prices';
$config['export']['deviceparts'][1]['format'] = 'XML';
$config['export']['deviceparts'][1]['name'] = 'Standard';
$config['export']['deviceparts'][1]['mimetype'] = 'text/xml';
$config['export']['deviceparts'][1]['columns'] = 'name;description;footprint;total_mount_quantity;instock;storelocation;suppliers;supplierpartnrs;single_prices;total_prices';
// IMPORTANT: If you add your own export formats to your config.php, use letters instead of numbers as array indexes!! e.g. $config['export']['orderparts']['A']['format'] = 'foo';
// export configurations for searched parts*
$config['export']['searchparts'][0]['format'] = 'CSV';
$config['export']['searchparts'][0]['name'] = 'Standard';
$config['export']['searchparts'][0]['separator'] = ';';
$config['export']['searchparts'][0]['header'] = true;
$config['export']['searchparts'][0]['mimetype'] = 'text/csv';
$config['export']['searchparts'][0]['columns'] = 'name;description;instock;footprint;storelocation;suppliers;supplierpartnrs;single_prices';
$config['export']['searchparts'][1]['format'] = 'XML';
$config['export']['searchparts'][1]['name'] = 'Standard';
$config['export']['searchparts'][1]['mimetype'] = 'text/xml';
$config['export']['searchparts'][1]['columns'] = 'name;description;instock;footprint;storelocation;suppliers;supplierpartnrs;single_prices';
// IMPORTANT: If you add your own export formats to your config.php, use letters instead of numbers as array indexes!! e.g. $config['export']['orderparts']['A']['format'] = 'foo';
// automatic datasheets settings
$config['auto_datasheets']['entries'][0]['name'] = 'alldatasheet.com';
$config['auto_datasheets']['entries'][0]['url'] = 'http://www.alldatasheet.com/view.jsp?Searchword=%%PARTNAME%%';
$config['auto_datasheets']['entries'][0]['image'] = 'img/partdb/alldatasheet.png';
$config['auto_datasheets']['entries'][1]['name'] = 'reichelt.de';
$config['auto_datasheets']['entries'][1]['url'] = 'http://www.reichelt.de/?ACTION=4;START=0;SHOW=1;SEARCH=%%PARTNAME%%';
$config['auto_datasheets']['entries'][1]['image'] = 'img/partdb/reichelt.png';
$config['auto_datasheets']['entries'][2]['name'] = 'datasheetcatalog.net';
$config['auto_datasheets']['entries'][2]['url'] = 'http://search.datasheetcatalog.net/key/%%PARTNAME%%';
$config['auto_datasheets']['entries'][2]['image'] = 'img/partdb/dc.png';
// IMPORTANT: If you add your own export formats to your config.php, use letters instead of numbers as array indexes!! e.g. $config['auto_datasheets']['entries']['A']['name'] = 'foo';
?>