Extension:Spoilers

From MediaWiki.org
Jump to navigation Jump to search

Other languages:
Deutsch • ‎English • ‎español • ‎polski • ‎sicilianu • ‎日本語
MediaWiki extensions manual
OOjs UI icon advanced.svg
Spoilers
Release status: stable
Implementation Parser function
Description Allows to hide text using the {{#spoiler}} variable
Author(s) Tim "Telshin" Aldridge, Kris "Developaws" Blair
Latest version 2.0 (2017-10-13)
MediaWiki 1.26+
Database changes No
License MIT License
Download
Hooks used
ParserFirstCallInit
Translate the Spoilers extension if it is available at translatewiki.net
Check usage and version matrix.

The Spoilers extension adds a spoiler tag that will hide a block of text. If you are searching for a more simple way to hide content on pages, you can be interested by Manual:Collapsible elements . The spoiler button's show/hide message can be customized for each set.

Spoilers will be hidden on page load.

Installation[edit]

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

Usage examples[edit]

{{#spoiler:hide=hide_message|spoiler_text}}
{{#spoiler:show=show_message|spoiler_text}}
{{#spoiler:show=show_message|hide=hide_message|spoiler_text}}
{{#spoiler:spoiler_text}}