Con­figu­ration para­meter "$smwgResultFormatsFeatures"

From semantic-mediawiki.org
Configuration parameter details:
Name $smwgResultFormatsFeatures
Description Sets whether features for some result formats should be extended
Default setting
SMW_RF_TEMPLATE_OUTSEP
Software Semantic MediaWiki
Since version
Until version still available
Configuration Special Ask
Keyword ask queries · separator parameter · template format


$smwgResultFormatsFeatures is a configuration parameter that defines whether features for some result formats should be extended. The configuration parameter was introduced in Semantic MediaWiki 2.5.0Released on 14 March 2017 and compatible with MW 1.23.0 - 1.29.x..1 Starting with Semantic MediaWiki 2.5.3Released on 8 July 2017 and compatible with MW 1.23.0 - 1.29.x. the default value for the valuesep option was changed from a space to a comma.2

This configuration parameter is meant to resolve inconsistencies and ambiguity with the sep parameter3 in connection with result format "Template"Uses a specified template to format and display the results and accomplishes that by additionally introducing the valuesep parameter:4

  • sep is used for the outer separation of content as in {{Template|...}} sep {{Template|...}} sep ...
  • valuesep is provided as additional parameter to allow for multiple values within a {{Template|...}} to be separated

Default setting[edit]

$smwgResultFormatsFeatures => SMW_RF_TEMPLATE_OUTSEP;

This means that result format "Template"Uses a specified template to format and display the results is extended by the valuesep parameter.

Available options[edit]

  • SMW_RF_NONE – Disables all result format features
  • SMW_RF_TEMPLATE_OUTSEP – Set that the "sep" parameter should be used as outer separator for result format "Template"Uses a specified template to format and display the results

Changing the default setting[edit]

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

Disable this enhancement of result formats features related to result format "Template"Uses a specified template to format and display the results5
$smwgResultFormatsFeatures = SMW_RF_NONE;

or alternatively remove the option from the existing definition of the configuration parameter like e.g.

$smwgResultFormatsFeatures = ( $smwgResultFormatsFeatures & ~SMW_RF_TEMPLATE_OUTSEP );
NoteNote: Please use parentheses6 when combining different bit-operations to avoid a possible mismatch.

This setting allows to retain the behaviour prior to Semantic MediaWiki 2.5.0Released on 14 March 2017 and compatible with MW 1.23.0 - 1.29.x. mostly to gain time for the migration to the new parameters.



References

  1. ^  Semantic MediaWiki: GitHub pull request gh:smw:2331
  2. ^  |  Semantic MediaWiki: GitHub pull request gh:smw:2522
  3. ^  Semantic MediaWiki: GitHub pull request gh:smw:2022
  4. ^  Semantic MediaWiki: Sandbox example sb:smw:2331
  5. ^  Semantic MediaWiki: GitHub issue gh:smw:2329
  6. ^  Bitwise Operators to use parentheses to ensure the desired precedence ...