Manual: Difference between revisions

Content added Content deleted
imported>FrozenPlum
m (refer to examples page instead of listing examples here)
imported>FrozenPlum
m (Move references to configuration, functional richness, resource consumption etc., to the expected location (users would not generally think to look for such information under specific params, will link from those params to this info))
Line 5: Line 5:


As a basic example, DPL can be used to insert, in a wiki page, an always-current list of all pages of a particular [[mw:Help:category|category]]. The data displayed may be selected and sorted based on factors like author, namespace, date, name pattern, usage of templates, or references to other articles, with a variety of custom formatting possibilities.
As a basic example, DPL can be used to insert, in a wiki page, an always-current list of all pages of a particular [[mw:Help:category|category]]. The data displayed may be selected and sorted based on factors like author, namespace, date, name pattern, usage of templates, or references to other articles, with a variety of custom formatting possibilities.


== Configuration ==

DPL3 has a variety of configuration settings that can be used, as well as a number of defaults that are important to note. Settings should be defined before enabling the extension.

* Please see [[mw:Extension:DynamicPageList3#Configuration|DPL3 configuration]] on MediaWiki for a '''full list''' of possible configuration options.


===Limiting results and resource consumption===

To prevent a DPL3 query from returning huge output (or consuming too many resources) the following configuration variables are noteworthy:
* <code>$wgDplSettings['maxQueryTime']</code> – Limits the amount of time (in milliseconds) allowed for database queries.
* <code>$wgDplSettings['maxCategoryCount']</code> – Limits the number of categories allowed in queries ('''default''' is 4).
* <code>$wgDplSettings['maxResultCount']</code> – Limits the number of results returned in a query ('''default''' is 500).
* <code>$wgDplSettings['runFromProtectedPagesOnly']</code> – Causes DPL3 to only run from protected pages (if set to ''true''), which can aid administrators having problems with malicous user activity resulting in computationally expensive queries.


=== Functional richness ===

DynamicPageList3 has different levels of functional richness, which can be configured as needed.

* <code>$wgDplSettings['functionalRichness'] = 0</code> – Provides functionality equivalent to Wikimedia's [[mw:Extension:DynamicPageList (Wikimedia)|DynamicPageList]] (also known as Intersection).
* <code>$wgDplSettings['functionalRichness'] = 1</code> – Adds additional parameters for formatting.
* <code>$wgDplSettings['functionalRichness'] = 2</code> – Adds features (performance equivalent) for [[mw:Manual:Pagelinks_table|pagelinks]] and templates.
* <code>$wgDplSettings['functionalRichness'] = 3</code> – Allows more-expensive inclusion features, such as queries on revision level, and regular expression queries ('''default''').
* <code>$wgDplSettings['functionalRichness'] = 4</code> – Permits potentially dangerous and exotic batch delete and update operations; not recommended for public websites. Also includes extra debugging parameters for development and testing.
{{note|'''Important:''' Some levels of functional richness can cause high database or CPU load, and should be carefully considered.|warn}}



== Usage ==
== Usage ==