Need help with foreground?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

138 Stars 60 Forks Other 482 Commits 21 Opened issues


A MediaWiki skin that focuses on putting your content in the foreground.

Services available


Need anything else?

Contributors list

MediaWiki Foreground Skin

MediaWiki skin that focuses on putting your content in the foreground. Supports responsive layouts and has classes predefined for Semantic MediaWiki. Built on the Zurb Foundation CSS framework.

CircleCI Scrutinizer Code Quality


First, copy the Foreground source files into your MediaWiki skins directory (see skinning for general information on MediaWiki skins). You can either download the files and extract them from:

You should extract that into a folder named

in your

Alternatively, you can use git to clone the repository, which makes it very easy to update the code, using:

git clone

After that, you can issue

git pull
to update the code at anytime.


Once the skin is in place add one the following lines to your

wfLoadSkin( 'foreground' );

This will activate Foreground in your installation. At this point you can select it as a user skin in your user preferences.

To activate Foreground for all users and anonymous visitors, you need to set the

variable and set it to
$wgDefaultSkin = "foreground";


Use following features in

to change the behavior.
  • showActionsForAnon => true
    displays page actions for non-logged-in visitors.
  • NavWrapperType => 'divonly'
    : only a div with id
    will be created.
    - no div will be created (old behavior), other values will be used as class.
  • showHelpUnderTools => true
    a Link to "Help" will be created under "Tools".
  • showRecentChangesUnderTools => true
    a Link to "recent changes" will be created under "Tools".
  • 'enableTabs' => true
    for tabs on page support.
  • wikiName => 'Alternate WikiName'
    sets top navbar name to a different output of the wiki's name. Useful if your
    is long but need to keep it for other purposes.
  • navbarIcon => true
    to display an icon in the top navbar. See below for more information.
  • IeEdgeCode => 1
    will produce a meta tag with "X-UA-Compatible" content="IE=edge",
    will sent a header,
    nothing will be done
  • showFooterIcons => false
    suppresses the output of footer icons. Set to
    to display them.
  • addThisPUBID => ''
    empty string will not fire the AddThis script,
    publisher ID will allow the run the AddThis script in async on content pages only.
  • useAddThisShare => ''
    default empty string, do not use AddThis share,
    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,
    will insert the follow toolbox div in the
    area before icon or text output with your custom div class.

These are the default values:

$wgForegroundFeatures = array(      
  'showActionsForAnon' => true,
  'NavWrapperType' => 'divonly',
  'showHelpUnderTools' => true,
  'showRecentChangesUnderTools' => true,
  'enableTabs' => false,
  'wikiName' => &$GLOBALS['wgSitename'],
  'navbarIcon' => false,
  'IeEdgeCode' => 1,
  'showFooterIcons' => false,
  'addThisPUBID' => '',
  'useAddThisShare' => '',
  'useAddThisFollow' => ''

Usage of NavWrapperType

With a setting like:

'NavWrapperType' => 'divonly'

and the created div called

anonymous visitors can change the setting of navbar (fixed or sticky) by User-Script (Firefox-extensions like greasemonkey or scriptish), users can take a gadget or their JavaScript, CSS ... :

Or you set class in LocalSettings.php with:

'NavWrapperType' => 'contain-to-grid fixed'

and visitors will be able to remove this class by their own JavaScript or gadget ...

Navbar Icon

With a setting like:

'navbarIcon' => true

A top navbar icon will be set using the current image set by

. See$wgLogo for more information about

The icon will be resized to fit into a maximum width of 64px x 36px wide or a 16:9 ratio.

Show Help under Tools

This will add the help link under tools. To control what the help link will link to use the message page,

to set the link target. The link target can be a local page, Help:Contents, or an external URL,

AddThis Buttons

With a setting like:

'addThisFollowPUBID' => 'yourAddThis-PubID'

Important, this feature uses the free or paid version of the horizontal Follow Buttons only. Choose which social media FollowUs buttons(Twitter, Facebook, YouTube, etc.) and at the bottom of the screen locate the script. Within the script you will see something similar

. Everything after the
sign and up to the
is your Publisher ID. To turn on social follow icons, insert your publisher id:
'addThisFollowPUBID' => 'ra-5378f4902d02197'

Notes on other skins

As you build a wiki out with Foreground you will likely use the responsive grid from Foundation. This is key to making a responsive wiki, and is one of the largest migration requirements when you want to move a wiki that ppreviously used Vector (and likely a lot of tables for layout) to Foreground. Once you do this, the ability of a user to select whatever skin will be removed. If you take full advantage of Foreground in your templates the lack of the Foundation grid will make viewing the wiki using Vector or MonoBook very difficult.

Because of this, it is suggested that you set the

variable to make sure that everyone sees the site as you intended it. This removes other skins from being user selectable options.
# Foreground is specific, so lets disable other skins
$wgSkipSkins = array( 'cologneblue', 'modern', 'monobook', 'vector' );

You may also want to allow users to set a User CSS if they want to tweak things inside of Foreground. This is entirely optional.

# Allow User CSS, mostly for skin testing
$wgAllowUserCss = true;

Using Foreground

There is a mailing list to discuss Foreground. Please join to connect with others and explore questions about using Foreground on your wiki. You can see a list of wikis with Foreground installed at WikiApiary.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.