Status: | effective |
Progress: | 100% |
Version: | 3.2.0+ |
Help:Configuration preloading
Configuration preloading was added in Semantic MediaWiki 3.2.0Released on an unknown date unknown versions of MediaWiki1 as mechanism to preload a set of configurations that would otherwise have to be added manually each time a wiki is created.
The objective of the preloading is to allow users to prepare profiles that are reusable and minimize the effort to customize a Semantic MediaWiki instance for a specific use case.
Profiles
Default profiles
The following configuration profiles are provided by default and demonstrate the expected file format:
- File:Octocat.png Profile "media.php" – Defines common configuration settings relating to media file usage
- File:Octocat.png Profile "elastic-fileingest.php" – Defines common configuration settings in connection with the
SMWElasticStore
query backend and file ingestion - File:Octocat.png Profile "db-primary-keys.php" – Defines common configuration settings in connection with adds primary keys to Semantic MediaWiki owned tables to help specialized relational datastore environments like "Percona XtraDB Cluster"
- File:Octocat.png Profile "developer.php" – Defines common configuration settings mostly relevant when developing in connection with Semantic MediaWiki
In future it should be easily possible to provide other profiles to help users more quickly to adapt their installation without having to identify each single configuration necessary to enable a certain aspect of the software.
Custom profiles
In case a wiki environment has common configuration settings that need to be preserved and reused then it is possible to store those in a separate ".php"-file.
Usage
Default profiles
In case a wiki environment wants to make use of default configuration profiles they can be preloaded like, e.g.:
enableSemantics( 'example.org' )->loadDefaultConfigFrom(
'developer.php',
'media.php'
);
Custom profiles
In case a wiki environment wants to make use of customized configuration profiles they can be preloaded like, e.g.:
enableSemantics( 'example.org' )->loadConfigFrom(
__DIR__ . '/path/to/file/myCustomConfiguration.php'
);
Note
As with any configuration that is added to the "LocalSettings.php" file, the loading sequence is important. Adding something before or after a certain will have an effect of how the configuration is treated. This means that a configuration added via a configuration profile will be overridden by any configuration of the same name that is added after loadDefaultConfigFrom
or loadConfigFrom
, i.e. after including these configuration.
See also
- Help page on the
enableSemantics
function - Help page with an overview of available configuration parameters
References
- ^ gh:smw:4684