Extension:ListTransclusions

From MediaWiki.org
Jump to navigation Jump to search
MediaWiki extensions manual
OOjs UI icon advanced.svg
ListTransclusions
Release status: stable
Implementation Special page
Description Lists all transcluded pages and images of a given page
Author(s) PatrickWtalk
Latest version 2.0 (2016-12-13)
MediaWiki 1.14+
Database changes No
License Mozilla Public License 2.0
Download
Example on Guild Wars 2 Wiki
Translate the ListTransclusions extension if it is available at translatewiki.net
Check usage and version matrix.

The ListTransclusions extension adds a special page Special:ListTransclusions which lists all used images and templates of a given page. It also adds a link to the toolbox portlet to quickly access the list for the currently shown page.

The extension was created to make sure that attribution information for licenses such as the GFDL is easily accessible even if an article uses multiple nested templates or images with the link parameter, which makes it impossible to reach the image description page without browsing through the page’s source code.

Installation[edit]

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

To users running MediaWiki 1.24 or earlier:

The instructions above describe the new way of installing this extension using wfLoadExtension() If you need to install this extension on these earlier versions (MediaWiki 1.24 and earlier), instead of wfLoadExtension( 'ListTransclusions' );, you need to use:

require_once "$IP/extensions/ListTransclusions/ListTransclusions.php";

Configuration[edit]

The extension generally works without any configuration. You can modify two messages within the MediaWiki namespace to show additional texts at the beginning or the end of the displayed list of the special page. Both messages are empty by default and will only be displayed if the target page exists. The messages are:

  • MediaWiki:listtransclusions-header – for the beginning of the list
  • MediaWiki:listtransclusions-footer – for the end of the list

The messages will be parsed by the MediaWiki parser, so you can use wiki code inside. In addition you can access the name of the current targetted page using $1 within the message code.