Jump to content
This wiki has been automatically closed because there have been no edits or log actions made within the last 60 days. If you are a user (who is not the bureaucrat) that wishes for this wiki to be reopened, please request that at Requests for reopening wikis. If this wiki is not reopened within 6 months it may be deleted. Note: If you are a bureaucrat on this wiki, you can go to Special:ManageWiki and uncheck the "Closed" box to reopen it.

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 higher functional the following configuration variables are noteworthy:
 
* <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
* <code>$wgDplSettings['maxQueryTime']</code> – |Limits the time amount of time (in milliseconds) allowed for database queries.
|-
|<syntaxhighlight lang="php" inline>$wgDplSettings['maxCategoryCount']</syntaxhighlight>
|4
* <code>$wgDplSettings['maxCategoryCount']</code> – |Limits the number of categories allowed in queries ('''default''' is 4).
|-
|<syntaxhighlight lang="php" inline>$wgDplSettings['maxResultCount']</syntaxhighlight>
|500
* <code>$wgDplSettings['maxResultCount']</code> – |Limits the number of results returned in a query ('''default''' is 500).
|-
|<syntaxhighlight lang="php" inline>$wgDplSettings['runFromProtectedPagesOnly']</syntaxhighlight>
|<syntaxhighlight lang="php" inline>false</syntaxhighlight>
* <code>$wgDplSettings['runFromProtectedPagesOnly']</code> – |Causes DPL3 to only run from protected pages (if set to ''true''), which can aid administrators having problems with malicousmalicious user activity resulting in computationally expensive queries.
|}
 
'''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>
* <code>$wgDplSettings['functionalRichness'] = 0</code> – |Provides functionality equivalent to Wikimedia's [[mw:Extension:DynamicPageList (Wikimedia)|DynamicPageList]] (also known as Intersection).
|-
|<syntaxhighlight lang="php" inline>$wgDplSettings['functionalRichness'] = 1</syntaxhighlight>
* <code>$wgDplSettings['functionalRichness'] = 1</code> – |Adds additional parameters for formatting.
|-
|<syntaxhighlight lang="php" inline>$wgDplSettings['functionalRichness'] = 2</syntaxhighlight>
* <code>$wgDplSettings['functionalRichness'] = 2</code> – |Adds features (performance equivalent) for [[mw:Manual:Pagelinks_table|pagelinks]] and templates.
|-
|<syntaxhighlight lang="php" inline>$wgDplSettings['functionalRichness'] = 3</syntaxhighlight>
* <code>$wgDplSettings['functionalRichness'] = 3</code> – |Allows more-expensive inclusion features, such as queries on revision level, and regular expression queries ('''default''').
|-
|<syntaxhighlight lang="php" inline>$wgDplSettings['functionalRichness'] = 4</syntaxhighlight>
* <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}}
 
===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, <code><nowiki>{{#dpl: ... }}</nowiki></code>. This is the DPL3 functionality used most often, and has a wide range of powerful coding options.
* [[Criteria for page selection|Criteria for page selection]]
* [[Controlling output format|Controlling output format]]
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.