$smwg­Result­Formats­Features

From semantic-mediawiki.org


Configuration parameter details:
Name $smwgResultFormatsFeatures
Description Sets whether features for some result formats should be extended
Default setting See below
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

This configuration parameter is meant to assist in migrating from the pre Semantic MediaWiki 2.5.0Released on 14 March 2017 and compatible with MW 1.23.0 - 1.29.x. behaviour by allowing to gain more time to do the actual migration. However it is strongly recommended to migrate since Semantic MediaWiki 2.5.0Released on 14 March 2017 and compatible with MW 1.23.0 - 1.29.x. brought many improvements concerning the separation of outputs of a query.

The changed behaviour also resolves inconsistencies and ambiguity with the sep parameter2 in connection with result format "Plainlist"Outputs results in a comma separated list, with additional outputs shown in parentheses. The output does not provide class attributes to HTML elements (default for queries without printout statements).. This is accomplished by additionally introducing more parameters for separating outputs:3

This configuration parameter was applicable to result format "Template"Uses a specified template to format and display the results prior to the list and template format rework that came with Semantic MediaWiki 3.0.0Released on 11 October 2018 and compatible with MW 1.27.0 - 1.31.x. and additionally brought the propsep separator.4

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 "Plainlist"Outputs results in a comma separated list, with additional outputs shown in parentheses. The output does not provide class attributes to HTML elements (default for queries without printout statements).

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:

Disable this enhancement of result formats features related to result format "Plainlist"Outputs results in a comma separated list, with additional outputs shown in parentheses. The output does not provide class attributes to HTML elements (default for queries without printout statements).5
$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.

See also[edit]

  • Help page on parameter sep to result format "Plainlist"Outputs results in a comma separated list, with additional outputs shown in parentheses. The output does not provide class attributes to HTML elements (default for queries without printout statements).
  • Help page on parameter propsep to result format "Plainlist"Outputs results in a comma separated list, with additional outputs shown in parentheses. The output does not provide class attributes to HTML elements (default for queries without printout statements).
  • Help page on parameter valuesep to result format "Plainlist"Outputs results in a comma separated list, with additional outputs shown in parentheses. The output does not provide class attributes to HTML elements (default for queries without printout statements).



References

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