forked from corneyflorex/TaskBoard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsettings.php
76 lines (65 loc) · 1.8 KB
/
settings.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
<?php //Import settings via require("settings.php");
// Settings
// configuration
$__initEnable = true; // Disable After Install (set to 'false' rather than 'true')
$__debug = false; // Dev mode
$settingMode = "sqlite";
switch($settingMode){
case "mysql":
$dbType = "mysql";
$dbHost = "localhost";
$dbName = "taskboard";
$dbuser = "root";
$dbpass = "";
$dbConnection = "host=".$dbHost.";dbname=".$dbName;
break;
case "sqlite":
$dbType = "sqlite";
$dbuser = "";
$dbpass = "";
$dbConnection = "tasks.sq3";
break;
}
/*Annoucements for each tag. "Home" is the tag for the front page */
$__tagPageArray = array(
"home" => "Hi all and thanks for coming to TaskBoard, click below to start posting!"
,
"anonymous" => "Hey anons, well this is just a short message from admin"
);
$__defaultTags = array("home","news","personal");
// There was a problem with using parse_ini_string, when using it with MySQL
// Basically it borked at the string "dsn = ' mysql:host=HOSTNAME;dbname=DBNAME' "
// NOTE: This is fine, as long as you provide good comments so noobs dont bork it up
// or maybe we should move this to settings.php so we can easily back it up?
$config = array(
"homepage" =>array(
"tasks_to_show" => 10
)
,
"tasks" =>array(
"lifespan" => 1
)
,
"database" =>array(
"dsn" => $dbType.":".$dbConnection
,
"username" =>$dbuser
,
"password" =>$dbpass
)
);
//if($__debug) var_dump($config);
/*
$config_str = <<<SETTINGS
[homepage]
tasks_to_show = 10
[tasks]
lifespan = 1
[database]
dsn = sqlite:tasks.sq3
username =
password =
SETTINGS;
$config = parse_ini_string($config_str, true);
*/
?>