forked from dexonline/dexonline
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Config.php.sample
235 lines (167 loc) · 7.9 KB
/
Config.php.sample
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
<?php
class Config {
// Filesystem root of this installation. Include a trailing slash.
const ROOT = __DIR__ . '/';
// The concatenation URL_HOST + URL_PREFIX should yield the URL of the home
// page of your installation.
// protocol://host[:port] . No trailing slash.
const URL_HOST = 'http://localhost';
// URL path relative to URL_HOST. Include a trailing slash.
const URL_PREFIX = '/dexonline/www/';
// Database connection. Format: mysql://user[:password]@host/database
const DATABASE = 'mysql://root@localhost/dexonline';
// When true, allow fake user logins.
const DEVELOPMENT_MODE = true;
// When true, only display a maintenance message. Will work without a DB connection.
const MAINTENANCE = false;
// Folder for temporary data. Include a trailing slash.
const TEMP_DIR = '/tmp/';
/******************************* Logging *******************************/
// Log file name. Can also be 'php://stdout' or 'php://stderr'
const LOG_FILE = '/var/log/dexonline.log';
// Maximum priority level. See <http://php.net/manual/en/function.syslog.php>.
const LOG_LEVEL = LOG_DEBUG;
// Log DB queries at the bottom of each page when this user is logged in.
const DEBUG_USER = '';
/****************************** Search log ******************************/
// Whether or not to log query-related information.
const SEARCH_LOG_ENABLED = false;
// Full name of the search log file.
const SEARCH_LOG_FILE = '/var/log/dex-query.log';
// For each query, log at most this many results.
// If set to zero, then log only query information, but not the results.
const SEARCH_LOG_RESULTS = 0;
// Log this fraction of queries, sampled uniformly at random.
// Possible values: 0.00 <= fraction <= 1.00.
const SEARCH_LOG_FRACTION = 0.10;
/***************************** Localization *****************************/
const LOCALES = [
'en_US.utf8' => 'English',
'es_ES.utf8' => 'español',
'hu_HU.utf8' => 'magyar',
'ro_RO.utf8' => 'română',
];
const DEFAULT_LOCALE = 'ro_RO.utf8';
// When a file cannot be mapped to a URL in the current locale, use this
// locale instead. This locale should be fully defined in Router::ROUTES for
// all files and should match the language in which our PHP files are named.
const DEFAULT_ROUTING_LOCALE = 'en_US.utf8';
/**************************** Search options ****************************/
// Autocomplete options
const SEARCH_AC_ENABLED = true;
const SEARCH_AC_MIN_CHARS = 3;
const SEARCH_AC_LIMIT = 10;
// Support JSON/XML responses by appending /json or /xml to definition URLs.
const SEARCH_JSON_API = true;
const SEARCH_XML_API = true;
/*********************** Functional test options ***********************/
// When true, use the test database. Only needed to run functional tests.
const TEST_MODE = false;
// Format: mysql://user[:password]@host/database
const TEST_DATABASE = 'mysql://root@localhost/dexonline_test';
// Test interface language
const TEST_LOCALE = 'ro_RO.utf8';
/**************************** Email options ****************************/
const CONTACT_EMAIL = '[email protected]';
// For outgoing emails
const SMTP_SERVER = 'tls://server.com:port';
const EMAIL_IDENTITIES = [
// '[email protected]' => [ 'name' => 'John', 'password' => 'foo' ], ...
];
/************************** WotD email options **************************/
// Sender of WotD reminders (and receiver of WotD by email)
const WOTD_SENDER = '[email protected]';
const WOTD_REPLY_TO = '[email protected]';
// Recipients of WotD reminders (in addition to the targeted WotD artists)
const WOTD_RCPT_INFO = [ ];
const WOTD_RCPT_ERROR = [ ];
// Password to be sent with each image
const WOTD_PASSWORD = 'foobar';
// Image size
const WOTD_IMAGE_HEIGHT = 300;
const WOTD_IMAGE_WIDTH = 300;
// Only accept WotD images within this many days of today.
const WOTD_INTERVAL = 31;
/**************************** Various limits ****************************/
const LIMIT_FULL_TEXT_RESULTS = 200;
const LIMIT_BOOKMARKS = 500;
const LIMIT_TRAINEE_PENDING_DEFS = 50;
/***************************** Appearance *****************************/
// Adapted from Dignitas, see https://github.com/TeamDignitas/dignitas/wiki/Color-scheme
const COLOR_SCHEMES = [ 'light', 'dark' ];
const SKIN_BANNER = true;
const SKIN_PERMALINK = true;
const SKIN_TYPO = true;
const SKIN_WIDGETS = true;
const SKIN_WOTD_ARCHIVE = true;
const SKIN_WOTD_SUBSCRIBE = true;
// Web host logo. A value of 'foo' should have a corresponding template in
// templates/hosting/foo.tpl.
const SKIN_HOSTED_BY = '';
/************************ Static server options ************************/
// With the default settings you will see resources on the production static
// server, but you won't be able to modify them. So components like elfinder
// or editing user avatars will break. If you plan to work on those
// components specifically, set STATIC_URL and STATIC_PATH for local use.
// Web address of the static resource server. Include a trailing slash.
const STATIC_URL = 'https://dexonline.ro/static/';
// Storage path, for uploads to the static server. If empty, we won't
// attempt to write anything (e.g. generate thumbnails). If not empty, then
// it should be writable by the web server user. Include a trailing slash.
const STATIC_PATH = null;
// URL path pattern for page images, relative to STATIC_URL
const PAGE_URL_PATTERN = 'pages/%03d/vol%02d/%04d.png';
/**** OTRS connection info (used to process donations automatically) ****/
// NOTE: passwords are sent unencrypted. Do not run this from the outside.
const OTRS_REST_URL = '';
const OTRS_LOGIN = '';
const OTRS_PASSWORD = '';
/*** Donation middlemen options ***/
const EU_PLATESC_KEY = '';
const EU_PLATESC_MID = '';
/**************************** Banner options ****************************/
// Type of banner to be served. Choices are 'revive', 'fake' or 'none'. The
// option 'fake' displays a placeholder banner and can be used in
// development/beta (so as not to steal real impressions from campaigns).
const BANNER_TYPE = 'none';
// Strategy for moving the banner using JS. Can be one of:
// * default: do not move the banner; leave the banner wherever the HTML has it;
// * dynamic: (maybe) move the banner, e.g. between two definitions.
const BANNER_PLACEMENT = 'default';
// Revive options. See dex.js for details.
const BANNER_REVIVE = [];
/******************************* Plugins *******************************/
// Array mapping class names to an array of settings for that plugin.
// There should be a corresponding class under lib/plugins.
// Settings for each plugin are exemplified in the plugin's class.
const PLUGINS = [];
/*************************** Scrabble options ***************************/
// Versions of the Official Word List
const LOC_VERSIONS = [
'6.0' => '2018-02-11',
'5.0' => '2011-01-24',
'4.1' => '2008-01-11',
'4.0' => '2007-10-09',
];
const DEFAULT_LOC_VERSION = '5.0';
/***************************** Object tags *****************************/
// Lexemes having these tags generate vocative forms.
const TAG_ANIMATE_LEXEME = [ 'admite vocativul' ];
// Ancestor of all part of speech tags.
const TAG_PART_OF_SPEECH = 'parte de vorbire';
// If applied on any definitions, these tags will generate dashboard reports.
const TAG_REPORTS = [];
// Do not complain about rare glyphs when this tag is present.
const TAG_ID_RARE_GLYPHS = 416;
/************************** Definition parsers **************************/
// Maps Definition.urlName to ParserClassName (file should reside in lib/parser/)
const PARSERS = [
'doom3' => 'Doom3Parser',
'mda2' => 'Mda2Parser',
];
// Do not try to parse definitions having these tag IDs
const PARSER_TAGS_TO_IGNORE = [
404, // incomplete definition
405, // missing etymology
];
}