Cookies help us deliver our services. By using our services, you agree to our use of cookies.More information
 Actions

Foreground features

These are the default values set for the Foreground skin and the example of the array to change the defaults. Add the following array after the wfLoadSkin( 'foreground' ); 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.

$wgForegroundFeatures = array(      
    'showActionsForAnon' => true,
    'NavWrapperType' => 'divonly',
    'showHelpUnderTools' => true,
    'showRecentChangesUnderTools' => true,
    'enableTabs' => false,
    'wikiName' => &$GLOBALS['wgSitename'],
    'navbarIcon' => false,
    'IeEdgeCode' => 1,
    'showFooterIcons' => 0,
    'addThisFollowPUBID' => ''
);

Explanations of Feature Choices

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

  • 'showActionsForAnon' => true − displays page "Actions" button for non-logged-in visitors, "false" will hide them.
  • 'NavWrapperType' => 'divonly'
  • '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.
  • 'enableTabs' => false − will allow to use tabs within pages.
  • '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.
  • '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.
  • 'IeEdgeCode' => 1 − will produce a meta tag with "X-UA-Compatible" content="IE=edge", "2" will sent a header and with "0" nothing will be done
  • 'showFooterIcons' => false − will show text in place of footer icons, "true" will output the icons as they are set globally in LocalSettings.php.

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 ForegroundTabs. Your array would look like this:

$wgForegroundFeatures = array(
	'enableTabs' => true
);

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 Foreground skin is configured on this very wiki:

### Skin settings
## Enabled skins
# Foreground
wfLoadSkin( 'foreground' );
$wgForegroundFeatures = array(      
    'showActionsForAnon' => true,
    'NavWrapperType' => 'divonly',
    'showHelpUnderTools' => true,
    'showRecentChangesUnderTools' => true,
    'enableTabs' => true,
    'wikiName' => &$GLOBALS['wgSitename'],
    'navbarIcon' => false,
    'IeEdgeCode' => 1,
    'showFooterIcons' => 0,
    'addThisFollowPUBID' => ''
);

## Default skin
$wgDefaultSkin = 'foreground';

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

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


Note that only the Foreground 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 = array(
 	'cologneblue',
	'modern',
	'monobook',
	'vector'
);