Werkplaats:Mediawiki-extensie SubpageListRU

Uit Werkplaats
Ga naar: navigatie, zoeken

Source

Installation

  • Choose:
    • Method one:
      • Upload Subpage.js and SubPageListRU.php to your wiki/extensions/SubpageListRU directory.
      • Add the following lines to your LocalSettings.php: <source lang="php">
        1. for SubPageListRU extension
        require_once("extensions/SubpageListRU/SubpageListRU.php"); </source> A good position is at the end of the file, but before the closing delimiter (?>).
      • If you want to use this method, make sure you set your rewrite rules up correctly.
    • Method two:
      • (Optional, but highly recommended) Edit the file SubPageListRU.php and remove this line (line 62): <source lang="php"> $outputPage->addScript('<script type="' . $wgJsMimeType . '" src="' . $wgScriptPath . '/extensions/SubpageListRU/Subpage.js"></script>'); </source>
      • Upload SubPageListRU.php to your wiki/extensions/SubpageListRU directory
      • Go to Mediawiki:Common.js (on your own wiki)
      • Add the whole contents of Subpage.js to the bottom of this page
      • Add the following lines to your LocalSettings.php: <source lang="php">
        1. for SubPageListRU extension
        require_once("extensions/SubpageListRU/SubPageListRU.php"); </source> A good position is at the end of the file, but before the closing delimiter (?>).

History

SubpageListRU is based on...

Authors

MediaWiki Version

Usage

To generate an automatic subpage list of the current page add the following code to the page:

{{#subpages:}}

To generate an automatic subpage list of some other page PAGE add the following code:

{{#subpages:PAGE}}

To generate an automatic synopsis of subpage lists of several pages add the following code:

{{#subpages:PAGE1, PAGE2, PAGE3}}

You can add several arguments like this:

{{#subpages:|arg=value}}


Arguments

depth

Show subpage tree up to a certain depth only.

Default:

  • -1

Can be:

  • -1: All pages
  • numeric: Maximum depth

Example:

You have Mainpage/Fu/Bar but depth is 1, then Bar wont be displayed.

clientdepth

Unfold subpage tree up to a certain depth only; for more depth user has toclick [+].

Default:

  • 1

Can be:

  • -1: don't fold any items
  • numberic: maximum depth to not fold items

headline

If mode=include precede each subpage by a headline.

Headline size of each title if mode=include

Default:

  • 0

Can be:

  • 0: don't show a readline but just a small link.
  • numeric: Headline level (numer of equals signs)


order

Type of ordering the Subpage List.

Default:

  • ASC

Can be:

  • ASC: ascending - from up to down
  • DESC: descending - from down to up

ordermethod

Using what the list shall be ordered.

Default:

  • title

Can be:

  • title: Alphabetic order by the page title
  • lastedit: Timestamp numeric order of the last edit of the page

mode

Output style of the list.

Default:

  • ordered

Can be:

  • unordered: UL list as output
  • ordered: OL list as output
  • include: Listing of the pages with headline and the whole text in a specific output format

showpath

Style of the title of page that is displayed in the list.

Default:

  • normal

Can be:

  • normal: Normal, e.g. Mainpage/Entry/Sub
  • notparent: The path without the $parent item, e.g. Entry/Sub
  • no: No path, only the page title, e.g. Sub