$smwgFactboxFeatures
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 |
$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 11 October 2018 and compatible with MW 1.27.0 - 1.31.x.1 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 23 September 2019 and compatible with MW 1.31.0 - 1.33.x..2
Default setting[edit]
$smwgFactboxFeatures = SMW_FACTBOX_CACHE | SMW_FACTBOX_PURGE_REFRESH | SMW_FACTBOX_DISPLAY_SUBOBJECT | SMW_FACTBOX_DISPLAY_ATTACHMENT;
This means the three respective features, explained in the following sections on available options, are enabled.
Available options[edit]
SMW_FACTBOX_CACHE
– Sets that the main cache should be used to avoid reparsing the content on each page view
Note: This option replaces configuration parameter
$smwgFactboxUseCache
Sets whether or not a factbox content should be stored in cache..
SMW_FACTBOX_PURGE_REFRESH
– Sets that the factbox content should be refreshed when purging a page
Note: This option replaces configuration parameter
$smwgFactboxCacheRefreshOnPurge
Sets whether or not a cached factbox should be invalidated on an "action=purge" event..
SMW_FACTBOX_DISPLAY_SUBOBJECT
– Sets that the subobjects stored on a page should also be displayed when showing the factbox
Note: This option was introduced in Semantic MediaWiki 3.1.0Released on 23 September 2019 and compatible with MW 1.31.0 - 1.33.x..1
SMW_FACTBOX_DISPLAY_ATTACHMENT
– Sets that the links of files attached to a page should also be displayed when showing the factbox
Note: This option was introduced in Semantic MediaWiki 3.1.0Released on 23 September 2019 and compatible with MW 1.31.0 - 1.33.x..2
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 the display of subobjects
To disable a specific feature, e.g., that subobjects should be shown, 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;
Alternatively, remove the option from the existing definition of the configuration parameter, like e.g.
$smwgFactboxFeatures = ( $smwgFactboxFeatures & ~SMW_FACTBOX_DISPLAY_SUBOBJECT );

- Removing all factbox-related features
To remove all factbox-related features, replace all constants with the one as shown below:
$smwgFactboxFeatures = 0;
See also[edit]
- Help page on the factbox
- Help page on configuration parameter
$smwgShowFactbox
Sets in which cases the factbox should be shown below a page - Help page on configuration parameter
$smwgShowFactboxEdit
Sets in which cases the factbox should be shown when editing a page
References
- a b Semantic MediaWiki: GitHub pull request gh:smw:3474
- a b Semantic MediaWiki: GitHub pull request gh:smw:3643
- ^ Semantic MediaWiki: GitHub pull request gh:smw:2802
- ^ Bitwise Operators to use parentheses to ensure the desired precedence ...