Extension:BackwardNavigation

What can this extension do?
Regularly, when I make the demonstration of a wiki, people always ask the same question: “But how we go back?”. The natural answer " uses the back button of your navigator", but sometimes we arrive on a page where we want to go up ... and not going back.

This extension is there for that. It makes it possible to display the referring pages of the current page and thus to improve navigation on the wiki.

In fact this extension proposes a popup interface to "what links here".

Usage
The use is really simple:
 * If the page is not to refer by any other, the text “Page preceding” is not a link.
 * If only one page is linked to the current page, “preceding Page” is a bond towards this page
 * If several pages are linked to the current page, to bring mouse on “preceding Page” posts a popup containing the list of these pages.

Installation
We very highly advise you to proceed to an installation on a test server before modifying your production server. A backup is always a good idea before making modifications.

Copy the extension files
First, download the extension : BackwardNavigation_1.0.0.tgz

Unzip it in your extension folder : ./BackwardNavigation.i18n.php ./BackwardNavigation.php ./BackwardNavigation_body.php ./BackwardNavigation_template.php ./licence.txt ./README.art122-5 ./skins ./skins/Art122_5.php ./skins/Tests.php

Changes to LocalSettings.php
Add at the end of your file the following lines : require_once("$IP/extensions/BackwardNavigation/BackwardNavigation.php");

If you use the MultiLanguageManager extension you have to add BackwardNavigation after MultiLanguageManager.

Integration in your template
To display the referer selection, you have to modify your template to add the following code where you wish to see appearing the selection referer element : executeBackwardNavigation($wgTitle->getArticleID); ?> You also have to change your CSS files, cf Customize the CSS.

Customization
BackwardNavigation has been designed to adapt to different skins. The graphic functions are isolated in the file  BackwardNavigation_template.php  containing the class from the same name. It contains the various method used to create the view.

''' You must not modify it. If you alter this file, the change could touch all the skins. Indeed the module uses this class only if it can't find specific class for your skin. It is the generic class derived by all the module skin'''

Create a new skin
In the extensions/BackwardNavigation/skins directory, duplicate the Default.php file and name the copy of the name of your skin (the same file name as the .php of the directory skins of the wiki).

By defect this class contains only the manufacturer, but you can overload all the methods of your choice. An example is given with the Art122-5.php file that modify the method of the popup to correspond to the style of the wiki.

Customize the CSS
You also have the possibility of personalizing the CSS. The name of the various classes can be modified by overloading the variables $class_ of the class  BackwardNavigation_template , you can find an exemple of CSS configuration at the beginning of this file.


 * class_referer_disabled = referer_disabled : no referer
 * class_referer_activated = referer_activated : only one referer
 * class_popup = popup : the link used to display the popup
 * class_cadre_popup = cadre_popup : the popup

Licence
This extension is distributed under GPL v2 licence * Copyright (C) 2007 Marc Despland * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */

You are free : this extension, with a commercial aim or not.
 * modify
 * distribute
 * use

Any time you have to respect the licence clauses, in particular:
 * Even if you modify it, this extension remains under GPL
 * You are not authorized to remove information relating to its author or the licence