Art. 122-5

Sommaire

[modifier] Backward Navigation

This extension proposes a popup (div css) interface to "what links here".

[modifier] 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.

[modifier] Copy the extension files

First, download the extension : BackwardNavigation_1.0.1.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

[modifier] 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.

[modifier] 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 :

<?php
   global $wgTitle;
   $backNav_controller=new BackwardNavigation();
   echo $backNav_controller->executeBackwardNavigation($wgTitle->getArticleID());
?>

You also have to change your CSS files, cf Customize the CSS.

[modifier] 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

[modifier] 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.

[modifier] 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

[modifier] How to use it

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 link 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.
  • If there are too much pages, the link go to the classical "What Links Here"

[modifier] 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 :

  • modify
  • distribute
  • use

this extension, with a commercial aim or not.

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
French
Un peu de musique ?


A propos