Help:Con­figu­ration para­meter "$smwgImportFileDirs"

From semantic-mediawiki.org


Configuration parameter details:
Title $smwgImportFileDirs
Description Sets the contents import directory for legitimate files to be imported upon Installation of Semantic MediaWiki
Default setting See below
Software Semantic MediaWiki
Since version
Until version still available
Configuration Installation
Keyword import vocabulary

$smwgImportFileDirs is a configuration parameter that sets the contents import directory for legitimate files to be imported upon Installation of Semantic MediaWiki. Moreover legitimate files are created in the .json format and contain the version specified with configuration parameter $smwgImportReqVersionSets the contents import file version for legitimate files to be imported upon Installation of Semantic MediaWiki. It was introduced in Semantic MediaWiki 2.5.0Released on 14 March 2017 and compatible with MW 1.23.0 - 1.29.x.1. In Semantic MediaWiki 3.0.0Released on an unknown date and compatible with MW 1.27.0 - 1.30.x. it was renamed2 and the default values was changed3.

Starting with Semantic MediaWiki 3.0.0Released on an unknown date and compatible with MW 1.27.0 - 1.30.x. this configuration parameter allows to set one or more directories for sources of legitimate files.2 See this version of the documentation available for releases prior to Semantic MediaWiki 3.0.0Released on an unknown date and compatible with MW 1.27.0 - 1.30.x..

Default setting

$smwgImportFileDirs = [
    'default' => __DIR__ . '/data/import'
];

This means that by default legitimate files in the /data/import directory relative to the wiki's root directory will be imported upon installation of Semantic MediaWiki.

Changing the default setting

To modify this configuration setting, add one of the following lines to your "LocalSettings.php" file after the enableSemantics() call:

Change the standard directory to search for files to be imported to a different directory
$smwgImportFileDirs = [
    'default' => '/usr/local/bin/smw'
];

This means that legitimate files will be searched for in the server's /usr/local/bin/smw directory.

Add another directory to search for files to be imported
$smwgImportFileDirs = [
    'default' => __DIR__ . '/data/import',
    'foaf' => '/usr/local/bin/smw/foaf'
];

This means that legitimate files will be searched for in the /data/import directory relative to the wiki's root directory and in the server's /usr/local/bin/smw/foaf directory.

See also


References

  1. ^  Semantic MediaWiki: GitHub pull request gh:smw:2289
  2. a b  Semantic MediaWiki: GitHub pull request gh:smw:2832
  3. ^  Semantic MediaWiki: GitHub pull request gh:smw:3063