/
common.php
189 lines (182 loc) · 6.24 KB
/
common.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
188
189
<?php
Yii::setAlias('@webroot', realpath(__DIR__ . '/../../../'));
Yii::setAlias('@app', '@webroot/protected');
Yii::setAlias('@humhub', '@app/humhub');
$config = [
'name' => 'HumHub',
'version' => '1.0.1',
'basePath' => dirname(__DIR__) . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR,
'bootstrap' => ['log', 'humhub\components\bootstrap\ModuleAutoLoader'],
'sourceLanguage' => 'en',
'components' => [
'moduleManager' => [
'class' => '\humhub\components\ModuleManager'
],
'log' => [
'traceLevel' => YII_DEBUG ? 3 : 0,
'targets' => [
[
'class' => 'yii\log\FileTarget',
'levels' => ['error', 'warning'],
'logVars' => ['_GET', '_SERVER'],
],
[
'class' => 'yii\log\DbTarget',
'levels' => ['error', 'warning'],
'logVars' => ['_GET', '_SERVER'],
],
],
],
'search' => array(
'class' => 'humhub\modules\search\engine\ZendLuceneSearch',
),
'i18n' => [
'class' => 'humhub\components\i18n\I18N',
'translations' => [
'base' => [
'class' => 'yii\i18n\PhpMessageSource',
'basePath' => '@humhub/messages'
],
'security' => [
'class' => 'yii\i18n\PhpMessageSource',
'basePath' => '@humhub/messages'
],
'error' => [
'class' => 'yii\i18n\PhpMessageSource',
'basePath' => '@humhub/messages'
],
'widgets_views_markdownEditor' => [
'class' => 'yii\i18n\PhpMessageSource',
'basePath' => '@humhub/messages'
],
],
],
'formatter' => [
'class' => 'humhub\components\i18n\Formatter',
],
/**
* Deprecated
*/
'formatterApp' => [
'class' => 'yii\i18n\Formatter',
],
'cache' => [
'class' => 'yii\caching\DummyCache',
],
'mailer' => [
'class' => 'yii\swiftmailer\Mailer',
'viewPath' => '@humhub/views/mail',
'view' => [
'class' => '\humhub\components\View',
'theme' => [
'class' => '\humhub\components\Theme',
'name' => 'HumHub'
],
],
],
'assetManager' => [
'appendTimestamp' => true,
],
'view' => [
'class' => '\humhub\components\View',
'theme' => [
'class' => '\humhub\components\Theme',
'name' => 'HumHub',
],
],
'db' => [
'class' => 'yii\db\Connection',
'dsn' => 'mysql:host=localhost;dbname=humhub',
'username' => '',
'password' => '',
'charset' => 'utf8',
'enableSchemaCache' => true,
],
],
'params' => [
'installed' => false,
'databaseInstalled' => false,
'dynamicConfigFile' => '@app/config/dynamic.php',
'moduleAutoloadPaths' => ['@app/modules', '@humhub/modules'],
'moduleMarketplacePath' => '@app/modules',
'availableLanguages' => [
'en' => 'English (US)',
'en_gb' => 'English (UK)',
'de' => 'Deutsch',
'fr' => 'Français',
'nl' => 'Nederlands',
'pl' => 'Polski',
'pt' => 'Português',
'pt_br' => 'Português do Brasil',
'es' => 'Español',
'ca' => 'Català',
'it' => 'Italiano',
'th' => 'ไทย',
'tr' => 'Türkçe',
'ru' => 'Русский',
'uk' => 'українська',
'el' => 'Ελληνικά',
'ja' => '日本語',
'hu' => 'Magyar',
'nb_no' => 'Nnorsk bokmål',
'zh_cn' => '中文(简体)',
'zh_tw' => '中文(台灣)',
'an' => 'Aragonés',
'vi' => 'Tiếng Việt',
'sv' => 'Svenska',
'cs' => 'čeština',
'da' => 'dansk',
'uz' => 'Ўзбек',
'fa_ir' => 'فارسی',
'bg' => 'български',
'sk' => 'slovenčina',
'ro' => 'română',
'ar' => 'العربية/عربي',
'ko' => '한국어',
'id' => 'Bahasa Indonesia',
'lt' => 'lietuvių kalba',
],
'user' => [
// Minimum username length
'minUsernameLength' => 4,
// Administrators can change profile image/banners of alle users
'adminCanChangeProfileImages' => false
],
'ldap' => [
// LDAP date field formats
'dateFields' => [
//'birthday' => 'Y.m.d'
],
],
'formatter' => [
// Default date format, used especially in DatePicker widgets
// Deprecated: Use Yii::$app->formatter->dateInputFormat instead.
'defaultDateFormat' => 'short',
// Seconds before switch from relative time to date format
// Set to false to always use relative time in TimeAgo Widget
'timeAgoBefore' => 172800,
// Use static timeago instead of timeago js
'timeAgoStatic' => false,
// Seconds before hide time from timeago date
// Set to false to always display time
'timeAgoHideTimeAfter' => 259200,
// Optional: Callback for TimageAgo FullDateFormat
//'timeAgoFullDateCallBack' => function($timestamp) {
// return 'formatted';
//}
],
'humhub' => [
// Marketplace / New Version Check
'apiEnabled' => true,
'apiUrl' => 'https://api.humhub.com',
],
'search' => [
'zendLucenceDataDir' => '@runtime/searchdb',
],
'curl' => [
// Check SSL certificates on CURL requests
'validateSsl' => true,
],
]
];
return $config;