Compatibility: Difference between revisions

From DynamicPageList3 Manual
Content added Content deleted
No edit summary
No edit summary
Line 1: Line 1:
{{DPL Manual|section=Compatibility}}
{{DPL Manual|section=Compatibility}}


DynamicPageList3 contains all functionality of the Intersection extension and previous versions of DynamicPageList.
DynamicPageList3 contains all functionality of the Intersection extension and previous versions of DynamicPageList. Standardization has been applied to various parameters to make them use consistent behavior so minor tweaking may be necessary to queries when migrating from DynamicPageList 1 or 2.


= Migration Aid =
=Migration Aid from Extension:Intersection=


In the standard configuration DPL registers the <DynamicPageList> tag. This is needed to be downward compatible with extension 'Intersection'.
In the standard configuration DPL registers the <DynamicPageList> tag. This is needed to be downward compatible with extension 'Intersection'.


During transitioning you may want to install DPL in parallel to 'Intersection' for testing. Simply configure add the configuration line <code><nowiki>$dplMigrationTesting = true;</nowiki></code> and DPL will then only register a tag called &lt;Intersection&gt;.
During transitioning it may be desirable to install DPL in parallel to 'Intersection' for testing. Add the configuration line <code><nowiki>$dplMigrationTesting = true;</nowiki></code> before the extension inclusion and DPL will then only register a tag called &lt;Intersection&gt;.


With this configuration try changing some of the existing calls of 'Intersection' (which use the &lt;DynamicPageList&gt; tag) to the &lt;Intersection&gt; tag. Once the data has been tested and verified that it produces identical results simply remove the <nowiki>$dplMigrationTesting</nowiki> line.
With this configuration try changing some of the existing calls of 'Intersection' (which use the &lt;DynamicPageList&gt; tag) to the &lt;Intersection&gt; tag. Once the data has been tested and verified that it produces identical results simply remove the <nowiki>$dplMigrationTesting</nowiki> line.

After the migration to DPL the &lt;DynamicPageList&gt; tag will offer exactly the same functionality as the former Extension:Intersection. Furthermore, there will be the &lt;dpl&gt; tag available and the <code><nowiki>{{#dpl: ... }}</nowiki></code> parser function. They will by default offer their whole functionality. Please see the section below for configuring DynamicPageList to use more restrictive functionality.


=Levels of Functionality=
=Levels of Functionality=

After the migration to DPL the &lt;DynamicPageList&gt; tag will offer exactly the same functionality as the former Extension:Intersection. Furthermore, there will be the &lt;dpl&gt; tag available and the <code><nowiki>{{#dpl: ... }}</nowiki></code> parser function. They will by default offer their whole functionality.

To change the parameter richness level change the configuration for:
To change the parameter richness level change the configuration for:



Revision as of 06:32, 24 March 2015

Template:DPL Manual

DynamicPageList3 contains all functionality of the Intersection extension and previous versions of DynamicPageList. Standardization has been applied to various parameters to make them use consistent behavior so minor tweaking may be necessary to queries when migrating from DynamicPageList 1 or 2.

Migration Aid from Extension:Intersection

In the standard configuration DPL registers the <DynamicPageList> tag. This is needed to be downward compatible with extension 'Intersection'.

During transitioning it may be desirable to install DPL in parallel to 'Intersection' for testing. Add the configuration line $dplMigrationTesting = true; before the extension inclusion and DPL will then only register a tag called <Intersection>.

With this configuration try changing some of the existing calls of 'Intersection' (which use the <DynamicPageList> tag) to the <Intersection> tag. Once the data has been tested and verified that it produces identical results simply remove the $dplMigrationTesting line.

After the migration to DPL the <DynamicPageList> tag will offer exactly the same functionality as the former Extension:Intersection. Furthermore, there will be the <dpl> tag available and the {{#dpl: ... }} parser function. They will by default offer their whole functionality. Please see the section below for configuring DynamicPageList to use more restrictive functionality.

Levels of Functionality

To change the parameter richness level change the configuration for:

$dplSettings['functionalRichness'] = 3;

There are five levels of parameter richness from 0 to 4. Enabling a numerically higher richness level enables all the parameters in the levels below it as well. The levels are defined in the ParametersData class and copied here for quick reference.

  • Level 0 - Identical functionality to Intersection extension.
  • Level 1 - Includes additional formatting and output options.
  • Level 2 - Database query refinement parameters that have minimal performance impact. Also includes parameters for content transclusion.
  • Level 3 - More query parameters that can have a higher database impact and should be carefully tested for performance impacts.
  • Level 4 - A few features for development purposes and batch updating. Not recommend to be enabled on public web sites.
static private $parametersForRichnessLevel = [
	0 => [
		'addfirstcategorydate',
		'category',
		'count',
		'hiddencategories',
		'mode',
		'namespace',
		'notcategory',
		'order',
		'ordermethod',
		'qualitypages',
		'redirects',
		'showcurid',
		'shownamespace',
		'stablepages',
		'suppresserrors'
	],
	1 => [
		'allowcachedresults',
		'execandexit',
		'columns',
		'debug',
		'distinct',
		'escapelinks',
		'format',
		'inlinetext',
		'listseparators',
		'notnamespace',
		'offset',
		'oneresultfooter',
		'oneresultheader',
		'ordercollation',
		'noresultsfooter',
		'noresultsheader',
		'randomcount',
		'replaceintitle',
		'resultsfooter',
		'resultsheader',
		'rowcolformat',
		'rows',
		'rowsize',
		'scroll',
		'title',
		'titlelt',
		'titlegt',
		'titlemaxlength',
		'userdateformat'
	],
	2 => [
		'addauthor',
		'addcategories',
		'addcontribution',
		'addeditdate',
		'addexternallink',
		'addlasteditor',
		'addpagecounter',
		'addpagesize',
		'addpagetoucheddate',
		'adduser',
		'cacheperiod',
		'categoriesminmax',
		'createdby',
		'dominantsection',
		'eliminate',
		'fixcategory',
		'headingcount',
		'headingmode',
		'hitemattr',
		'hlistattr',
		'ignorecase',
		'imagecontainer',
		'imageused',
		'include',
		'includematch',
		'includematchparsed',
		'includemaxlength',
		'includenotmatch',
		'includenotmatchparsed',
		'includepage',
		'includesubpages',
		'includetrim',
		'itemattr',
		'lastmodifiedby',
		'linksfrom',
		'linksto',
		'linkstoexternal',
		'listattr',
		'minoredits',
		'modifiedby',
		'multisecseparators',
		'notcreatedby',
		'notlastmodifiedby',
		'notlinksfrom',
		'notlinksto',
		'notmodifiedby',
		'notuses',
		'reset',
		'secseparators',
		'skipthispage',
		'table',
		'tablerow',
		'tablesortcol',
		'titlematch',
		'usedby',
		'uses'
	],
	3 => [
		'allrevisionsbefore',
		'allrevisionssince',
		'articlecategory',
		'categorymatch',
		'categoryregexp',
		'firstrevisionsince',
		'lastrevisionbefore',
		'maxrevisions',
		'minrevisions',
		'notcategorymatch',
		'notcategoryregexp',
		'nottitlematch',
		'nottitleregexp',
		'openreferences',
		'titleregexp'
	],
	4 => [
		'deleterules',
		'goal',
		'updaterules'
	]
];