annotate mconfig.inc.php.example @ 805:546058da8f07

Update example configuration.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 24 Nov 2014 09:33:45 +0200
parents 6cd2ae354e0a
children e59d57cc3aa8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
1 <?
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",
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
559b50fd94a9 Update comments.
Matti Hamalainen <ccr@tnsp.org>
parents: 539
diff changeset
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
559b50fd94a9 Update comments.
Matti Hamalainen <ccr@tnsp.org>
parents: 539
diff changeset
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
559b50fd94a9 Update comments.
Matti Hamalainen <ccr@tnsp.org>
parents: 539
diff changeset
18 // "sqlOptions" => array(), // See PDO documentation
22
f2877f1b0b75 Update configuration template.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
19
566
559b50fd94a9 Update comments.
Matti Hamalainen <ccr@tnsp.org>
parents: 539
diff changeset
20 // Log debug information in error_log, also enables use of GET
559b50fd94a9 Update comments.
Matti Hamalainen <ccr@tnsp.org>
parents: 539
diff changeset
21 // requests for certain data that normally can only be used via
559b50fd94a9 Update comments.
Matti Hamalainen <ccr@tnsp.org>
parents: 539
diff changeset
22 // POST (for easier manual testing). WARNING! Do NOT enable
559b50fd94a9 Update comments.
Matti Hamalainen <ccr@tnsp.org>
parents: 539
diff changeset
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
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
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
536
380cd0151890 Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents: 290
diff changeset
29 // Vote key length in characters
26
7be3f8cf1f7a Lots of cleanups, preparing for adding entry submission support.
Matti Hamalainen <ccr@tnsp.org>
parents: 22
diff changeset
30 "userKeyLength" => 8,
536
380cd0151890 Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents: 290
diff changeset
31
380cd0151890 Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents: 290
diff changeset
32 // Voting settings
22
f2877f1b0b75 Update configuration template.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
33 "voteMin" => -1,
f2877f1b0b75 Update configuration template.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
34 "voteMax" => 2,
536
380cd0151890 Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents: 290
diff changeset
35
94
6edd7d623eab Start adding votekey modes code.
Matti Hamalainen <ccr@tnsp.org>
parents: 51
diff changeset
36 "voteKeyMode" => -1, // See msite.inc.php for VOTE_*
6edd7d623eab Start adding votekey modes code.
Matti Hamalainen <ccr@tnsp.org>
parents: 51
diff changeset
37
743
6cd2ae354e0a Update example config.
Matti Hamalainen <ccr@tnsp.org>
parents: 664
diff changeset
38 "userTimeout" => 120, // In minutes
22
f2877f1b0b75 Update configuration template.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
39 "admTimeout" => 15,
743
6cd2ae354e0a Update example config.
Matti Hamalainen <ccr@tnsp.org>
parents: 664
diff changeset
40
805
546058da8f07 Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents: 743
diff changeset
41
743
6cd2ae354e0a Update example config.
Matti Hamalainen <ccr@tnsp.org>
parents: 664
diff changeset
42 // Entry file paths and URL prefixes
6cd2ae354e0a Update example config.
Matti Hamalainen <ccr@tnsp.org>
parents: 664
diff changeset
43 "entryPath" => "/home/ccr/files/", // should be absolute path
805
546058da8f07 Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents: 743
diff changeset
44 "entryPathPerms" => 0755,
546058da8f07 Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents: 743
diff changeset
45 "entryFilePerms" => 0644,
546058da8f07 Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents: 743
diff changeset
46
546058da8f07 Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents: 743
diff changeset
47 "previewPath" => "/home/ccr/fapdev/previews/", // should be absolute path
546058da8f07 Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents: 743
diff changeset
48 "previewURL" => "http://localhost:8888/previews/", // can be relative (should point to same dir as previewPath)
743
6cd2ae354e0a Update example config.
Matti Hamalainen <ccr@tnsp.org>
parents: 664
diff changeset
49 "thumbnailSubDir" => "tn/", // relative subdir to previewPath and previewURL
805
546058da8f07 Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents: 743
diff changeset
50 "previewPathPerms" => 0711,
546058da8f07 Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents: 743
diff changeset
51 "previewFilePerms" => 0644,
546058da8f07 Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents: 743
diff changeset
52
546058da8f07 Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents: 743
diff changeset
53 // Generated sample files settings
546058da8f07 Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents: 743
diff changeset
54 // Used for openmpt123 and avconv
546058da8f07 Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents: 743
diff changeset
55 "sampleFreq" => 44100, // in Hz
546058da8f07 Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents: 743
diff changeset
56 "sampleChannels" => 1, // 1 = mono, 2 = stereo
546058da8f07 Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents: 743
diff changeset
57 "sampleDuration" => 30, // in seconds
546058da8f07 Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents: 743
diff changeset
58
546058da8f07 Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents: 743
diff changeset
59 // Samples to be generated, and their quality settings
546058da8f07 Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents: 743
diff changeset
60 "sampleTypes" => array(
546058da8f07 Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents: 743
diff changeset
61 "MP3" => array("-b:a", 96), // cbr kbps
546058da8f07 Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents: 743
diff changeset
62 "OggVorbis" => array("-q:a", 5), // encoding quality setting
546058da8f07 Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents: 743
diff changeset
63 ),
546058da8f07 Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents: 743
diff changeset
64
546058da8f07 Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents: 743
diff changeset
65 // Preview image files settings
546058da8f07 Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents: 743
diff changeset
66 "previewImageType" => "PNG", // Generally PNG or JPEG
546058da8f07 Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents: 743
diff changeset
67 "previewImageQuality" => 9, // compression (PNG) or quality (JPEG)
546058da8f07 Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents: 743
diff changeset
68 "previewImageSize" => array(640, 480), // resolution W x H
546058da8f07 Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents: 743
diff changeset
69
546058da8f07 Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents: 743
diff changeset
70 "previewThumbType" => "PNG",
546058da8f07 Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents: 743
diff changeset
71 "previewThumbQuality" => 9, // compression (PNG) or quality (JPEG)
743
6cd2ae354e0a Update example config.
Matti Hamalainen <ccr@tnsp.org>
parents: 664
diff changeset
72 "previewThumbSize" => array(64, 48),
0
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
73 );
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
74
805
546058da8f07 Update example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents: 743
diff changeset
75
51
7bdf89601ba0 Work on session stuff.
Matti Hamalainen <ccr@tnsp.org>
parents: 35
diff changeset
76 date_default_timezone_set("Europe/Helsinki");
0
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
77
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
78 $securePages = array(
743
6cd2ae354e0a Update example config.
Matti Hamalainen <ccr@tnsp.org>
parents: 664
diff changeset
79 "/fap2014/register" => true,
6cd2ae354e0a Update example config.
Matti Hamalainen <ccr@tnsp.org>
parents: 664
diff changeset
80 "/fap2014/vote" => false,
0
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
81 );
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
82
22
f2877f1b0b75 Update configuration template.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
83
743
6cd2ae354e0a Update example config.
Matti Hamalainen <ccr@tnsp.org>
parents: 664
diff changeset
84 $pageTitle = "Finnish Amiga Party 2014";
0
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
85 $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
86 $pageCSS = array(
582
0d13496e9c0a Update example configuration - the CSS files are now under css/ subdirectory
Matti Hamalainen <ccr@tnsp.org>
parents: 566
diff changeset
87 "css/main.css" => "",
0d13496e9c0a Update example configuration - the CSS files are now under css/ subdirectory
Matti Hamalainen <ccr@tnsp.org>
parents: 566
diff changeset
88 "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
89 "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
90 );
0
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
91
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
92 ?>