Mercurial > hg > fapweb
annotate mconfig.inc.php.example @ 1095:faa835271dfd
Update example config.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 27 Jan 2017 22:11:40 +0200 |
parents | 95b74632cfe2 |
children | bbc0a3d0b51e |
rev | line source |
---|---|
1074 | 1 <?php |
536
380cd0151890
Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents:
290
diff
changeset
|
2 // |
380cd0151890
Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents:
290
diff
changeset
|
3 // Site configuration, important settings that MUST be |
380cd0151890
Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents:
290
diff
changeset
|
4 // reviewed and set correctly before deployment. |
380cd0151890
Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents:
290
diff
changeset
|
5 // |
0 | 6 $siteSettings = array( |
536
380cd0151890
Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents:
290
diff
changeset
|
7 |
380cd0151890
Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents:
290
diff
changeset
|
8 // Admin interface password |
22
f2877f1b0b75
Update configuration template.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
9 // "admPassword" => "xxx", |
1095 | 10 "admPassword" => false, |
536
380cd0151890
Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents:
290
diff
changeset
|
11 |
380cd0151890
Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents:
290
diff
changeset
|
12 // SQL database PHP data source name, etc. Refer to |
380cd0151890
Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents:
290
diff
changeset
|
13 // http://www.php.net/manual/en/pdo.construct.php |
566 | 14 // Has been tested with SQLite3 and PostgreSQL backends. |
22
f2877f1b0b75
Update configuration template.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
15 "sqlDB" => "sqlite:fap.sqlite3", |
566 | 16 // "sqlDB" => "pgsql:dbname=fap2014", |
539
dc37dab2a6d7
Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents:
536
diff
changeset
|
17 // "sqlUsername" => "", // Leave unset if not needed |
dc37dab2a6d7
Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents:
536
diff
changeset
|
18 // "sqlPassword" => "", // --""-- |
566 | 19 // "sqlOptions" => array(), // See PDO documentation |
22
f2877f1b0b75
Update configuration template.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
20 |
566 | 21 // Log debug information in error_log, also enables use of GET |
22 // requests for certain data that normally can only be used via | |
23 // POST (for easier manual testing). WARNING! Do NOT enable | |
24 // for production sites without a good reason. | |
22
f2877f1b0b75
Update configuration template.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
25 "debug" => false, |
0 | 26 |
536
380cd0151890
Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents:
290
diff
changeset
|
27 // Default page |
123
5837b9333964
Add new "about" page, and setting for default page.
Matti Hamalainen <ccr@tnsp.org>
parents:
97
diff
changeset
|
28 "defaultPage" => "about", // Default page |
5837b9333964
Add new "about" page, and setting for default page.
Matti Hamalainen <ccr@tnsp.org>
parents:
97
diff
changeset
|
29 |
1089
00632d30bafe
Implement new settings for making user/votekeys case-insensitive and
Matti Hamalainen <ccr@tnsp.org>
parents:
1074
diff
changeset
|
30 // User key/votekey settings |
1095 | 31 "userKeyMode" => 1, // See msite.inc.php for VOTE_* |
1089
00632d30bafe
Implement new settings for making user/votekeys case-insensitive and
Matti Hamalainen <ccr@tnsp.org>
parents:
1074
diff
changeset
|
32 "userKeyLength" => 6, // Vote key length in characters |
00632d30bafe
Implement new settings for making user/votekeys case-insensitive and
Matti Hamalainen <ccr@tnsp.org>
parents:
1074
diff
changeset
|
33 //"userKeyCase" => true, // If false, keys are case-INsensitive |
00632d30bafe
Implement new settings for making user/votekeys case-insensitive and
Matti Hamalainen <ccr@tnsp.org>
parents:
1074
diff
changeset
|
34 //"userKeyChars" => "abdefghjkmnpqrstwxyzABCDEFGHJKLMNPQRSTUVWXYZ23456789", // Characters to be used for key generation |
536
380cd0151890
Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents:
290
diff
changeset
|
35 |
380cd0151890
Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents:
290
diff
changeset
|
36 // Voting settings |
22
f2877f1b0b75
Update configuration template.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
37 "voteMin" => -1, |
f2877f1b0b75
Update configuration template.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
38 "voteMax" => 2, |
536
380cd0151890
Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents:
290
diff
changeset
|
39 |
94
6edd7d623eab
Start adding votekey modes code.
Matti Hamalainen <ccr@tnsp.org>
parents:
51
diff
changeset
|
40 |
22
f2877f1b0b75
Update configuration template.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
41 "admTimeout" => 15, |
743 | 42 |
1095 | 43 "admTimeout" => 60, |
805
546058da8f07
Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents:
743
diff
changeset
|
44 |
743 | 45 // Entry file paths and URL prefixes |
814 | 46 "entryMaxSize" => 16 * 1024 * 1024, // max file size |
743 | 47 "entryPath" => "/home/ccr/files/", // should be absolute path |
805
546058da8f07
Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents:
743
diff
changeset
|
48 "entryPathPerms" => 0755, |
546058da8f07
Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents:
743
diff
changeset
|
49 "entryFilePerms" => 0644, |
546058da8f07
Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents:
743
diff
changeset
|
50 |
546058da8f07
Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents:
743
diff
changeset
|
51 "previewPath" => "/home/ccr/fapdev/previews/", // should be absolute path |
546058da8f07
Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents:
743
diff
changeset
|
52 "previewURL" => "http://localhost:8888/previews/", // can be relative (should point to same dir as previewPath) |
1095 | 53 "previewMaxSize" => 16 * 1024 * 1024, // max file size |
743 | 54 "thumbnailSubDir" => "tn/", // relative subdir to previewPath and previewURL |
805
546058da8f07
Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents:
743
diff
changeset
|
55 "previewPathPerms" => 0711, |
546058da8f07
Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents:
743
diff
changeset
|
56 "previewFilePerms" => 0644, |
546058da8f07
Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents:
743
diff
changeset
|
57 |
546058da8f07
Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents:
743
diff
changeset
|
58 // Generated sample files settings |
546058da8f07
Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents:
743
diff
changeset
|
59 // Used for openmpt123 and avconv |
546058da8f07
Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents:
743
diff
changeset
|
60 "sampleFreq" => 44100, // in Hz |
546058da8f07
Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents:
743
diff
changeset
|
61 "sampleChannels" => 1, // 1 = mono, 2 = stereo |
546058da8f07
Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents:
743
diff
changeset
|
62 "sampleDuration" => 30, // in seconds |
546058da8f07
Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents:
743
diff
changeset
|
63 |
1043
c0e21a405256
Change external tool handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
1028
diff
changeset
|
64 //"avconv_exe" => "ffmpeg", // avconv/ffmpeg binary executable |
c0e21a405256
Change external tool handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
1028
diff
changeset
|
65 //"gfxconv_exe" => "gfxconv", |
c0e21a405256
Change external tool handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
1028
diff
changeset
|
66 //"openmpg123_exe" => "openmpt123", |
1095 | 67 "openmpt123_args" => "--filter 1", // Extra commandline arguments for openmpt123 |
1028
8f242f756b0b
Add new configuration setting "openmpt123ExtraArgs".
Matti Hamalainen <ccr@tnsp.org>
parents:
973
diff
changeset
|
68 |
814 | 69 // Samples to be generated, and their avconv settings |
805
546058da8f07
Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents:
743
diff
changeset
|
70 "sampleTypes" => array( |
973 | 71 "OggVorbis" => array("-f" => "ogg", "-c:a" => "libvorbis", "-q:a" => 5), |
72 "MP3" => array("-f" => "mp3", "-c:a" => "libmp3lame", "-b:a" => "96k"), | |
805
546058da8f07
Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents:
743
diff
changeset
|
73 ), |
546058da8f07
Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents:
743
diff
changeset
|
74 |
546058da8f07
Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents:
743
diff
changeset
|
75 // Preview image files settings |
890
d6548ad68134
Add setting for cases where preview does not exist.
Matti Hamalainen <ccr@tnsp.org>
parents:
878
diff
changeset
|
76 "previewNoImage" => "img/nopreview_tn.png", |
805
546058da8f07
Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents:
743
diff
changeset
|
77 "previewImageType" => "PNG", // Generally PNG or JPEG |
546058da8f07
Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents:
743
diff
changeset
|
78 "previewImageQuality" => 9, // compression (PNG) or quality (JPEG) |
546058da8f07
Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents:
743
diff
changeset
|
79 "previewImageSize" => array(640, 480), // resolution W x H |
546058da8f07
Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents:
743
diff
changeset
|
80 |
546058da8f07
Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents:
743
diff
changeset
|
81 "previewThumbType" => "PNG", |
546058da8f07
Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents:
743
diff
changeset
|
82 "previewThumbQuality" => 9, // compression (PNG) or quality (JPEG) |
743 | 83 "previewThumbSize" => array(64, 48), |
0 | 84 ); |
85 | |
805
546058da8f07
Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents:
743
diff
changeset
|
86 |
51 | 87 date_default_timezone_set("Europe/Helsinki"); |
0 | 88 |
89 $securePages = array( | |
1095 | 90 "register" => true, |
91 "vote" => true, | |
0 | 92 ); |
93 | |
22
f2877f1b0b75
Update configuration template.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
94 |
1095 | 95 $pageTitle = "Finnish Amiga Party 2017"; |
0 | 96 $pageCharset = "utf-8"; |
180
a3f0f2a3551a
Split stylesheets into separate files for different platforms and also split
Matti Hamalainen <ccr@tnsp.org>
parents:
179
diff
changeset
|
97 $pageCSS = array( |
878 | 98 "css/main.css" => FALSE, |
1095 | 99 "css/desktop.css" => "only screen and (min-width: 800px)", |
582
0d13496e9c0a
Update example configuration - the CSS files are now under css/ subdirectory
Matti Hamalainen <ccr@tnsp.org>
parents:
566
diff
changeset
|
100 "css/mobile.css" => "only screen and (max-width: 799px), only screen and (max-device-width: 799px)" |
180
a3f0f2a3551a
Split stylesheets into separate files for different platforms and also split
Matti Hamalainen <ccr@tnsp.org>
parents:
179
diff
changeset
|
101 ); |
0 | 102 |
103 ?> |