Extension:Footer

From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manual - list
Crystal Clear action run.png
Footer

Release status: stable

Implementation Tag
Description Allows to add a common footer to each MediaWiki page
Author(s) Piotr Żuk (zukoTalk)
Last version 1.0.0 (2011-08-11)
MediaWiki 1.16
License GNU public License
Download MediawikiExtFooter.zip

or
this page

Example C++Book reference
Hooks used
ParserFirstCallInit

Check usage (experimental)

Contents

[edit] What can this extension do?

Allows you to add a common footer to each MediaWiki page

[edit] Usage

Edit the Template:AllPagesFooterTemplate (http://yoursite.com/index.php?title=Template:AllPagesFooterTemplate&action=edit), and put there your footer text.


[edit] Download instructions

You can download the php file from MediawikiExtFooter_zip or copy and paste the code below to the file: $IP/extensions/Footer/Footer.php. Note: $IP stands for the root directory of your MediaWiki installation, the same directory that holds LocalSettings.php.

[edit] Installation

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

require_once("$IP/extensions/Footer/Footer.php");

[edit] Code

<?php
if (defined('MEDIAWIKI'))
{
        // Version
        define('FOOTER_VERSION','1.0.0');
 
        // Credits
        $wgExtensionCredits['parserhook'][] = array(
                'name'=>'Wiki Footer',
                'version' => '1.0.0',
                'author'=>'Piotr Zuk',
                'url'=>'http://www.cppbook.com/MediawikiExtFooter.zip',
                'description'=>'Mediawiki Footer Extension',
                'version'=>ADDTOANY_SHARE_SAVE_VERSION
        );
 
        $wgHooks['SkinAfterContent'][] = 'wf_Footer_method';
 
        function wf_Footer_method(&$subpages) {
                global $wgParser;
                $subpages .= $wgParser->recursiveTagParse("{{AllPagesFooterTemplate}}");
                return true;
        }
}
?>
Personal tools
Namespaces

Variants
Actions
Navigation
Support
Download
Development
Communication
Print/export
Toolbox