Difference between revisions of "Help:Configuration"
(chg) |
(chg) |
||
| Line 1: | Line 1: | ||
{{SMW admin TOC}} | {{SMW admin TOC}} | ||
| − | [[Semantic MediaWiki]] offers a number of '''configuration | + | [[Semantic MediaWiki]] offers a number of '''configuration parameters''' that site administrators may modify according to the particular needs of their wiki. This page explains all configuration parameters for Semantic MediaWiki. All available configuration parameters can also be found in the file "[https://github.com/SemanticMediaWiki/SemanticMediaWiki/blob/master/DefaultSettings.php DefaultSettings.php]" (as of Semantic MediaWiki 2.4.0). To change the setting of any configuration parameter, copy the respective assignment into your "LocalSettings.php" file, after including Semantic MediaWiki as described in [[Help:Installation|installation]]. Do not change the "DefaultSettings.php" file directly, as your changes would be overwritten in software upgrades. |
== Installation settings == | == Installation settings == | ||
Revision as of 10:57, 6 January 2017
Semantic MediaWiki offers a number of configuration parameters that site administrators may modify according to the particular needs of their wiki. This page explains all configuration parameters for Semantic MediaWiki. All available configuration parameters can also be found in the file "DefaultSettings.php" (as of Semantic MediaWiki 2.4.0). To change the setting of any configuration parameter, copy the respective assignment into your "LocalSettings.php" file, after including Semantic MediaWiki as described in installation. Do not change the "DefaultSettings.php" file directly, as your changes would be overwritten in software upgrades.
Installation settings[edit]
The following settings relate to the basic installation of Semantic MediaWiki.
Cache settings[edit]
The following settings are relevant for the caching behaviour of Semantic MediaWiki, such as special pages, factboxes etc.
Interface settings[edit]
The following settings are relevant for the general appearance of various wiki pages in Semantic MediaWiki, as well as for browsing interfaces such as Special:Browse.
| Parameter | Description |
|---|---|
| $smwgShowFactbox | This setting allows you to select in which cases you want to have a factbox appear below an article. Note that the Magic Words __SHOWFACTBOX__ and __NOFACTBOX__ can be used to control Factbox display for individual pages. Other options for this setting include:
Default: SMW_FACTBOX_HIDDEN |
| $smwgShowFactboxEdit | Same as $smwgShowFactbox but for edit mode and same possible values.
Default: SMW_FACTBOX_NONEMPTY |
| $smwgToolboxBrowseLink | Should the toolbox of each content page show a link to browse the properties of that page using Special:Browse? This is a useful way to access properties and it is somewhat more subtle than showing a Factbox on every page.
Default: true |
| $smwgInlineErrors | Should warnings be displayed in wikitexts right after the problematic input? This affects only semantic annotations, not warnings that are displayed by inline queries or other features.
Default: true |
| $smwgMaxNonExpNumber | The maximal number that SMW will normally display without using scientific exp notation. The default is rather large since some users have problems understanding exponents. Scientific applications may prefer a smaller value for concise display.
Default: 1000000000000000 |
Query settings[edit]
Settings for inline queries and for semantic queries in general. This can especially be used to prevent overly high server-load by complex queries. The following settings affect all queries, wherever they occur.
| Parameter | Description |
|---|---|
| $smwgQSubpropertyDepth | Restrict level of sub-property inclusion (steps within property hierarchy). Use 0 to disable hierarchy-inferencing in queries.
Default: 10 |
| $smwgQSortingSupport | Should sorting of query results be possible?
Default: true |
| $smwgQRandSortingSupport | Enables or disables the random sorting of query results.
Default: true |
| $smwgQDefaultNamespaces | Which namespaces should be searched by default? A value of NULL switches off default restrictions on searching, which is faster. An example value with namespaces would be array(NS_MAIN, NS_IMAGE).
Default: NULL |
| $smwgIgnoreQueryErrors | Should queries be executed even if some errors were detected? A hint that points out errors is shown in any case.
Default: true |
Settings for inline queries[edit]
The following settings affect inline queries and querying special pages, in particular Special:Ask. Essentially they should mirror the kind of queries that should immediately be answered by the wiki, using whatever computations are needed.
Settings for Special:Ask[edit]
The following settings affect querying special pages, in particular Special:Ask. The settings for inline queries mentioned above also affect queries on special pages.
Settings for concept queries[edit]
Further settings for queries. The following settings affect queries that are part of concept pages. These are usually chosen to be less restricted than inline queries, since there are two other means for controlling their use:
- Concept queries that would not be allowed as normal queries will not be executed directly, but can use pre-computed results instead. This is the default. See Concept caching for details on how to exploit this.
- The whole Concept: namespace can be restricted (using some suitable MediaWiki extension) to an experienced user group that may create more complex queries resonably. Other users can employ thus defined concepts in their queries.
| Parameter | Description |
|---|---|
| $smwgQConceptCaching | Which concepts should be displayed only if available from cache? Possible values are:
In any case, caches will always be used if available (but see $smwgQConceptCacheLifetime). Default: CONCEPT_CACHE_HARD |
| $smwgQConceptMaxSize | Same as $smwgQMaxSize but for concepts.
Default: 20 |
| $smwgQConceptMaxDepth | Same as $smwgQMaxDepth but for concepts.
Default: 8 |
| $smwgQConceptFeatures | Same as $smwgQFeatures but for concepts. Note that using concepts in concepts is currently not supported – do not enable it!
Default: SMW_PROPERTY_QUERY | SMW_CATEGORY_QUERY | SMW_NAMESPACE_QUERY | SMW_CONJUNCTION_QUERY | SMW_DISJUNCTION_QUERY |
| $smwgQConceptCacheLifetime | This setting defines the cache life time in minutes. If a concept cache exists but is older than this, SMW tries to recompute it, and will only use the cache if this is not allowed due to settings above.
Default: 24 * 60 (= 1 day) |
Settings for query formatting/display[edit]
| Parameter | Description |
|---|---|
| $smwgQDefaultLinking | Which result columns in an inline query should be linked if not specified otherwise. Possible values are 'none', 'subject' (links only in first column), 'all'.
Default: 50 |
| $smwgResultFormats | This setting contains an array of all query result formats that the wiki supports. It is normally extended automatically by extensions that supply additional formats. However, it is also possible to set this array manually, e.g. to disable some formats. To disable a format, do unset($smwgResultFormats['template']); Disabled formats will be treated like if the format parameter had been omitted. The formats 'table' and 'list' are defaults that cannot be disabled. The format 'broadtable' should not be disabled either in order not to break Special:Ask.
Default: array( 'table' => 'SMWTableResultPrinter', 'list' => 'SMWListResultPrinter', 'ol' => 'SMWListResultPrinter', 'ul' => 'SMWListResultPrinter', 'broadtable' => 'SMWTableResultPrinter', 'category' => 'SMWCategoryResultPrinter', 'embedded' => 'SMWEmbeddedResultPrinter', 'template' => 'SMWListResultPrinter', 'count' => 'SMWListResultPrinter', 'debug' => 'SMWListResultPrinter', 'rss' => 'SMWRSSResultPrinter', 'csv' => 'SMWCsvResultPrinter', 'dsv' => 'SMWDSVResultPrinter', 'json' => 'SMWJSONResultPrinter', 'rdf' => 'SMWRDFResultPrinter' ); |
Export settings[edit]
RSS export[edit]
OWL/RDF export[edit]
| Parameter | Description |
|---|---|
| $smwgAllowRecursiveExport | Can normal users request recursive export, i.e. an OWL/RDF export that includes a full export of all mentioned pages, and of all pages they mention, and so on. Recommended only for very small wikis.
Default: false |
| $smwgExportBacklinks | Should incoming properties be part of OWL/RDF export?
Default: true |
| $smwgNamespace | The URI-namespace of exported URIs. Will be set automatically if nothing is given, using the base URL provided to enableSemantics(). But in order to make pretty URIs you will need to set this to something nice and adapt your Apache configuration appropriately. This is done, e.g., on semanticweb.org, where URIs are of the form http://semanticweb.org/wiki/FOAF. An example setting would be
$smwgNamespace = 'http://example.org/id/'; Default: unset |
Other settings[edit]
The following settings usually need no modification.
SPARQL and RDF store stettings[edit]
See also the help page on configuring Semantic MediaWiki for use with SPARQL and RDF stores.
Miscellaneous settings[edit]
| Parameter | Description |
|---|---|
| $smwgPDefaultType | Default property type. Undefined properties (those without pages or whose pages have no "has type" statement) will be assumed to be of this type. This is an internal type id. See the file /i18n/extra/XX.json to find what IDs to use for datatypes in your language. The default corresponds to "Type:Page". The English IDs are as follows:
Default: '_wpg' (corresponds to datatype Page) |
| $smwgTranslate | Setting this to true allows to translate all the labels within Special:Browse given that they have interwiki links. This feature is currently disabled and cannot be activated with this setting.
Default: false |
| $smwgAdminRefreshStore | If the following is set to true, the wiki data can be repaired using the interface on the page Special:SMWAdmin. Setting this option to false does not stop ongoing repair processes.
Default: true |
| $smwgHistoricTypeNamespace | If the following is set to true, you can still access the old namespaces Type (104) and Type_talk (105) which have been replaced by Special:Types and are thus obsolete starting with Semantic MediaWiki 1.6.0.
Default: false |
,