Function "enableSemantics"

From semantic-mediawiki.org
Function "enableSemantics""enableSemantics" işlevi
Error screen shown due to a missing enableSemantics call in "LocalSettings.php"

The enableSemantics function should be added to the "LocalSettings.php" file to enable Semantic MediaWiki.

Usage[edit]

enableSemantics takes two parameters:

  • The domain name. This is used as URI-namespace in RDF.
  • The second parameter is optional and indicates whether the URI namespace is completed or not

Since Semantic MediaWiki 3.2.0Released on 7 September 2020 and compatible with MW 1.31.0 - 1.35.x. a configuration preloading feature is available as a mechanism to preload a set of configurations.1

Examples[edit]

enableSemantics( 'wiki.example.org' );
enableSemantics( 'example.org/id/' );

Specifying the protocol[edit]

enableSemantics( 'https://example.org/id/', true );

Empty identifier[edit]

For a local installation where no domain is available (or necessary), the enableSemantics function can be used simply with:

enableSemantics();

Context[edit]

Using the enableSemantics function ensures that:

If changes to the configuration parameter $smwgNamespaceIndexSets the index of the first namespace to be used by Semantic MediaWiki are necessary, please follow the instructions in connection with enableSemantics.2

See also[edit]


References