Extension:DynamicPageList (third-party)

From MediaWiki.org
Jump to: navigation, search
Manual on MediaWiki Extensions
List of MediaWiki Extensions
Crystal Clear action run.png
DynamicPageList (DPL)

Release status: stable

Implementation Tag, Parser function
Description Create lists of other articles based on their category, namespace, title, references or template usage and include contents or arguments of template calls of those articles into your page.
Author(s) IlyaHaykinson, Unendlich, Dangerville, Algorithmix
Last Version 1.8.9 (2009-10-01)
MediaWiki 1.7 .. 1.16+
License GPL
Download from http://semeb.com/dpldemo/Download
Download snapshot
Subversion [Help]

Browse source code

Example various sample reports

check usage (experimental)

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

DynamicPageList (DPL) is a universal reporting tool for MediaWiki, listing category members and intersections with various formats and details. For full documentation, see the manual.

In its most basic form, DPL displays a list of pages in one or more categories. Selections may also be based on factors such as author, namespace, date, name pattern, usage of templates or references to other articles. Output takes a variety of forms, some of which incorporate elements of selected articles.

This extension is invoked with the parser function {{#dpl: .... }} or parser tag <DPL>. A Wikimedia-compatible implementation of certain features can be invoked with <DynamicPageList>.

DPL can result in computationally-expensive database queries. For best performance, use the optional parameters allowcachedresults and/or dplcache where possible.

Contents

[edit] Installation

The extended dynamic page list (DPL) is now in Wikimedia's SVN. To install:

LocalSettings.php must not include Wikimedia's version of DPL (Intersection). If you want to run them in parallel, include DynamicPageListMigration.php instead to prevent this extension from overriding <DynamicPageList>.

[edit] Configuration

DPL configuration settings and their default values, from the manual:

ExtDynamicPageList::$maxCategoryCount ?
ExtDynamicPageList::$allowUnlimitedCategories ?
ExtDynamicPageList::$minCategoryCoun ?
ExtDynamicPageList::$maxResultCount 500
ExtDynamicPageList::$allowUnlimitedResult 'false'
ExtDynamicPageList::$categoryStyleListCutoff ?
ExtDynamicPageList::$respectParserCache 'false' for <dpl> but 'true' for <DynamicPageList>. If set to 'true' DPL will no longer behave dynamically because its output is taken from the ParserCache.
ExtDynamicPageList::$options no options
ExtDynamicPageList::setFunctionalRichness($level) 4

The global variable $wgNonincludableNamespaces is also respected by DPL. It will prevent the contents of the listed namespaces from appearing in DPL's output.

[edit] Functional richness

DynamicPageList has many features; some are expensive, or dangerous in the wrong hands. It is important to choose an appropriate level of functionality for your wiki.

Note: Functional Richness parameters have been removed in the latest versions of the extension. There is no function for setting functional richness in these versions.

[edit] Use

[edit] Extended DPL functionality

Extended DPL is invoked by using the parser function {{#dpl: .... }}, or the parser extension tag <DPL> .... </DPL>.

See: Manual - General Usage and Invocation Syntax and Manual - DPL parameters

[edit] Backwards-compatible functionality

Functionality compatible with Wikimedia's DPL extension can be invoked with <DynamicPageList> .... </DynamicPageList>.

See: Extension:DynamicPageList (Wikimedia)#Use

[edit] Overview

Assume you have written some articles about countries. Typically these articles will have three things in common:

[edit] 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 ..

[edit] Which steps are necessary?

Find the articles you want to list:

Order the result list of articles according to

Define attributes you want to see

Define contents you want to show

Define the output format

[edit] 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?"

[edit] 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.

[edit] 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.

[edit] 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...

[edit] 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.

[edit] 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). Use of allowcachedresults and/or dplcache where possible can improve performance.

[edit] MediaWiki SVN Version of DPL2

The instructions on this page were written for the code that is available from http://semeb.com/dpldemo/Download and is different than the version available in MediaWiki's SVN. Some of the differences include:

[edit] See also

[edit] Further reading

DPL can do much more than we can explain here. A complete manual and many examples can be found on the on the separate DPL website.

[edit] 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.

[edit] Other applications

[edit] Comparisons

[edit] Related extensions

[edit] Older versions of this extension

Language: English  • Deutsch • Português do Brasil
Personal tools
Namespaces
Variants
Actions
Site
Support
Download
Development
Communication
Toolbox