Extension:BrowserHistoryLink
|
BrowserHistoryLink Release status: stable |
|||
|---|---|---|---|
| Implementation | Tag | ||
| Description | Adds a tag to create a link with a JavaScript event to go forward or back in the client's web browser. | ||
| Author(s) | Techjartalk | ||
| Last version | 1.1 (8-02-2009) | ||
| MediaWiki | 1.5+ | ||
| PHP | 5.2.3+ | ||
| License | Public domain | ||
| Download | .zip .tar.gz README ChangeLog |
||
|
|||
|
|||
| Check usage and version matrix | |||
The BrowserHistoryLink extension adds a <historylink> tag to create a link with a JavaScript event that takes the client forward or back in the browser history.
Contents |
Installation [edit]
You must have PHP 5.2.3 or above for this extension to work correctly!
- Create the directory "BrowserHistoryLink" in your extensions directory.
- Download and extract the files to this new directory.
- Add the following line to
LocalSettings.php:require_once("$IP/extensions/BrowserHistoryLink/BrowserHistoryLink.php");
- Check Special:Version to make sure the extension was registered correctly.
Usage [edit]
Basic [edit]
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".
Custom Text [edit]
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.
The "go" Paramater [edit]
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!
CSS Styles [edit]
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.
Going Forward [edit]
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.
Translations [edit]
New translations of the messages are welcome! If you make a new translation, please post the source code for the new translation on the talk page. Here's the list of current translations:
Known Bugs [edit]
Does not allow for HTML character escape codes. (e.g.Bug fixed!<,«, ect.)Won't show messages in other languages.Bug fixed!"go" parameter not working.Bug fixed!
Notes [edit]
- Does not parse wikitext.
