Extension:NoTOC
From MediaWiki.org
| This extension stores its source code on a wiki page. Please be aware that this code may be unreviewed or maliciously altered. They may contain security holes, outdated interfaces that are no longer compatible etc. Note: No localisation updates are provided for this extension by translatewiki.net. |
|
NoTOC Release status: stable |
|||
|---|---|---|---|
| Implementation | Parser extension | ||
| Description | Turns off Table of Contents by default on all pages. | ||
| Author(s) | Andrew Fitzgerald (Frantiktalk) | ||
| Last version | 0.1.0 | ||
| License | GNU GPL | ||
| Download | No link | ||
|
|||
| Check usage and version matrix; stats | |||
This extension hides the table of contents by default. __TOC__ can still be used normally.
Contents |
Download instructions[edit]
Please cut and paste the code found below and place it in $IP/extensions/NoTOC/NoTOC.php. Note: $IP stands for the root directory of your MediaWiki installation, the same directory that holds LocalSettings.php.
Installation[edit]
To install this extension, add the following to LocalSettings.php:
require_once("$IP/extensions/NoTOC/NoTOC.php");
Code[edit]
<?php $wgExtensionCredits['parserhook'][] = array( 'name' => 'NoTOC', 'author' =>'[http://swiftlytilting.com Andrew Fitzgerald]', 'url' => 'http://www.mediawiki.org/wiki/Extension:NoTOC', 'description' => 'Turns off TOC by default on all pages', 'descriptionmsg' => "notoc-desc", 'version' => '0.1.0', 'path' => __FILE__, ); $wgHooks['ParserClearState'][] = 'efMWNoTOC'; function efMWNoTOC($parser) { $parser->mShowToc = false; return true; }
See also[edit]
| Language: | English • polski |
|---|