-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.php
187 lines (158 loc) · 3.73 KB
/
config.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
<?php
/*
* Localization and timezone settings
*/
setlocale(LC_ALL, 'de_DE.UTF8');
date_default_timezone_set('Europe/Berlin');
/*
* Institution, company, person using/hosting this application
*/
define('CONTEXT_TITLE', 'Universität Rostock');
/*
* Name of the program with current version
*/
define('TB_NAME_WITH_VERSION', 'Tweedback 1.0');
/*
* Activate for development
*/
define('DEBUG', true);
/*
* There are still compability problems with JSON types within headers:
* application/json The correct type. Should be used.
* text/javascript If unavoidable, only use it as temporary workaround.
*/
define('JSON_HEADER', 'Content-Type: application/json; charset=utf-8');
/*
* The number of event simultaneously listed on event selection page
*/
define('EVENT_REQUEST_PAGE_SIZE', 25);
/*
* Limits the maximum length of usernames
*/
define('MAXIMUM_USERNAME_LENGTH', 15);
// Cookie expire in 1 day
define('COOKIE_TIME_EXPIRE', time() + 84600);
// Cookie starts with
define('COOKIE_KEY_START', 'tweedback_event_');
define('COOKIE_USER_START', 'user_');
define('COOKIE_KEY_USER', 'user');
// min users
define('MIN_USER', 20);
// path to cache dir
define('PATH_CACHE_DIR', 'tmp/');
define('TYPE_USER', 'user');
define('TYPE_SYSTEM', 'system');
// minutes the user is active
define('MINUTES_ACTIVE', 5);
/*
* globalize config object
*/
global $tb_config;
/**
* Informations to connect to database server
*/
$tb_config['database']['server'] = 'localhost';
$tb_config['database']['username'] = 'tweedback';
$tb_config['database']['password'] = 'tweedback';
$tb_config['database']['database'] = 'tweedback';
/**
* Information for sending emails
*/
$tb_config['email']['from'] = '[email protected]';
$tb_config['email']['from-name'] = 'Webserver (Tweedback)';
$tb_config['email']['reply-to'] = '[email protected]';
$tb_config['email']['reply-to-name'] = 'Webserver (Tweedback)';
/**
* A list of Javascript files needed for Tweedback
* @var array
*/
$tb_config['javascript'] = array(
'http://code.jquery.com/jquery-1.6.2.min.js',
'http://code.jquery.com/mobile/1.0b3/jquery.mobile-1.0b3.min.js',
'js/jstorage.js',
'js/tb-message-list.js',
'js/tweedback.js',
'js/tb-init.js',
'js/tb-event-selection.js',
'js/tb-create-event.js',
'js/tb-feedback-page.js',
'js/tb-user-settings.js',
'js/tb-help.js',
);
/**
* A list of CSS files needed for Tweedback
* @var array
*/
$tb_config['css'] = array(
'css/jquery.mobile-1.0b3.min.css',
'css/style.css',
);
/**
* possible event durations
* @var array
*/
$tb_config['event_duration'] = array(2, 4, 6, 12, 24);
/**
* Meters
*/
$tb_config['meters'] = array(
array(
'name' => 'speed',
'id' => 1,
'label' => _('Talking Speed'),
'buttonLabels' => array(
'-' => _('Too Slow'),
'+' => _('Too Fast'),
'0' => _('Fine'),
),
'bucket' => 'speed',
),
array(
'name' => 'understanding',
'id' => 2,
'label' => _('asdf'),
'buttonLabels' => array(
'-' => _('Too Slow'),
'+' => _('Too Fast'),
'0' => _('Fine'),
),
'bucket' => 'understanding',
)
);
$tb_config['meterValues'] = array(
'tooFast' => array(
'id' => 1,
'meterName' => 'speed',
'direction' => '>',
),
'tooSlow' => array(
'id' => 2,
'meterName' => 'speed',
'direction' => '<',
),
'unclear' => array(
'id' => 3,
'meterName' => 'understanding',
'direction' => '<',
),
);
$tb_config['buckets'] = array(
1 => 'ban',
2 => 'later',
3 => 'delete',
4 => 'speed',
);
$tb_config['categories'] = array(
array(
'id' => 1,
'name' => 'example',
'label' => _('Example'),
'description' => _('Please Give an Example'),
),
array(
'id' => 2,
'name' => 'explanation',
'label' => _('Explanation'),
'description' => _('Please Give an Explanation'),
),
);