Extension:DynamicPageList (third-party)

This extension extends DynamicPageList with DPL parser tags and function ( and  ).

This is a third-party hosted extension, not to be confused with the Extension:DynamicPageList used on Wikimedia sites.


 * Note that the version running on Wikimedia sites was at some point in time renamed to Extension:Intersection to avoid confusion with the extension described here. But the documentation still was talking of "DynamicPageList" and the SVN path was not renamed.


 * Recently 'Intersection' claimed back its ancient name and that is why you now find the documentation of 'Intersection' under 'Extension:DynamicPageList'.


 * On the other hand the DPL extension described here was still named 'DynamicPageList' and new functions were added. At some point in time downward compatibility with the version running on Wikimedia sites was lost. The extension was renamed to 'DynamicPageList2' but the documentation was still talking of "DynamicPageList".


 * Then another bunch of functionality was added and downward compatibility (with DPL2) was lost. The name of this version was changed back to DPL (which was thought to be 'free').

''All this has created much confusion. Read below for a suggestion on how to re-unite the different variants.''

This extension Dynamic Page List (DPL) has the same roots as Extension:Intersection. Until recently DPL was almost - but not exactly - downwards compatible with Intersection. A lot of confusion comes from the fact that Intersection uses the tag &lt;DynamicPageList&gt; whereas Dynamic Page List (DPL) uses the tag &lt;DPL&gt;.

DPL offers functionality that goes far beyond Intersection. Some of this functionality might be useful also on Wikimedia sites. But the problem is that inexperienced users or people with 'not-so-good-intentions' might write DPL statements which create significant database load.

A good solution - which also puts an end to all naming ambiguities of DynamicPageList, DPL, DPL2 and Intersection looks like this:
 * 1) There should be only ONE extension.
 * 2) It should be called DynamicPageList (short name DPL).
 * 3) It should listen to the tags DynamicPageList and DPL for compatibility reasons.
 * 4) Its sources should be in the mediawiki SVN
 * 5) It should be strictly downward compatible with Intersection.
 * 6) It should offer a configuration switch (let us call it LevelOfFunctionality = LoF) which lets the administrator of a wiki decide, how much functionality will be offered to the users:
 * 7) * LoF = 0 is exactly identical with Intersection as of today.
 * 8) * LoF = 1 offers additional features which do not affect performance (mainly related to output formatting)
 * 9) * LoF = 2 offers additional features which are on the same conceptual level as Intersection like selection of pages by use of templates or by pagelinks. As the underlying table structures in the mediawiki database design are very similar to categories the performance cost of theses features are comparable in magnitude with Intersection's current features
 * 10) * LoF = 3 offers additional features which are more cost-intensive, like e.g. content transclusion from pages that occur in the DPL result; we think that a dedicated DPL cache could allow to offer these features also on high traffic sites - but this still has to be proved
 * 11) * LoF = 4 offers a last group of features which are a somewhat exotic and could create trouble if used by ignorant people (batch updates and batch deletions based on DPL query results)

DPL 1.8.0 made a huge step into that direction.

After some bugfixes we now have DPL 1.8.4 as a stable release which can serve as a base for re-unification of all DPL variants..

Please help testing!

Dynamic Page List (DPL) is a universal reporting tool for MediaWikis, listing category members and intersections with various formats and details. For usage documentation, see the Manual. Typically the selection of pages to be shown will be based on one or more categories. But there are many other choices for selection criteria, like e.g. author, namespace, date, name pattern, usage of templates or references to other articles.

Installation
The extended dynamic page list (DPL) is in Wikimedia SVN. To install it, get the extension files for your version of MediaWiki, and place them in the  directory. Then add  to your LocalSettings.php file.

Configuration
Functional-richness can be reduce with to your LocalSettings.php file.

Settings and its default are listed below:


 * Configuration variables See: manual || default
 * || 500
 * || 'false'
 * || 'false' for but 'true' for . If set to 'true' DPL will no longer behave dynamically because its output is taken from the ParserCache.
 * || no options
 * || 4  (check code) 
 * colspan=2|
 * }
 * || 500
 * || 'false'
 * || 'false' for but 'true' for . If set to 'true' DPL will no longer behave dynamically because its output is taken from the ParserCache.
 * || no options
 * || 4  (check code) 
 * colspan=2|
 * }
 * || no options
 * || 4  (check code) 
 * colspan=2|
 * }
 * colspan=2|
 * }
 * }

Use
Simple intersection:
 * See: Extension:DynamicPageList

Extended DPL functionality
Extended DPL is used as a parser extension tag or as a parser function.
 * See also: Manual - General Usage and Invocation Syntax and Manual - DPL parameters

Overview
Assume you have written some articles about countries. Typically these articles will have three things in common:
 * They will belong to a common category
 * They will have a similar chapter structure, i.e. they will contain paragraphs named 'Religion' or 'History'
 * They will use a template which is used to present highly structured short data items ('Capital', 'Inhabitants', ..) in a nice way (e.g. as a wikitable)

DPL generates reports on articles
Let us assume that there is an article on Islam. You want to give some information about the spreading of this religion over various countries. But you do not want to create redundancy by repeating information that was already given in the articles on the countries.

