Extension:BrowserHistoryLink/README

From MediaWiki.org
Jump to: navigation, search

Contents

[edit] Installation

You must have PHP 5.2.3 or above for this extension to work correctly!

  1. Create the directory "BrowserHistoryLink" in your extensions directory.
  2. Download and extract the files to this new directory.
  3. Add the following line to LocalSettings.php:
    require_once($IP."/extensions/BrowserHistoryLink/BrowserHistoryLink.php");
    
  4. Check Special:Version to make sure the extension was registered correctly.

[edit] Usage

[edit] Basic

To add the link, add a <historylink> with type parameter set to "forward" or "back" on a wiki page. Example:

<historylink type="back" />

This outputs the default link text "« Go Back".

[edit] Custom Text

For custom link text, use this code (link text can be anything):

<historylink type="back">Go Back 1 Page</historylink>

This outputs the link text "Go Back 1 Page", or whatever is between the opening and closing tags.

[edit] The "go" Paramater

Use this code to go back 3 pages, or whatever "go" is set to:

<historylink type="back" go="3" />

Note: The "go" paramater can not be less than 1!

[edit] CSS Styles

The tag also has a "style" paramater that can contain CSS style information. Example:

<historylink type="back" style="font-weight:bold; font-size:13pt;" />

This will output a link that looks like « Go Back.

[edit] Going Forward

To go forward instead of back, use this code:

<historylink type="forward" />

It will output the link text "Go Forward »".
Note: All above parameters are also supported on "forward", including custom link text!
Note 2: Default link text may be different depending on your language.

Personal tools
Namespaces
Variants
Actions
Site
Support
Download
Development
Communication
Print/export
Toolbox