Extension:SubPageList3

Introduction
The Wikiversity community have voted overwhelmingly for a subpagelist extension. However Extension:SubPageList2 was declined by Mediawiki developers for technical reasons. The current extension will improve on the existing extension to meet criteria for implementation on Wikiversity.

Description
SubPageList2 was described as follows: ''Sub Page List 2 is an extension that automaticaly creates a list of the subpages of a page. The dynamic created list will be created automatically on every edit of the page where the SubPageList element is given.''

History

 * SubPageList1 was written by User:Robchurch and is no longer available. A note in the code of SubPageList2 says that the orginal version of the SubpageList extension... can produce a fatal error while using the element. No further information was given about this. However it might be that the following is meant: that the original SubPageList and SubPageList2 cannot be used together.
 * SubPageList2 was an extension of the above by Schaelles, probably written for a non-Wikimedia project. Date: 2006.
 * A simplified variant was written by User:Karora in January 2008. See below for code.

Code

 * Code for SubPageList2 (TWO - the older version!). Formatted into a wiki box with colours to make code inspection easy and lazy.
 * Code for Karora Variant. Possibly very experimental. See information at User:Karora/ListSubPages.

Feedback from other developers
The following feedback was given about Extension:SubPageList2:

I've done a quick review of this extension: - Unused variables in several places, including variables that get filled with data using string operations (line 547) - The content of the subpages will be loaded even if no preview is  requested (lines 567ff). This costs a lot of ressources. - Odd code: if ( $this->debug || $this->debug == 1 ) { (line 276). The "|| $this->debug == 1" part is superfluous. Overall, I don't think that we should activate this code. JeLuF

Things changed

 * User:Peterblaise suggested improving the use of $wgExtensionCredits. Done.
 * Corrected typo of array $conditions.
 * Removed preview mode. This is a major feature removal. The old version could (allegedly) include previews of the subpages. This was considered far too ambitious and outside the current needs. This also removed a lot of the code which "JeLuF" (above) did not like.
 * Removed restriction of subpage choice by category and namespace.
 * Removed options for limiting and ignoring certain subpages.

Things to be changed
Currently this is a list of all the bells and whistles in SubPageList2, with proposals for their fate. It may be that some of these features never worked anyway or were mere proposals not identified as such.

Options to be retained, tested and repaired

 * Debug. Values: 0 = show errors; 1 = hide errors. Illogical. Documentation error?
 * Deepness. Rename to "depth". Specifies how deep to go. Note bug report by Fungiblename.
 * Mode. Remove the "preview" value and keep just the choice between numbered and bulleted lists.

Options to consider axing

 * Order: whether to sort subpages in ascending or descending order.
 * Ordermethod: whether to sort subpages by date or title.
 * Parent: used to choose the top level page in the nav; perhaps better either to choose the root or the current page.
 * Showpath: whether to show just page titles or the full path in the list.

Options to be axed

 * Category: was used to restrict selected subpages to those belonging to a specific category.
 * Count: maximum number of subpages to display.
 * Ignore: list of subpages to ignore.
 * Namespace: was used to restrict subpage selection by namespace.
 * Previewcount: used to determine how much of a subpage was previewed; as the preview feature is being removed, this is no longer needed.
 * Previewmode: ditto.
 * Headline: was an option for the preview mode.

Features

 * General idea is to cut down Extension:SubPageList2 to the essentials.