In our scenario the natural approach with DPL would be to generate a list of 'countries' (=category) where Islam plays a role (i.e. restrict your selection to articles of category 'Country' which contain a link to 'Islam'). Typically you would want to include part of the text chapter on 'Religion' from each of the relevant countries. You might also want to give the number of inhabitants for each country. The output should be shown as an alphabetically ordered table. It would be nice if the user could easily sort the table by inhabitants or some other criteria.

With DPL you can ..


 * generate a list of all those articles (or a random sample)
 * show metadata of the articles (popularity, date of last update, ..)
 * show one or more chapters of the articles ('transclude' content)
 * show parameter values which are passed to the common template
 * order articles appropriately
 * present the result in a sortable table (e.g.)
 * use multi column output

Which steps are necessary?
Find the articles you want to list:
 * select by a logical combination (AND,OR,NOT) of categories
 * specify a range for the number of categories the article must be assigned to
 * select by a logical combination (AND,OR,NOT) of namespaces
 * define a pattern which must match the article´s name
 * name a page to which the article must or must not refer
 * name a template which the article must or must not use
 * name a text pattern which must occur within external links from a page
 * exclude or include redirections
 * restrict your search to stable pages or quality pages ("flagged revisions")
 * use other criteria for selection like author, date of last change etc.
 * define regular expressions to match the contents of pages you want to include

Order the result list of articles according to
 * name
 * date of last change
 * popularity
 * user who changed them last
 * size
 * restrict the output to the first n articles or to a random sample
 * use descending or ascending sequence

Define attributes you want to see
 * article name
 * article namespace
 * article size
 * date of last change
 * date of last access
 * user who changed them last

Define contents you want to show
 * whole article
 * contents of certain chapters (identified by headings)
 * text portions (defined by special marker tags in the article)
 * values of template calls
 * substitute the original template by a different one and show the output of that template

Define the output format
 * specify headline and footer for your report
 * use ordered list, unordered list
 * use tables, sorted tables (using javascript)
 * format table fields individually by applying templates to their content
 * use category style listing
 * create "tag clouds" by varying output text size depending on popularity of pages
 * multi column output
 * truncate title or contents to a certain maximum length
 * add a link to the article or to one or more of its chapters

DPL generates reports on categories
Apart from producing a list of pages which match certain criteria, DPL can also create a list of categories a selected set of pages belongs to. This can be useful to get an idea of the semantic scope of a group of pages (which can be defined by some arbitrary criteria). One of the more useful applications would be question like: "To which categories do the pages belong which contain a reference to the current page?"

DPL can be used for bulk editing
Sometimes you want to perform a similar editing task on many articles (like adding a template at the beginning of the text). DPL has a feature which allows you to update other articles based on regular expressions. This feature is experimental and can be disabled in the DPL config file.

DPL extracts objects and relations for generation of graphs with Extension:Wgraph
With DPL you can generate output which is then fed into other MediaWiki extensions. An especially useful application of this kind is graph generation. DPL can analyze your wiki and prepare output which is then used by Extension:Wgraph to visualize it.

DPL interacts with other extensions
There is a special mechanism which allows you to call your own extension inside the result loop of a DPL query. This opens doors for assembling new 'applications' without having to program on php level. For example you can create menu trees for Extension:Treeview, you can create dependency graphs or timebars with Extension:Wgraph, you can generate nice bar graphs or pie charts using DPL together with Ploticus, you can call 'gallery' or whatever you want...

DPL is a platform for building other applications
The power of DPL makes it possible to create applications on wiki template level which would normally require PHP programming.
 * See for example the Extension:DPL Calendar. The advantage is that these applications can be more easily modified and localized.
 * Another example is a light-weight "semantic wiki" approach. See the DPL demo page for details.

DPL and performance
With a few lines of DPL code it is possible to create huge output and CPU load (think of a DPL query which tries to include the contents of all articles in your mediawiki ;-)). Normally this is not a problem because users who write DPL queries have some level of expertise. If you are afraid, however, you can restrict the execution of DPL queries to protected articles. Apart from that the general performance of DPL on medium size wikis is quite acceptable (see the performance tests on the dpldemo website).

Call extension
The website where DPL is offered for download also contains the Call extension which allows to call an arbitrary MediaWiki article from the command line or from a wiki link and pass parameters to that article at the same time.

Other Application

 * DPL Page Name S/N Maker-Use this extension to create pages with serial number page names

Related extensions

 * BackLinksFunctions counts backlinks
 * News creates reports on page changes
 * Semantic MediaWiki creates lists of semantic links
 * TemplateTable creates tables from template fields
 * Ploticus can be used to create charts from DPL query results
 * Wgraph creates graphs from DPL output
 * Extension:Todo Tasks creates/maintains todo tasks and notifies users to whom the task is assigned
 * Extension:DPL Calendar a highly configurable calendar
 * Extension:CategoryLink Creates a table of the wiki's categories

Older versions of this extension

 * Extension:DynamicPageList2 (older version)
 * Extension:Intersection (the one in Wikimedia's SVN)''