Mercurial > hg > fapweb
annotate mconfig.inc.php.example @ 1089:00632d30bafe
Implement new settings for making user/votekeys case-insensitive and
setting the array of characters used for generating keys in the config.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 26 Jan 2017 01:27:32 +0200 |
parents | 48e16e856646 |
children | 95b74632cfe2 |
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", |
536
380cd0151890
Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents:
290
diff
changeset
|
10 |
380cd0151890
Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents:
290
diff
changeset
|
11 // SQL database PHP data source name, etc. Refer to |
380cd0151890
Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents:
290
diff
changeset
|
12 // http://www.php.net/manual/en/pdo.construct.php |
566 | 13 // Has been tested with SQLite3 and PostgreSQL backends. |
22
f2877f1b0b75
Update configuration template.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
14 "sqlDB" => "sqlite:fap.sqlite3", |
566 | 15 // "sqlDB" => "pgsql:dbname=fap2014", |
539
dc37dab2a6d7
Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents:
536
diff
changeset
|
16 // "sqlUsername" => "", // Leave unset if not needed |
dc37dab2a6d7
Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents:
536
diff
changeset
|
17 // "sqlPassword" => "", // --""-- |
566 | 18 // "sqlOptions" => array(), // See PDO documentation |
22
f2877f1b0b75
Update configuration template.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
19 |
566 | 20 // Log debug information in error_log, also enables use of GET |
21 // requests for certain data that normally can only be used via | |
22 // POST (for easier manual testing). WARNING! Do NOT enable | |
23 // for production sites without a good reason. | |
22
f2877f1b0b75
Update configuration template.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
24 "debug" => false, |
0 | 25 |
536
380cd0151890
Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents:
290
diff
changeset
|
26 // Default page |
123
5837b9333964
Add new "about" page, and setting for default page.
Matti Hamalainen <ccr@tnsp.org>
parents:
97
diff
changeset
|
27 "defaultPage" => "about", // Default page |
5837b9333964
Add new "about" page, and setting for default page.
Matti Hamalainen <ccr@tnsp.org>
parents:
97
diff
changeset
|
28 |
1089
00632d30bafe
Implement new settings for making user/votekeys case-insensitive and
Matti Hamalainen <ccr@tnsp.org>
parents:
1074
diff
changeset
|
29 // User key/votekey settings |
00632d30bafe
Implement new settings for making user/votekeys case-insensitive and
Matti Hamalainen <ccr@tnsp.org>
parents:
1074
diff
changeset
|
30 "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
|
31 //"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
|
32 //"userKeyChars" => "abdefghjkmnpqrstwxyzABCDEFGHJKLMNPQRSTUVWXYZ23456789", // Characters to be used for key generation |
536
380cd0151890
Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents:
290
diff
changeset
|
33 |
380cd0151890
Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents:
290
diff
changeset
|
34 // Voting settings |
22
f2877f1b0b75
Update configuration template.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
35 "voteMin" => -1, |
f2877f1b0b75
Update configuration template.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
36 "voteMax" => 2, |
536
380cd0151890
Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents:
290
diff
changeset
|
37 |
94
6edd7d623eab
Start adding votekey modes code.
Matti Hamalainen <ccr@tnsp.org>
parents:
51
diff
changeset
|
38 "voteKeyMode" => -1, // See msite.inc.php for VOTE_* |
6edd7d623eab
Start adding votekey modes code.
Matti Hamalainen <ccr@tnsp.org>
parents:
51
diff
changeset
|
39 |
743 | 40 "userTimeout" => 120, // In minutes |
22
f2877f1b0b75
Update configuration template.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
41 "admTimeout" => 15, |
743 | 42 |
805
546058da8f07
Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents:
743
diff
changeset
|
43 |
743 | 44 // Entry file paths and URL prefixes |
814 | 45 "entryMaxSize" => 16 * 1024 * 1024, // max file size |
743 | 46 "entryPath" => "/home/ccr/files/", // should be absolute path |
805
546058da8f07
Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents:
743
diff
changeset
|
47 "entryPathPerms" => 0755, |
546058da8f07
Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents:
743
diff
changeset
|
48 "entryFilePerms" => 0644, |
546058da8f07
Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents:
743
diff
changeset
|
49 |
814 | 50 "previewMaxSize" => 2 * 1024 * 1024, // max file size |
805
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) |
743 | 53 "thumbnailSubDir" => "tn/", // relative subdir to previewPath and previewURL |
805
546058da8f07
Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents:
743
diff
changeset
|
54 "previewPathPerms" => 0711, |
546058da8f07
Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents:
743
diff
changeset
|
55 "previewFilePerms" => 0644, |
546058da8f07
Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents:
743
diff
changeset
|
56 |
546058da8f07
Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents:
743
diff
changeset
|
57 // Generated sample files settings |
546058da8f07
Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents:
743
diff
changeset
|
58 // Used for openmpt123 and avconv |
546058da8f07
Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents:
743
diff
changeset
|
59 "sampleFreq" => 44100, // in Hz |
546058da8f07
Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents:
743
diff
changeset
|
60 "sampleChannels" => 1, // 1 = mono, 2 = stereo |
546058da8f07
Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents:
743
diff
changeset
|
61 "sampleDuration" => 30, // in seconds |
546058da8f07
Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents:
743
diff
changeset
|
62 |
1043
c0e21a405256
Change external tool handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
1028
diff
changeset
|
63 //"avconv_exe" => "ffmpeg", // avconv/ffmpeg binary executable |
c0e21a405256
Change external tool handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
1028
diff
changeset
|
64 //"gfxconv_exe" => "gfxconv", |
c0e21a405256
Change external tool handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
1028
diff
changeset
|
65 //"openmpg123_exe" => "openmpt123", |
c0e21a405256
Change external tool handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
1028
diff
changeset
|
66 |
c0e21a405256
Change external tool handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
1028
diff
changeset
|
67 "openmpt123_args" => "", // 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( | |
743 | 90 "/fap2014/register" => true, |
91 "/fap2014/vote" => false, | |
0 | 92 ); |
93 | |
22
f2877f1b0b75
Update configuration template.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
94 |
743 | 95 $pageTitle = "Finnish Amiga Party 2014"; |
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, |
582
0d13496e9c0a
Update example configuration - the CSS files are now under css/ subdirectory
Matti Hamalainen <ccr@tnsp.org>
parents:
566
diff
changeset
|
99 "css/desktop.css" => "only screen and (min-width: 801px)", |
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 ?> |