Configuration Files
While many HumHub settings can be configured directly within the administration backend, some more specific or low-level configuration must be specified within configuration files.
The default configuration files of HumHub reside in @humhub/protected/humhub/config
and should not be touched.
Administrators can overwrite or extend the default configuration within the configuration files
residing in @humhub/protected/config
as described in the following section.
File Configuration
The main application configuration of HumHub consists of different configuration files which are loaded and merged in a specific
order, whereas the last loaded configuration file may overwrites the previous configurations. The following files
residing in @humhub/protected/config
can be used to specify custom configurations.
common.php
- Configuration used in Console & Web Applicationweb.php
- Configuration used exclusively in the Web Applicationconsole.php
- Configuration used exclusively the Console Application
Note, the shortcoming of this merging technique is, that it is not possible to replace an array value:
// common.php
return [
//..
'someValue' => [
'oldValue'
]
//..
]
merged with:
// web.php
return [
//..
'someValue' => [
'newValue'
]
//..
]
will result in:
// resulting config
return [
//..
'someValue' => [
'oldValue',
'newValue'
]
//..
]
Configuration loading order
Web Application
@protected/humhub/config/common.php
@protected/humhub/config/web.php
@protected/config/dynamic.php
@protected/config/common.php
@protected/config/web.php
Console Application
@protected/humhub/config/common.php
@protected/humhub/config/console.php
@protected/config/dynamic.php
@protected/config/common.php
@protected/config/console.php
If you are not sure where to put your configuration, in most cases you can use the common.php
file.
This file will be used for the web as well as the console application.
Do not edit the core configuration files under @humhub/protected/humhub/config/
directly.
Application Parameters
Some application behaviours can be adjusted by configuring application parameters within one of the configuration files:
// protected/config/web.php
return [
'params' => [
'enablePjax' => false
]
];
Available params:
⚠️ Under construction.
Parameter | Description |
---|---|
allowedLanguages | see the Translations Section |
dailyCronExecutionTime | When to execute the daily cron job (default 18:00) |
enablePjax | used to disable/enable pjax support (default true) |
Module Configurations
Some modules may allow further configurations by overwriting fields of their Module.php
class.
Those configurations can be overwritten within your common.php
file as follows:
Example:
return [
'modules' => [
'activity' => [
'weeklySummaryDay' => 0
]
]
]