Extension:HeadersFooters

What can this extension do?
Allows you to specify article headers and footers to be included on a global, namespace, category or page basis.

You can specify:
 * Global Header/Footer
 * Namespace Header/Footer
 * Category Header/Footer
 * Page Header/Footer

The current version does not allow Special: header/footer's or gendered namespaces. By default global and page is turned off.

Download instructions
You can consult the CHANGELOG for version history.

Installation
To install this extension, add the following to LocalSettings.php:

Configuration parameters
For your convenience, we also support Extension:Configure for settings these from within your wiki. See the talk page FAQ for further details.

Defining Headers/Footers
You can visit a Special:HeadersFooters to facilitate the creation of your headers and footers.

Global
Only two pages can be set. MediaWiki:Headersfooters-global-header MediaWiki:Headersfooters-global-footer Please note global is disabled by default.

Namespace
For the main content name space NS_MAIN: MediaWiki:Headersfooters-ns-0-header MediaWiki:Headersfooters-ns-0-footer Please note the double // to indicate a blank namespace (or otherwise known as NS_MAIN).

Or for all user talk pages NS_USER_TALK: MediaWiki:Headersfooters-ns-3-header MediaWiki:Headersfooters-ns-3-footer

Please note gendered namespaces are not currently supported. See Namespace constants for the numbers.

Category
You can specify a header/footer that all pages that belong to a specific category inherit. MediaWiki:Headersfooters-cat-Cities-header MediaWiki:Headersfooters-cat-Cities-footer In this example, the Cities category has a header and footer for all it's member pages. Category Footers since they are cumulative are the most likely to introduce duplicates (a config option omits them).

Page
You can also specify a Header or Footer for a specific page. This is mostly so that you can make an uneditable section for a page. MediaWiki:Headersfooters-page-0-Ottawa-header MediaWiki:Headersfooters-page-0-Ottawa-footer The header and footer for the Ottawa page in NS_MAIN.

MediaWiki:Headersfooters-page-2-Finlay-header MediaWiki:Headersfooters-page-2-Finlay-footer The header and footer for the Finlay page in NS_USER. Please note that namespace names are localized and gendered.

Please note page is disabled by default.

Support
It's hoped that you will enjoy the extension, and if you do, consider purchasing it as a pay-what-you-want scheme on the author's website.

If you find a bug or wish to make a feature request, you can add to or start a topic on the talk page or contact the author.

Testing
It has been tested with:
 * MediaWiki svn: trunk 2011-10-01, 1.18alpha 2011-10-01, 1.17branch 2011-10-01
 * MediaWiki releases: 1.19.7 1.17.0, 1.16.0, 1.15.5