Difference between revisions of "Extension DPL"

From FollowTheScore
Jump to: navigation, search
(Table output)
 
(21 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
{{TOCright}}
 
As its name (''Dynamic Page Lister'') implies, DPL is a ''report generator'' for MediaWikis.  
 
As its name (''Dynamic Page Lister'') implies, DPL is a ''report generator'' for MediaWikis.  
 
This is the most important extension we provide. The name of this website (''dpldemo'') is derived from the idea to demonstrate the many uses of DPL. DPL is a true monster in terms of functionality. Although there is a [[DPL:Manual|detailed DPL manual]] most people will find it easier to look for an existing '''DPL example''' which is similar to their needs.
 
This is the most important extension we provide. The name of this website (''dpldemo'') is derived from the idea to demonstrate the many uses of DPL. DPL is a true monster in terms of functionality. Although there is a [[DPL:Manual|detailed DPL manual]] most people will find it easier to look for an existing '''DPL example''' which is similar to their needs.
Line 6: Line 7:
 
<br/>
 
<br/>
  
<center><big>'''read the [[DPL:Manual|manual]] or take the [[Dynamic Page List|systematic approach]].'''</big></center>
+
<center><big>'''[[mw:Extension:DPL|Download DPL]]'''</big>, read the <big>'''[[DPL:Manual|Manual]]'''</big> or take the <big>'''[[Dynamic Page List|Systematic Approach]].'''</big></center>
 
 
__NOTOC__
 
  
 
== Examples: selecting articles ==
 
== Examples: selecting articles ==
Line 21: Line 20:
  
 
* Find articles which have (not) been changed recently [[DPL Example 016]]
 
* Find articles which have (not) been changed recently [[DPL Example 016]]
 +
 +
=== Show the context of an article ===
 +
 +
* Print a list of pages, templates, categories and images which are related to a certain article [[DPL Example 018]]
 +
* Export an article form a wiki with all its (direct) environment (pages, templates, categories and images) [[DPL Example 024]]
 +
 +
=== Show Images ===
 +
 +
* List images which are part of a certain article [[DPL Example 019]]
  
  
Line 27: Line 35:
 
=== Show template values ===
 
=== Show template values ===
  
 +
* show a single template parameter of a single page [[DPL Example 025]]
 
* Create a table of articles where the columns show parameter values of template calls [[DPL Example 001]]
 
* Create a table of articles where the columns show parameter values of template calls [[DPL Example 001]]
 
* Make that table sortable and define a headline for the first column [[DPL Example 002]]
 
* Make that table sortable and define a headline for the first column [[DPL Example 002]]
 
* Add meta data (hit count) and apply individual formatting to the fields [[DPL Example 003]]
 
* Add meta data (hit count) and apply individual formatting to the fields [[DPL Example 003]]
 
* change the sequence of fields and apply a nested DPL within a phantom template [[DPL Example 004]]
 
* change the sequence of fields and apply a nested DPL within a phantom template [[DPL Example 004]]
 +
 +
=== Sort output according to values ot template parameters ===
 +
 +
* Sometimes you want to use the value of a template parameter as a sort key [[DPL Example 023]]
  
 
=== Show chapter content ===
 
=== Show chapter content ===
Line 41: Line 54:
 
* Suppress unwanted parts of content (text, links, catgeory assignments) transcluded from articles [[DPL Example 015]]
 
* Suppress unwanted parts of content (text, links, catgeory assignments) transcluded from articles [[DPL Example 015]]
  
 +
=== Other examples, showing meta data, content, images etc. ===
 +
 +
* [[Example 1|simple example]]
 +
* [[Example 2|realistic example]]
 +
* [[Example 3|other examples]]
 +
* [[Example 4|treeview example]]
 +
 +
 +
== Search Forms ==
 +
 +
* A generic search form based on page links and template use [[DPL Example 030]]
 +
* Search for pages based on patterns contained in their external links [[DPL Example 031]]
  
 
== Examples: defining output layout ==
 
== Examples: defining output layout ==
Line 52: Line 77:
 
=== Table output ===
 
=== Table output ===
  
 +
* With only a few lines of code DPL can produce tables of articles, including text portions or dat from templates [[DPL Example table output]]
  
 
== Examples: Other features ==
 
== Examples: Other features ==
Line 58: Line 84:
  
 
* Flip through a long result set [[DPL Example 013]]
 
* Flip through a long result set [[DPL Example 013]]
 +
* Flip through a long result set - improved version, needs DPL 1.7.9 -  [[DPL Example 020]]
 +
* Flip through a long result set - BEST PERFORMANCE, needs DPL 1.8.6 -  [[DPL Example 027]]
  
 
=== Load DPL result set into an ARRAY for further manipulation ===
 
=== Load DPL result set into an ARRAY for further manipulation ===
  
 
* Transfer the complete DPL result to an array using [http://www.mediawiki.org/wiki/Extension:ArrayExtension ArrayExtension] [[DPL Example 014]]
 
* Transfer the complete DPL result to an array using [http://www.mediawiki.org/wiki/Extension:ArrayExtension ArrayExtension] [[DPL Example 014]]
 +
 +
=== Find parser function calls ===
 +
 +
* Find out which parser functions are used by the pages in your wiki [[DPL Example 026]]
  
 
=== Create a permuted index of template calls ===
 
=== Create a permuted index of template calls ===
Line 67: Line 99:
 
* List articles ordered by the values they use to call a certain template [[DPL Example 017]]
 
* List articles ordered by the values they use to call a certain template [[DPL Example 017]]
  
 +
=== EXPERIMENTAL FEATURE: DPL cache ===
 +
 +
* Cache the result of a DPL query for a specified time in the filesystem on the server [[DPL Example 021]]
 +
* A demo of caching in combnation with scrolling [[DPL Example 022]]
  
== Other examples ==
+
=== Changing documents ===
  
* Examples
+
* Change the value of a template parameter in a page [[DPL Example 029]]
** [[Example 1|simple example]]
 
** [[Example 2|realistic example]]
 
** [[Example 3|other examples]]
 
** [[Example 4|treeview example]]
 

Latest revision as of 09:13, 20 August 2012

As its name (Dynamic Page Lister) implies, DPL is a report generator for MediaWikis. This is the most important extension we provide. The name of this website (dpldemo) is derived from the idea to demonstrate the many uses of DPL. DPL is a true monster in terms of functionality. Although there is a detailed DPL manual most people will find it easier to look for an existing DPL example which is similar to their needs.

Once you have seen the examples you may want to


Download DPL, read the Manual or take the Systematic Approach.

Examples: selecting articles

List articles by category

Find articles which have been changed recently

Show the context of an article

  • Print a list of pages, templates, categories and images which are related to a certain article DPL Example 018
  • Export an article form a wiki with all its (direct) environment (pages, templates, categories and images) DPL Example 024

Show Images


Examples: defining the amount of output

Show template values

  • show a single template parameter of a single page DPL Example 025
  • Create a table of articles where the columns show parameter values of template calls DPL Example 001
  • Make that table sortable and define a headline for the first column DPL Example 002
  • Add meta data (hit count) and apply individual formatting to the fields DPL Example 003
  • change the sequence of fields and apply a nested DPL within a phantom template DPL Example 004

Sort output according to values ot template parameters

  • Sometimes you want to use the value of a template parameter as a sort key DPL Example 023

Show chapter content

  • Show the content of a certain chapter of some articles DPL Example 011
  • Show the content of a certain chapter of some articles if a given text pattern occurs DPL Example 012

Filter transcluded contents

  • Suppress unwanted parts of content (text, links, catgeory assignments) transcluded from articles DPL Example 015

Other examples, showing meta data, content, images etc.


Search Forms

  • A generic search form based on page links and template use DPL Example 030
  • Search for pages based on patterns contained in their external links DPL Example 031

Examples: defining output layout

Tree output

Table output

  • With only a few lines of code DPL can produce tables of articles, including text portions or dat from templates DPL Example table output

Examples: Other features

Split large result sets into several pages

Load DPL result set into an ARRAY for further manipulation

Find parser function calls

  • Find out which parser functions are used by the pages in your wiki DPL Example 026

Create a permuted index of template calls

  • List articles ordered by the values they use to call a certain template DPL Example 017

EXPERIMENTAL FEATURE: DPL cache

  • Cache the result of a DPL query for a specified time in the filesystem on the server DPL Example 021
  • A demo of caching in combnation with scrolling DPL Example 022

Changing documents