$smwgBrowseFeatures

From Linux Web Expert


Template:Interlanguagelink: en
Configuration parameter details:
Name $smwgBrowseFeatures
Description Property "Has description" (as page type) with input value "Sets the behaviour of the features provided by several [[Help:Browsing interfaces|browsing interfaces" contains invalid characters or is incomplete and therefore can cause unexpected results during a query or annotation process.
Default setting See below
Software Has component::Semantic MediaWiki
Since version
Until version still available
Configuration Interface settings · Facts display
Keyword special page · browsing · interface


__NOBREADCRUMBLINKS__

$smwgBrowseFeatures is a configuration parameter that sets the behaviour of the features provided by several browsing interfaces. 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.

The deprecated configuration settings as indicated in the section on available options should be migrated to this configuration setting 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.1

Default setting

$smwgBrowseFeatures = SMW_BROWSE_TLINK | SMW_BROWSE_SHOW_INCOMING | SMW_BROWSE_SHOW_GROUP | SMW_BROWSE_USE_API;

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

Available options

The options enabled by default are highlighted bold.
  • SMW_BROWSE_NONE – Disables features to browsing interfaces
  • SMW_BROWSE_TLINK – Sets that the toolbox of each content page shows a link to browse the properties of that page using special page "Browse"No description was provided.
This option replaces configuration parameter $smwgToolboxBrowseLinkNo description was provided..
  • SMW_BROWSE_SHOW_INVERSE – Sets that the browse view for incoming links on special page special page "Browse"No description was provided. should show the incoming links inverse to the reverse view
This option replaces configuration parameter $smwgBrowseShowInverseNo description was provided..
  • SMW_BROWSE_SHOW_INCOMING – Sets that the browse view for incoming links on special page "Browse"No description was provided. should show the incoming links
This option replaces configuration parameter $smwgBrowseShowAllNo description was provided..
  • SMW_BROWSE_SHOW_GROUP – Sets that the view of created group sections shows for properties that belong to the same property group2
  • SMW_BROWSE_SHOW_SORTKEY – Sets that sortkey influenced by the magic words DISPLAYTITLE, DEFAULTSORT etc. should be shown3
  • SMW_BROWSE_USE_API – Sets that the browse display is to be generated using an API request
This option replaces configuration parameter $smwgBrowseByApiNo description was provided..
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:

Removing a specific browsing feature

To disable a specific feature e.g. that the toolbox of each content page shows a link to browse the properties of that page using special page "Browse"No description was provided. just redefine the configuration parameter by defining it without including the corresponding constant as shown in the above section on available options:

$smwgBrowseFeatures = SMW_BROWSE_SHOW_INCOMING | SMW_BROWSE_USE_API;

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

$smwgBrowseFeatures = ( $smwgBrowseFeatures & ~SMW_BROWSE_TLINK );
Please use parentheses4 when combining different bit-operations to avoid a possible mismatch.
Adding a specific browsing feature

To enable a specific feature e.g. incoming links on special page special page "Browse"No description was provided. should show the incoming links inverse to the reverse view, just redefine the configuration parameter by defining it including the corresponding constant as shown in the above section on available options:

$smwgBrowseFeatures = SMW_BROWSE_TLINK | SMW_BROWSE_SHOW_INCOMING | SMW_BROWSE_SHOW_GROUP | SMW_BROWSE_USE_API | SMW_BROWSE_SHOW_INVERSE ;

or alternatively add the option to the existing definition of the configuration parameter like e.g.

$smwgBrowseFeatures = $smwgBrowseFeatures | SMW_BROWSE_SHOW_INVERSE;
Disabling all browsing features

To disable all browse features just remove all constants as shown in the above section on available options:

$smwgBrowseFeatures = '';

or add the constant for disabling all browse features

$smwgBrowseFeatures = SMW_BROWSE_NONE;

See also

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

References

  1. a b gh:smw:2799 
  2. ^ gh:smw:2874 
  3. ^ gh:smw:2922 
  4. ^  Bitwise Operators to use parentheses to ensure the desired precedence ...