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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1074
48e16e856646 Use long tags.
Matti Hamalainen <ccr@tnsp.org>
parents: 1043
diff changeset
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
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
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
faa835271dfd Update example config.
Matti Hamalainen <ccr@tnsp.org>
parents: 1092
diff changeset
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
559b50fd94a9 Update comments.
Matti Hamalainen <ccr@tnsp.org>
parents: 539
diff changeset
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
559b50fd94a9 Update comments.
Matti Hamalainen <ccr@tnsp.org>
parents: 539
diff changeset
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
559b50fd94a9 Update comments.
Matti Hamalainen <ccr@tnsp.org>
parents: 539
diff changeset
19 // "sqlOptions" => array(), // See PDO documentation
22
f2877f1b0b75 Update configuration template.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
20
566
559b50fd94a9 Update comments.
Matti Hamalainen <ccr@tnsp.org>
parents: 539
diff changeset
21 // Log debug information in error_log, also enables use of GET
559b50fd94a9 Update comments.
Matti Hamalainen <ccr@tnsp.org>
parents: 539
diff changeset
22 // requests for certain data that normally can only be used via
559b50fd94a9 Update comments.
Matti Hamalainen <ccr@tnsp.org>
parents: 539
diff changeset
23 // POST (for easier manual testing). WARNING! Do NOT enable
559b50fd94a9 Update comments.
Matti Hamalainen <ccr@tnsp.org>
parents: 539
diff changeset
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
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
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
faa835271dfd Update example config.
Matti Hamalainen <ccr@tnsp.org>
parents: 1092
diff changeset
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
6cd2ae354e0a Update example config.
Matti Hamalainen <ccr@tnsp.org>
parents: 664
diff changeset
42
1095
faa835271dfd Update example config.
Matti Hamalainen <ccr@tnsp.org>
parents: 1092
diff changeset
43 "admTimeout" => 60,
805
546058da8f07 Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents: 743
diff changeset
44
743
6cd2ae354e0a Update example config.
Matti Hamalainen <ccr@tnsp.org>
parents: 664
diff changeset
45 // Entry file paths and URL prefixes
814
e59d57cc3aa8 Update example config.
Matti Hamalainen <ccr@tnsp.org>
parents: 805
diff changeset
46 "entryMaxSize" => 16 * 1024 * 1024, // max file size
743
6cd2ae354e0a Update example config.
Matti Hamalainen <ccr@tnsp.org>
parents: 664
diff changeset
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
faa835271dfd Update example config.
Matti Hamalainen <ccr@tnsp.org>
parents: 1092
diff changeset
53 "previewMaxSize" => 16 * 1024 * 1024, // max file size
743
6cd2ae354e0a Update example config.
Matti Hamalainen <ccr@tnsp.org>
parents: 664
diff changeset
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
faa835271dfd Update example config.
Matti Hamalainen <ccr@tnsp.org>
parents: 1092
diff changeset
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
e59d57cc3aa8 Update example config.
Matti Hamalainen <ccr@tnsp.org>
parents: 805
diff changeset
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
0c11b391007b Fix example config.
Matti Hamalainen <ccr@tnsp.org>
parents: 890
diff changeset
71 "OggVorbis" => array("-f" => "ogg", "-c:a" => "libvorbis", "-q:a" => 5),
0c11b391007b Fix example config.
Matti Hamalainen <ccr@tnsp.org>
parents: 890
diff changeset
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
6cd2ae354e0a Update example config.
Matti Hamalainen <ccr@tnsp.org>
parents: 664
diff changeset
83 "previewThumbSize" => array(64, 48),
0
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
84 );
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
85
805
546058da8f07 Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents: 743
diff changeset
86
51
7bdf89601ba0 Work on session stuff.
Matti Hamalainen <ccr@tnsp.org>
parents: 35
diff changeset
87 date_default_timezone_set("Europe/Helsinki");
0
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
88
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
89 $securePages = array(
1095
faa835271dfd Update example config.
Matti Hamalainen <ccr@tnsp.org>
parents: 1092
diff changeset
90 "register" => true,
faa835271dfd Update example config.
Matti Hamalainen <ccr@tnsp.org>
parents: 1092
diff changeset
91 "vote" => true,
0
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
92 );
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
93
22
f2877f1b0b75 Update configuration template.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
94
1095
faa835271dfd Update example config.
Matti Hamalainen <ccr@tnsp.org>
parents: 1092
diff changeset
95 $pageTitle = "Finnish Amiga Party 2017";
0
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
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
0c4da4d813ba Update example config.
Matti Hamalainen <ccr@tnsp.org>
parents: 814
diff changeset
98 "css/main.css" => FALSE,
1095
faa835271dfd Update example config.
Matti Hamalainen <ccr@tnsp.org>
parents: 1092
diff changeset
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
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
102
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
103 ?>