Extension:NumberedHeadings

From MediaWiki.org
Jump to navigation Jump to search
MediaWiki extensions manual
OOjs UI icon advanced.svg
NumberedHeadings
Release status: stable
Implementation Variable
Author(s) Stanislav Pika (Пика Пикаtalk)
License GNU General Public License 3.0 or later
Download
Hooks used
ParserBeforeInternalParse
Translate the NumberedHeadings extension if it is available at translatewiki.net
Check usage and version matrix.

The NumberedHeadings extension toggles headings autonumbering. It is based on and replaces now unmaintained extensions MagicNumberedHeadings and MagicNoNumberedHeadings by Purodha Blissenbach, without breaking any functionality.

What does this extension do?[edit source]

This extension adds magic words __NUMBEREDHEADINGS__ and __NONUMBEREDHEADINGS__ to the parser. If an article contains the magic word __NUMBEREDHEADINGS__, automatic numbering of the headings in this page is forced, regardless of the user preference settings. If the article does not contain this magic word and contains a magic word __NONUMBEREDHEADINGS__, automatic numbering of the headings in this page is inhibited — again, regardless of the user preference settings. Note: If article contains both magic words, __NUMBEREDHEADINGS__ takes precedence over __NONUMBEREDHEADINGS__.

Installation[edit source]

  • Download and place the file(s) in a directory called NumberedHeadings in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
    wfLoadExtension( 'NumberedHeadings' );
    
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Usage[edit source]

Add __NUMBEREDHEADINGS__ or __NONUMBEREDHEADINGS__ to any article to toggle automatic numbered of the headings in this article.

Further development[edit source]

Following contributions are welcome (preferably through GitHub):

  • Localizations of the magic words __NUMBEREDHEADINGS__ and __NONUMBEREDHEADINGS__
  • Bug fixes
  • Improvements