/
constants.php
executable file
·373 lines (352 loc) · 8.93 KB
/
constants.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
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
<?php
/**
* Constants for phpMyFAQ
*
* PHP Version 5.4
*
* This Source Code Form is subject to the terms of the Mozilla Public License,
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
* obtain one at http://mozilla.org/MPL/2.0/.
*
* @category phpMyFAQ
* @package Setup
* @author Thorsten Rinne <thorsten@phpmyfaq.de>
* @author Matteo Scaramuccia <matteo@phpmyfaq.de>
* @copyright 2003-2015 phpMyFAQ Team
* @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
* @link http://www.phpmyfaq.de
* @since 2003-12-10
*/
/**
* Set the string below according to your users (main) timezone.
* For your convenience find below the list of the available timezones:
*
* http://www.php.net/manual/en/timezones.php
*
* Note: a wrong timezone setting could affect on-line users tracking as well as
* any filter criterion built using a date.
* Note: timezone is a global setting i.e. no per-user setting.
*
* @var string
*/
define('PMF_DATETIME_TIMEZONE_DEFAULT', 'Europe/Berlin');
/**
* Timeout for the admin section, in minutes
*
* @var integer
*/
define('PMF_AUTH_TIMEOUT', 30);
/**
* Timeout for the warning about session timeout for the admin section, in minutes
*
* @var integer
*/
define('PMF_AUTH_TIMEOUT_WARNING', 5);
/**
* Start value for the solution IDs
*
* @var const
*/
define('PMF_SOLUTION_ID_START_VALUE', 1000);
/**
* Incremental value for the solution IDs
*
* @var const
*/
define('PMF_SOLUTION_ID_INCREMENT_VALUE', 1);
/**
* Number of records for the Top 10
*
* @var const 10
*/
define('PMF_NUMBER_RECORDS_TOPTEN', 10);
/**
* Number of records for the latest entries
*
* @var const 5
*/
define('PMF_NUMBER_RECORDS_LATEST', 5);
/**
* This is the max number of open questions returned by the feed
*
* @var const 50
*/
define("PMF_RSS_OPENQUESTIONS_MAX", 50);
/**
* This is the flag with which Latest and Topten RSS feeds will be forced to use the current PMF SEO URL schema
*
* @var const true
*/
define("PMF_RSS_USE_SEO", true);
/**
* This is the flag with which Google sitemap will be forced to use the current PMF SEO URL schema
*
* @var const true
*/
define("PMF_SITEMAP_GOOGLE_USE_SEO", true);
/**
* This is the flag with which the Tags Cloud list is limited to
*
* @var const 50
*/
define("PMF_TAGS_CLOUD_RESULT_SET_SIZE", 50);
/**
* This is the flag with which the Autocomplete list is limited to
*
* @var const 20
*/
define("PMF_TAGS_AUTOCOMPLETE_RESULT_SET_SIZE", 20);
/**
* This is the flag for choosing the encryption type for passwords. Currently
* you can choose
*
* - hash (default)
* - bcrypt (PHP 5.5+, experimental)
* - sha1
* - crypt
* - md5 (default before phpMyFAQ 2.8)
*
* @var const
*/
define('PMF_ENCRYPTION_TYPE', 'hash');
/**
* List of denied extensions when uploading a file.
*
* Here is an example:
* <code>
* $denyUploadExts = array(
* '', // Files with no extension not allowed
* 'shtml', // SSI files not allowed
* 'php', // PHP files not allowed
* 'php3',
* 'php4',
* 'cgi', // CGI not allowed
* 'pl',
* 'exe' // Win executables not allowed
* );
* </code>
*
* @var array
*/
$denyUploadExts = [];
/**
* Bot Blacklist
*
* @var array
*/
$botBlacklist = [
'nustcrape',
'webpost',
'GoogleBot',
'msnbot',
'crawler',
'scooter',
'bravobrian',
'archiver',
'w3c',
'control',
'wget',
'bot',
'spider',
'Yahoo! Slurp',
'htdig',
'gsa-crawler'
];
/****************************************************************************
* DO NOT CHANGE ANYTHING BELOW THIS LINE! *
****************************************************************************/
/**
* Allowed 'action' variables for GET. DO NOT CHANGE!
*
* @var array
*/
$allowedVariables = [
'add' => 1,
'artikel' => 1,
'ask' => 1,
'attachment' => 1,
'contact' => 1,
'glossary' => 1,
'help' => 1,
'login' => 1,
'mailsend2friend' => 1,
'news' => 1,
'open' => 1,
'password' => 1,
'register' => 1,
'save' => 1,
'savecomment' => 1,
'savequestion' => 1,
'savevoting' => 1,
'search' => 1,
'send2friend' => 1,
'sendmail' => 1,
'show' => 1,
'sitemap' => 1,
'thankyou' => 1,
'translate' => 1,
'ucp' => 1,
'writecomment' => 1
];
/**
* ISO 639 language code list - DO NOT CHANGE!
*
* @var array
*/
$languageCodes = [
'AF' => 'Afghanistan',
'AA' => 'Afar',
'AB' => 'Abkhazian',
'AF' => 'Afrikaans',
'AM' => 'Amharic',
'AR' => 'Arabic',
'AS' => 'Assamese',
'AY' => 'Aymara',
'AZ' => 'Azerbaijani',
'BA' => 'Bashkir',
'BE' => 'Byelorussian',
'BG' => 'Bulgarian',
'BH' => 'Bihari',
'BI' => 'Bislama',
'BN' => 'Bengali',
'BO' => 'Tibetan',
'BR' => 'Breton',
'BS' => 'Bosnian',
'CA' => 'Catalan',
'CO' => 'Corsican',
'CS' => 'Czech',
'CY' => 'Welsh',
'DA' => 'Danish',
'DE' => 'German',
'DZ' => 'Bhutani',
'EL' => 'Greek',
'EN' => 'English',
'EO' => 'Esperanto',
'ES' => 'Spanish',
'ET' => 'Estonian',
'EU' => 'Basque',
'FA' => 'Persian',
'FI' => 'Finnish',
'FJ' => 'Fiji',
'FO' => 'Faeroese',
'FR' => 'French',
'FR-CA' => 'French (Canada)',
'FY' => 'Frisian',
'GA' => 'Irish',
'GD' => 'Gaelic',
'GL' => 'Galician',
'GN' => 'Guarani',
'GU' => 'Gujarati',
'HA' => 'Hausa',
'HE' => 'Hebrew',
'HI' => 'Hindi',
'HR' => 'Croatian',
'HU' => 'Hungarian',
'HY' => 'Armenian',
'IA' => 'Interlingua',
'IE' => 'Interlingue',
'IK' => 'Inupiak',
'ID' => 'Indonesian',
'IS' => 'Icelandic',
'IT' => 'Italian',
'IW' => 'Hebrew',
'JA' => 'Japanese',
'JI' => 'Yiddish',
'JW' => 'Javanese',
'KA' => 'Georgian',
'KK' => 'Kazakh',
'KL' => 'Greenlandic',
'KM' => 'Cambodian',
'KN' => 'Kannada',
'KO' => 'Korean',
'KS' => 'Kashmiri',
'KU' => 'Kurdish',
'KY' => 'Kirghiz',
'LA' => 'Latin',
'LN' => 'Lingala',
'LO' => 'Laothian',
'LT' => 'Lithuanian',
'LV' => 'Latvian',
'MG' => 'Malagasy',
'MI' => 'Maori',
'MK' => 'Macedonian',
'ML' => 'Malayalam',
'MN' => 'Mongolian',
'MO' => 'Moldavian',
'MR' => 'Marathi',
'MS' => 'Malay',
'MT' => 'Maltese',
'MY' => 'Burmese',
'NA' => 'Nauru',
'NE' => 'Nepali',
'NL' => 'Dutch',
'NB' => 'Norwegian Bokmål',
'NN' => 'Norwegian Nynorsk',
'OC' => 'Occitan',
'OM' => 'Oromo',
'OR' => 'Oriya',
'PA' => 'Punjabi',
'PL' => 'Polish',
'PS' => 'Pashto',
'PT' => 'Portuguese',
'PT-BR' => 'Brazilian Portuguese',
'QU' => 'Quechua',
'RN' => 'Kirundi',
'RO' => 'Romanian',
'RU' => 'Russian',
'RW' => 'Kinyarwanda',
'SA' => 'Sanskrit',
'SD' => 'Sindhi',
'SG' => 'Sangro',
'SH' => 'Serbo-Croatian',
'SI' => 'Singhalese',
'SK' => 'Slovak',
'SL' => 'Slovenian',
'SM' => 'Samoan',
'SN' => 'Shona',
'SO' => 'Somali',
'SQ' => 'Albanian',
'SR' => 'Serbian',
'SS' => 'Siswati',
'ST' => 'Sesotho',
'SU' => 'Sudanese',
'SV' => 'Swedish',
'SW' => 'Swahili',
'TA' => 'Tamil',
'TE' => 'Tegulu',
'TG' => 'Tajik',
'TH' => 'Thai',
'TI' => 'Tigrinya',
'TK' => 'Turkmen',
'TL' => 'Tagalog',
'TN' => 'Setswana',
'TO' => 'Tonga',
'TR' => 'Turkish',
'TS' => 'Tsonga',
'TT' => 'Tatar',
'TW' => 'Chinese (Traditional)',
'UK' => 'Ukrainian',
'UR' => 'Urdu',
'UZ' => 'Uzbek',
'VI' => 'Vietnamese',
'VO' => 'Volapuk',
'WO' => 'Wolof',
'XH' => 'Xhosa',
'YO' => 'Yoruba',
'ZH' => 'Chinese (Simplified)',
'ZU' => 'Zulu'
];
//
// Define some internal constants
//
// HTTP GET parameters
define('PMF_GET_KEY_NAME_LANGUAGE', 'lang');
define('PMF_GET_KEY_NAME_SESSIONID', 'sid');
// Misc parameters
define('PMF_LANGUAGE_EXPIRED_TIME', 3600); // 30 minutes
define('PMF_SESSION_EXPIRED_TIME', 3600); // 30 minutes
define('PMF_REMEMBERME_EXPIRED_TIME', 1209600); // 2 weeks
//
// Set the default timezone used by all date/time functions
//
date_default_timezone_set(PMF_DATETIME_TIMEZONE_DEFAULT);