Pivot features

From MediaWiki Pivot Skin

These are the default values set for the Pivot skin and the example of the array to change the defaults. Add the following array after the "wfLoadSkin( 'pivot' );" call in your "LocalSettings.php" file to change the feature defaults.

Default Features Array

This is the defaults of the features available using the Pivot Skin. If you are happy with the defaults, you do not need to add them to your "LocalSettings.php" file. If you want to change them to suit your wiki's needs, then you will have to add the feature choices you wish to change.

$wgPivotDefaultFeatures = [
	'showActionsForAnon' => true,
	'fixedNavBar' => false,
	'usePivotTabs' => false,
	'showHelpUnderTools' => true,
	'showRecentChangesUnderTools' => true,
	'wikiName' => &$GLOBALS['wgSitename'],
	'wikiNameDesktop' => &$GLOBALS['wgSitename'],
	'navbarIcon' => false,
	'showFooterIcons' => false,
	'addThisPUBID' => '',
	'useAddThisShare' => '',
	'useAddThisFollow' => ''

Explanations of Feature Choices

Use following configuration parameter options with $wgPivotFeatures in your "LocalSettings.php" file to change the behavior:

  • 'showActionsForAnon' => true − displays page "Actions" button for non-logged-in visitors, "false" will hide them.
  • 'fixedNavBar' => false − will allow the NavBar to scroll with the content, "true" will lock the NavBar.
  • 'usePivotTabs' => false − will prevent Foundation 5 tab coding to pass through HTML sanitizer, "true" will allow this.
  • 'showHelpUnderTools' => true − displays a link to "Help" in the "Tools" section of the sidebar, "false" will prevent this.
  • 'showRecentChangesUnderTool's => true − displays a Link to "Recent changes" in the "Tools" section of the sidebar, "false" will prevent this.
  • 'wikiName' => &$GLOBALS['wgSitename'] − defaults to the value of "$wgSitename", use a 'string' to display a shorter wiki name. This does not change the real name of the wiki.
  • 'wikiNameDesktop' => &$GLOBALS['wgSitename'] − defaults the value of the "$wgSitename", use 'string' to display a longer wiki name for desktop view does not change the real name of the wiki. This does not change the real name of the wiki. It is helpful when used in conjunction with "wikiName" or default "$wgSitename". See the page Feature wikiName and wikiNameDesktop for more information.
  • 'navbarIcon' => false − default false will prevent an icon to be shown in mobile view, "true" is used to set the global logopath image of the wiki.
  • 'showFooterIcons' => false − will show text in place of footer icons, "true" will output the icons as they are set globally in LocalSettings.php.
  • 'addThisPUBID' => '' − default empty string will not add the AddThis script, ra-##-####### publisher ID will add and execute the AddThis script in async. See the page Feature addThisPUBID for more information about using AddThis social buttons.
  • 'useAddThisShare' => '' default empty string, do not use AddThis share, "your_addthis_specific_div_class_string" will insert the share toolbox div directly under page title, but before the tagline with your custom div class.
  • 'useAddThisFollow' => '' default empty string, do not use AddThis follow, "your_addthis_specific_div_class_string" will insert the follow toolbox div in the right-footer area before icon or text output with your custom div class.

Changing the Defaults

There is no need to add all the features of the array if you only want to change the default of a few features. For example, you wish to use PivotTabs and wikiNameDesktop. Your array would look like this:

$wgPivotFeatures = [
	'usePivotTabs' => true,
	'wikiNameDesktop' => 'My Really Really Long Wiki Full Name'

That's all you need to do, just make sure your last feature does not contain a comma ( , ) at the end of the last line of the array.

Settings Used on This Wiki

This is how the Pivot skin is configured on this very wiki:

### Skin settings
## Enabled skins
# Pivot
wfLoadSkin( 'pivot' );
$wgPivotFeatures = [
	'showActionsForAnon' => true,
	'fixedNavBar' => false,
	'usePivotTabs' => true,
	'showHelpUnderTools' => false,
	'showRecentChangesUnderTools' => false,
	'wikiName' => 'MW Pivot Skin',
	'wikiNameDesktop' => &$GLOBALS['wgSitename'],
	'navbarIcon' => true,
	'showFooterIcons' => false,
	'addThisPUBID' => 'ra-58cdad2b8256cfd0',
	'useAddThisShare' => 'addthis_inline_share_toolbox',
	'useAddThisFollow' => ''

## Default skin
$wgDefaultSkin = 'pivot';

## Skin adaption
$wgAllowSiteCSSOnRestrictedPages = true;
$wgAllowUserCss = true;

## Skin preferences
$wgHiddenPrefs[] = 'skin';

Note that only the Pivot skin is installed on this wiki so alternative skins do not have to be set to be skipped with. e.g.

# Skin preferences continued
$wgSkipSkins = [