Anonymous user
Main Page: Difference between revisions
no edit summary
imported>FrozenPlum No edit summary |
imported>FrozenPlum No edit summary |
||
Line 23:
===Limiting results and resource consumption===
To prevent a DPL3 query from returning huge output (or consuming too many resources such as CPU or causing database load). The
* <code>$wgDplSettings['maxQueryTime']</code> – Limits the amount of time (in milliseconds) allowed for database queries.▼
{| class="wikitable"
* <code>$wgDplSettings['maxCategoryCount']</code> – Limits the number of categories allowed in queries ('''default''' is 4).▼
!Setting
* <code>$wgDplSettings['maxResultCount']</code> – Limits the number of results returned in a query ('''default''' is 500).▼
!Default
* <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.▼
!Description
|-
|<syntaxhighlight lang="php" inline>$wgDplSettings['maxQueryTime']</syntaxhighlight>
|10000
▲
|-
|<syntaxhighlight lang="php" inline>$wgDplSettings['maxCategoryCount']</syntaxhighlight>
|4
▲
|-
|<syntaxhighlight lang="php" inline>$wgDplSettings['maxResultCount']</syntaxhighlight>
|500
▲
|-
|<syntaxhighlight lang="php" inline>$wgDplSettings['runFromProtectedPagesOnly']</syntaxhighlight>
|<syntaxhighlight lang="php" inline>false</syntaxhighlight>
▲
|}
'''Note:''' For [[meta:Miraheze|Miraheze]] users, these settings are set by Miraheze.
Line 35 ⟶ 53:
DynamicPageList3 has different levels of functional richness, which can be configured as needed. Higher levels of functionality should be considered carefully and used sparingly.
* <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}}▼
'''Note:''' For [[meta:Miraheze|Miraheze]] users, these settings are set by Miraheze.
{| class="wikitable"
!Setting
!Description
|-
|<syntaxhighlight lang="php" inline>$wgDplSettings['functionalRichness'] = 0</syntaxhighlight>
▲
|-
|<syntaxhighlight lang="php" inline>$wgDplSettings['functionalRichness'] = 1</syntaxhighlight>
▲
|-
|<syntaxhighlight lang="php" inline>$wgDplSettings['functionalRichness'] = 2</syntaxhighlight>
▲
|-
|<syntaxhighlight lang="php" inline>$wgDplSettings['functionalRichness'] = 3</syntaxhighlight>
▲
|-
|<syntaxhighlight lang="php" inline>$wgDplSettings['functionalRichness'] = 4</syntaxhighlight>
▲
|}
▲{{note|'''Important:''' Some levels of functional richness can cause high database or CPU load, and should be carefully considered.|warn}}
===Other===
{| class="wikitable"
!Setting
!Default
!Description
|-
| <syntaxhighlight lang="php" inline>$wgDplSettings['allowedNamespaces']</syntaxhighlight>
| <syntaxhighlight lang="php" inline>null</syntaxhighlight>
| All existing namespaces are used by default when DPL3 is initialized. An array of namespace constants can be provided to restrict DPL3 to only working in the specified namespaces.
|-
| <syntaxhighlight lang="php" inline>$wgDplSettings['allowUnlimitedCategories']</syntaxhighlight>
| <syntaxhighlight lang="php" inline>false</syntaxhighlight>
| Ignores 'maxCategoryCount' and allows unlimited categories, if set to <code>true</code>. Note that large numbers of categories in queries can cause servers to slow or crash.
|-
| <syntaxhighlight lang="php" inline>$wgDplSettings['allowUnlimitedResults']</syntaxhighlight>
| <syntaxhighlight lang="php" inline>false</syntaxhighlight>
| Ignores 'maxResultCount' and allows unlimited results, if set to <code>true</code>. Note that large sets of results may cause pages to slow or fail to load.
|-
| <syntaxhighlight lang="php" inline>$wgDplSettings['alwaysCacheResults']</syntaxhighlight>
| <syntaxhighlight lang="php" inline>false</syntaxhighlight>
| Ignores <code>'allowcachedresults'</code> and enables the parser cache, if set to <code>true</code>.
|-
| <syntaxhighlight lang="php" inline>$wgDplSettings['categoryStyleListCutoff']</syntaxhighlight>
| 6
| Maximum number of items permitted in a category list, additional are cut off.
|-
| <syntaxhighlight lang="php" inline>$wgDplSettings['handleSectionTag']</syntaxhighlight>
| <syntaxhighlight lang="php" inline>false</syntaxhighlight>
| Set this to have DPL3 handle <code>open</code> tags outside DPL parser tags.
|-
| <syntaxhighlight lang="php" inline>$wgDplSettings['minCategoryCount']</syntaxhighlight>
| 0
| Minimum number of categories permitted in DPL3 queries.
|-
| <syntaxhighlight lang="php" inline>$wgDplSettings['recursiveTagParse']</syntaxhighlight>
| <syntaxhighlight lang="php" inline>false</syntaxhighlight>
| Performs recursive parsing on <code>open</code> parser tags, converting tags and functions (for example, [[mw:Help:Magic words|magic words]] like <code><nowiki>{{PAGENAME}}</nowiki></code>). Though it may not work the same in all cases, this functions similarly to the <code><nowiki>{{#dpl}}</nowiki></code> DPL3 parser function (see [[#Other Modules|Other Modules]]).
|-
| <syntaxhighlight lang="php" inline>$wgDplSettings['queryCacheTime']</syntaxhighlight>
| 0
| Specifies the amount of time to cache a query for, the query cache then cannot be purged. Values between 30 and 600 are suggested.
|}
== Usage ==
Line 52 ⟶ 127:
== Primary DPL3 module ==
These sections contain documentation on DPL3's primary module
* [[Criteria for page selection|Criteria for page selection]]
* [[Controlling output format|Controlling output format]]
|