$smwgImportFileDirs

From semantic-mediawiki.org
(Redirected from $smwgImportFileDirs)


Configuration parameter details:
Name $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 11 October 2018 and compatible with MW 1.27.0 - 1.31.x. it was renamed2 and the default values was changed3. With Semantic MediaWiki 3.2.0Released on 7 September 2020 and compatible with MW 1.31.0 - 1.35.x. the default specifier for the default location was changed from default to smw.4

Starting with Semantic MediaWiki 3.0.0Released on 11 October 2018 and compatible with MW 1.27.0 - 1.31.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 11 October 2018 and compatible with MW 1.27.0 - 1.31.x..

Default setting[edit]

$smwgImportFileDirs = [
    'smw' => __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[edit]

To modify the setting to this configuration parameter, 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 = [
    'smw' => '/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 = [
    'smw' => __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[edit]


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
  4. ^  Semantic MediaWiki: GitHub pull request gh:smw:4466