-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig_install.php
executable file
·470 lines (419 loc) · 12.6 KB
/
config_install.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
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
<?php
/*
* This software called - np - is a lightwight MVP Framework for building web applications and
* was developed by Christian Peters
*
* Copyright (C) 2016 Christian Peters
*
* 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 3 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, see <http://www.gnu.org/licenses/>.
*
* Contact: Christian Peters <[email protected]>
*/
/*
* set $config['env'] to
*
* a) 'development' if you are in development environment
* b) 'live' if you are in live environment
*
* Depending your setting the core will load single js and css files
* for easier debugging possibilites in development environment or
* compress js and css files to single files for a better performance
* in live environment.
*/
$config['env'] = 'development';
//$config['env'] = 'live';
/*
* set $config['test'] to
*
* a) true, if you want to unit-test your progress
* b) false, if you don't want to unit-test your progress
*/
$config['test'] = false;
$config['log'] = array
(
/*
* set $config['log']['responseErrors'] to
*
* a) true, if you want to log all response errors into the database
* b) false, if you don't want to log all response errors into the database
*
* response errors are i.e. 404
*/
'responseErrors' => false,
/*
* set $config['log']['sqlQueries'] to
*
* a) true, if you want to log all sql-queries into the database
* b) false, if you don't want to log all sql-queries into the database
*
* note that the query for loggin a sql-query won't be logged
*/
'sqlQueries' => false
);
/*
* set up $config['sql'] variables for your database connection
*/
$config['sql'] = array
(
'host' => '[YOUR_HOST]',
'db' => '[YOUR_DATABASE]',
'user' => '[YOUR_DATABASE_USERNAME]',
'pass' => '[YOUR_DATABASE_PASSWORD]',
'lock_timeout' => 60
);
/*
* set $config['OS'] to the runnig server os.
*
* currently supported are
*
* a) 'windows'
* b) 'linux'
*
* this is neccessary for the phantomjs-script
*/
$config['OS'] = 'linux';
/*
* set $config['server']['domain'] to your web domain
*
* i.e. https://www.yourdomain.com
*/
$config['server'] = array
(
'domain' => 'https://www.yourdomain.com',
);
$config['client'] = array
(
/*
* set $config['client']['mobileDetect'] to
*
* a) true, if you want to detect mobile devices
* b) false, if you don't want to detect mobile devices
*
* if you choose a) then the custom folder 'mobile' will be
* used for detected mobile devices. Otherwise the custom folder
* 'desktop' will be used for all devices.
*/
'mobileDetect' => true,
/*
* set $sonfig['client']['forceMobileDetect'] to
*
* a) true, if you want to force all devices detect as mobile devices.
* b) false, if you don't want to force all devices detect as mobile devices.
*
* If you choose a) then you must set $config['client']['mobileDetect'] to true,
* otherwise the forceMobileDetect setting will be ignored.
*
* This setting is still usefull if you want to test your mobile page on
* a desktop browser.
*
*/
'forceMobileDetect' => false,
/*
* set $config['client']['tabletDetect'] to
*
* a) true, if you want to detect tablet devices
* b) false, if you don't want to detect tablet devices
*
* if you choose a) then the custom folder 'tablet' will be
* used for detected tablet devices. Otherwise the custom folder
* 'desktop' will be used for all devices.
*/
'tabletDetect' => true,
/*
* set $sonfig['client']['forceTabletDetect'] to
*
* a) true, if you want to force all devices detect as tablet devices.
* b) false, if you don't want to force all devices detect as tablet devices.
*
* If you choose a) then you must set $config['client']['tabletDetect'] to true,
* otherwise the forceTabletDetect setting will be ignored.
*
* This setting is still usefull if you want to test your tablet page on
* a desktop browser.
*
*/
'forceTabletDetect' => false
);
$config['auth'] = array
(
/*
* set up your confirmation link page.
*/
'confirmation_link' => 'http://www.yourdomain.com/auth/register/confirmation/',
/*
* set up your password reset link page.
*/
'pw_reset_link' => 'http://www.yourdomain.com/auth/reset/password/',
/*
* set up your login page (not the link to your login page)
*/
'page' => 'Login',
/*
* set up the default group of users which are visiting your page
*/
'default_group' => 'Visitor',
/*
* set up the default group for registered users
*/
'registration_group' => 'Customer'
);
/*
* set up your shop payment configuration
*
* TODO: Merge with $config['shop']
*/
$config['payment'] = array
(
/*
* type in a security code (will encrypt customer shop data)
*/
'secure_code' => 'eRsgp!sef[',
/*
* type in a shop order title.
* Will be used for the confirmation link send
* via e-mail after customer order confirmation
*/
'orderTitle' => '[YOUT SHOP ORDER TITLE]',
/*
* type in the email-address auf the sender.
* This is usually the shop owners e-mail address
* and will be used as the sender of the confirmed customer order send
* via e-mail
*/
'email' => '[email protected]',
/*
* set up your stock
*
* if you set ignoreStock to true, then all products stock will be ignored
* when displayed to each customer. This means a customer can order
* products which are out of stock.
*
* if you set ignoreStock to false then the customer gets all products
* which aren't out of stock.
*
* You can also set a default maximum like 10. If you do that, then
* the customer can order a maximum of 10 items of each product.
*/
'ignoreStock' => false,
/*
* type in your paypal-credentials
*/
'paypal' => array
(
/*
* Used while developing (Testmode)
*
* type in your paypal sandbox credentials
*/
'test' => array
(
'user' => '[PAYPAL_SANDBOX_USER]',
'pass' => '[PAYPAL_SANDBOX_PASSWORD]',
'signature' => '[PAYPAL_SANSBOX_SIGNATURE]',
/*
* type in your return url. This url will be used after the customer
* succeeded the payment on the paypal site.
*/
'returnUrl' => 'https://www.yourdomain.com/checkout/payment',
/*
* type in your cancel url. This url will be used if the customer
* cancelled the payment or something went wrong
* on the paypal site (usually the same as the returnUrl param).
*/
'cancelUrl' => 'https://www.yourdomain.com/checkout/payment',
),
/*
* Used in live mode (site deployed on live server)
*
* type in your paypal real credentials
*/
'live' => array
(
'user' => '[PAYPAL_REAL_USER]',
'pass' => '[PAYPAL_REAL_PASSWORD]',
'signature' => '[PAYPAL_REAL_SIGNATURE]',
/*
* type in your return url. This url will be used after the customer
* succeeded the payment on the paypal site.
*/
'returnUrl' => 'https://www.yourdomain.com/checkout/payment',
/*
* type in your cancel url. This url will be used if the customer
* cancelled the payment or something went wrong
* on the paypal site (usually the same as the returnUrl param).
*/
'cancelUrl' => 'https://www.yourdomain.com/checkout/payment',
),
)
);
/*
* set up your shop configuration
*/
$config['shop'] = array
(
/*
* if set to true then the visitor will get all products if templates are
* implemented.
*
* if set to false then the system will fetch all products by category
*
* NOTE: Only if affected templates are implemented.
*/
'singlePage' => true,
/*
* if set to true then the visitor will get all popular products on homepage
*
* if set to false then the visitor doesn't get all popular products showed on homepage.
*
* NOTE: Only if affected templates are implemented.
*/
'popularProducts' => false
);
/* TODO: Deprecated - remove */
$config['css'] = array
(
'minify' => true
);
/* TODO: Deprecated - remove */
$config['js'] = array
(
'minify' => false
);
$config['routes'] = array
(
/*
* set up your default custom entry point
*/
'custom' => '/',
/*
* set up your default admin entry point
*/
'admin' => '/admin',
/*
* set up your default 404-page
*/
'not_found' => 'PageNotFound'
);
/*
* set up your salt for password hashing
*/
$config['salt'] = 'mysalt';
/*
* set up your dummy image. This image wil be used
* for not existing images called by the browser.
*/
$config['dummies'] = array
(
'image' => '/assets/images/placeholder/noimage.png'
);
/*
* set up your smtp configuration
*/
$config['smtp'] = array
(
'host' => 'mail.hoster.net',
'auth' => true,
'username' => '[email protected]',
'password' => 'xyz',
'secure' => 'tls',
'port' => 587,
'from' => '[email protected]',
'fromName' => 'Your name in here',
'signature' => array
(
'html' => 'your signature in html',
'plain' => 'your signature in plain text'
),
// If in development mode, set delay as int for
// the amount of seconds for the time of email send.
'delay' => 0,
'debug' => false
);
$config['session'] = array
(
'security_code' => 'do a random sec code',
'lock_to_user_agent' => true,
'lock_to_user_ip' => false,
'cookie_domain' => '.yourdomain.com'
);
$config['bootstrap'] = array
(
'layout' => 'bootstrap.html'
);
// Content Security Policy configuration :
$config['CSP'] = array
(
'default-src' => array
(
"'self'"
),
'script-src' => array
(
"'self'",
"'unsafe-inline'",
'https://cdnjs.cloudflare.com/ajax/libs/gsap/',
'https://www.google.com/recaptcha/',
'https://www.gstatic.com/recaptcha/',
'https://cdnjs.cloudflare.com/ajax/libs/ScrollMagic/',
"https://www.google-analytics.com/analytics.js 'unsafe-eval'",
"https://maps.googleapis.com/ 'unsafe-eval'"
),
'frame-src' => array
(
"'self'",
'https://www.google.com/',
'https://maps.google.com/',
),
'child-src' => array
(
"'self'",
'https://www.google.com/',
'https://maps.google.com/',
),
'style-src' => array
(
"'self'",
"'unsafe-inline'",
'https://fonts.googleapis.com/'
),
'font-src' => array
(
"'self'",
'https://fonts.gstatic.com/'
),
'img-src' => array
(
"'self'",
'https://www.google-analytics.com/',
'https://csi.gstatic.com/',
'https://maps.gstatic.com/',
'https://maps.googleapis.com/',
'https://stats.g.doubleclick.net/',
'https://mts.googleapis.com/',
'data:'
)
);
// Google recaptcha configuration:
$config['recaptcha'] = array
(
'siteKey' => '6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI',
'secretKey' => '6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe',
'hostname' => 'yourdomain.com'
);
// homepage language configuration:
$config['language'] = array
(
'default' => 'DE', // set your default homepage language
'autodetect' => true // set language detection by client browser preferred languages
);