$smwg­Factbox­Features

From Linux Web Expert


Template:Interlanguagelink: en
Configuration parameter details:
Name $smwgFactboxFeatures
Description Sets the behaviour of features related to the factbox
Default setting See below
Software Semantic MediaWiki
Since version
Until version still available
Configuration Facts display · Interface settings
Keyword factbox


__NOBREADCRUMBLINKS__

$smwgFactboxFeatures is a configuration parameter that sets the behaviour of the features related to the factbox. The configuration parameter was introduced in Semantic MediaWiki 3.0.0Released on an unknown date unknown versions of MediaWiki1 and deprecated the configuration parameters as indicated in the section on available options below. It was further expanded in Semantic MediaWiki 3.1.0Released on an unknown date unknown versions of MediaWiki.2

The deprecated configuration settings as indicated in the section on available options should be migrated to this configuration parameter in "LocalSettings.php" since they will be removed with the release of Semantic MediaWiki 3.1.0Released on an unknown date unknown versions of MediaWiki in 2019.3

Default setting

$smwgFactboxFeatures = SMW_FACTBOX_CACHE | SMW_FACTBOX_PURGE_REFRESH | SMW_FACTBOX_DISPLAY_SUBOBJECT | SMW_FACTBOX_DISPLAY_ATTACHMENT;

This means that the three respective features as explained in the following sections on available options are enabled.

Available options

The options enabled by default are highlighted bold.
  • SMW_FACTBOX_NONE – Disables all factbox related features
  • SMW_FACTBOX_CACHE – Sets that the main cache should be used to avoid reparsing the content on each page view
  • SMW_FACTBOX_PURGE_REFRESH – Sets that the faxtbox content should be refreshed when purging a page
This option was introduced in Semantic MediaWiki 3.1.0Released on an unknown date unknown versions of MediaWiki.1
This option was introduced in Semantic MediaWiki 3.1.0Released on an unknown date unknown versions of MediaWiki.2
For further information on the available options listed above see the documentation pages of the respective deprecated configuration parameters as stated above.

Changing the default setting

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

Disable the display of subobjects

To disable a specific feature e.g. that subobjects should be shown just redefine the configuration parameter by defining it without including the corresponding constant as shown in the above section on available options:

$smwgFactboxFeatures = SMW_FACTBOX_CACHE | SMW_FACTBOX_PURGE_REFRESH | SMW_FACTBOX_DISPLAY_ATTACHMENT;

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

$smwgFactboxFeatures = ( $smwgFactboxFeatures & ~SMW_FACTBOX_DISPLAY_SUBOBJECT );
Please use parentheses4 when combining different bit-operations to avoid a possible mismatch.
Removing all factbox related features

To remove all factbox related features just replace all constants with the one as shown below:

$smwgFactboxFeatures = SMW_FACTBOX_NONE;

See also

#scite could not render a citation text for reference "gh:smw:3474" because type "pullrequest" was not assigned to a template.

References

  1. a b gh:smw:3474 
  2. a b gh:smw:3643 
  3. ^ gh:smw:2802 
  4. ^  Bitwise Operators to use parentheses to ensure the desired precedence ...