$smwgLinksInValues
Configuration parameter details: | |
Name | $smwgLinksInValues |
Description | Sets whether internal links in values for properties of datatype "Text" may be stored within property values |
Default setting | false |
Software | Semantic MediaWiki |
Since version | |
Until version | still available |
Configuration | Installation |
Keyword | property · property value · displaying values · annotation · interface |
$smwgLinksInValues
is a configuration parameter that sets whether internal links within property values for properties of datatype "Text"Holds text of arbitrary length such as e.g. [[Property::Some [[internal link]] in property value.]]
may be resolved. The configuration parameter was introduced in Semantic MediaWiki 1.3.0Released on 7 September 2008 and compatible with MW 1.12.x - 1.15.x.. Starting with Semantic MediaWiki 2.5.0Released on 14 March 2017 and compatible with MW 1.23.0 - 1.29.x.1 the settings to this configuration parameter and the underlying behaviour of the wiki was changed to eliminate the deficiency caused by the earlier PCRE approach as described below as legacy behaviour.
SMW_LINV_OBFU
was deprecated with Semantic MediaWiki 3.0.0Released on 11 October 2018 and compatible with MW 1.27.0 - 1.31.x. in favour of option SMW_PARSER_LINV
to configuration parameter $smwgParserFeatures
Sets the behaviour of features related to text and annotation parsing streamlining the overall configuration of Semantic MediaWiki. The legacy option SMW_LINV_PCRE
to this configuration parameter is no longer supported.2 Thus you are advised to migrate your settings in "LocalSettings.php" to the new configuration parameter since this one will be removed with the release of Semantic MediaWiki 3.1.0Released on 23 September 2019 and compatible with MW 1.31.0 - 1.33.x. in 2019.
Default setting[edit]
$smwgLinksInValues = false;
This means that links in values for datatype "Text"Holds text of arbitrary length are not allowed.
Available options[edit]
SMW_LINV_OBFU
- Allows for extended use cases3, better performance4 and avoids crashes 1 as described below as legacy behaviour.
[[Has text::[[Lorem ipsum]] dolor sit amet, [[Has page::consectetur adipiscing elit]]]]
.
SMW_LINV_PCRE
- Allows to avoid breakages for existing wikis by retaining the behaviour formerly set with "true
" retained as a legacy setting.Note: Setting "true
" to this configuration parameter is still supported as a legacy setting and identical to setting this option.
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:
- Enable extended use cases, better performance and less issues
$smwgLinksInValues = SMW_LINV_OBFU;
This means that links in values for datatype "Text"Holds text of arbitrary length are allowed. This is the recommended setting for this configuration parameter.
- Retain the deprecated PCRE approach as described below
$smwgLinksInValues = SMW_LINV_PCRE;
or
$smwgLinksInValues = true;
This means that links in values for datatype "Text"Holds text of arbitrary length are allowed however using the deprecated PCRC approach as described below as legacy behaviour. This is the recommended setting for this configuration parameter.
Legacy behaviour[edit]
The results of a query displayed on special page "Ask"Provides an interface that assists users with creating and executing semantic queries are not parsed further even if this setting is enabled. This means that results for properties of datatype "Text"Holds text of arbitrary length containing links will be displayed as-is, i.e. links like SMW Project within the data value will be displayed as [[Help:SMW Project|SMW Project]]
.
#set
parser function to annotate links in values without the need to change this configuration parameter. See also the demo page on how to do this. - Use the SMW_LINV_OBFU
option instead starting with Semantic MediaWiki 2.5.0Released on 14 March 2017 and compatible with MW 1.23.0 - 1.29.x..
See also[edit]
- Help page on links in values
- Help page on configuration parameter
$smwgDecodeTextAnnotationWithStripMarker
Sets whether strip markers for properties of datatype "Text" may be stored within property values
References
- a b | Semantic MediaWiki: GitHub pull request gh:smw:2153
- ^ | Semantic MediaWiki: GitHub pull request gh:smw:2841
- ^ | Semantic MediaWiki: GitHub issue comment gh:smw:2153:271164759
- ^ | Semantic MediaWiki: GitHub pull request gh:smw:2267
- ^ | Semantic MediaWiki: GitHub issue gh:smw:1963