Help:Configuration preloading

From Linux Web Expert

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:

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

#scite could not render a citation text for reference "gh:smw:4684" because type "pullrequest" was not assigned to a template.

References

  1. ^ gh:smw:4684