Difference between revisions of "DPL:Manual - Compatibility"

From FollowTheScore
Jump to: navigation, search
(New page: {{Type Manual|section=Compatibility}} ==== Levels of Functionality ==== ==== Migration aid ====)
 
Line 1: Line 1:
 
{{Type Manual|section=Compatibility}}
 
{{Type Manual|section=Compatibility}}
 +
 +
As said before, DPL 1.8.2 contains all functionality of Extension:Intersection.
 +
 +
==== Migration aid ====
 +
 +
In the standard configuration DPL registers the <DynamicPageList> tag. This is needed to be downward compatible with extension 'Intersection'.
 +
 +
In the transition phase you may want to install DPL in PARALLEL to 'Intersection' for testing. DPL offers a second entry point for that purpose. Instead of require_once("DynamicPageList.php") you have to use require_once("DPLMigration.php"). DPL will then ONLY register the tag <Intersection>
 +
 +
In this constellation you can change some of your existing calls of 'Intersection' (which use the <DynamicPageList> tag) to the <Intersection> tag. Once you are convinced that this produces identical results and works with equal efficiency you can change to require_once("DynamicPageList.php"). Don't forget to change the statements back to the <DynamicPageList> tag!. Of course you must also remove the require_once() for the Intersection extension.
 +
  
 
==== Levels of Functionality ====
 
==== Levels of Functionality ====
  
==== Migration aid ====
+
After the migration to DPL the <DynamicPageList> tag will offer exactly the same functionality as the former Extension:Intersection.
 +
 
 +
Furthermore, there will be the &lt;dpl&gt tag available and the <nowiki>{{#dpl: ... }}</nowiki> parser function. They will by default offer their whole functionality - which may be a little bit more than you want.
 +
 
 +
Calling
 +
  ExtDynamicPageList::setFunctionalRichness(0);
 +
will ensure that they behave identical to Extension:Intersection.
 +
 
 +
Your LocalSettings.php might contain the following entries:
 +
 
 +
require_once( "$IP/extensions/DynamicPageList/DynamicPageList.php" );
 +
# the next statement served only for migration and is now commented out:
 +
# require_once( "$IP/extensions/DynamicPageList/DynamicPageListMigration.php" );
 +
ExtDynamicPageList::$options['RunFromProtectedPagesOnly'] =  
 +
      '<small><i>Extension DPL (warning): current configuration '.
 +
      'allows execution of DPL code from protected pages only.</i></small>";
 +
ExtDynamicPageList::$maxResultCount = 100;
 +
ExtDynamicPageList::$allowUnlimitedResults = false;
 +
ExtDynamicPageList::$respectParserCache = true;
 +
ExtDynamicPageList::setFunctionalRichness(0);
 +
 
 +
This would be a VERY conservative setting which allows DPL to run from protected pages only, restricting result sets to 100 pages, without real dynamic behaviour and with DPL tags offering nothing else but the mere functionality of extension:Intersection.
 +
 
 +
We recommend to
 +
* allow DPL also on non-protected pages (as is true for extension:intersection)
 +
* accept the default limitation of 500 pages as a maximum result size or even increase the number
 +
* configure true dynamic behaviour (using the [[dplcache]] where appropriate)
 +
* select 2,3 or 4 as your level of functional richness.
 +
In this case the only statement you would need is the call to setFunctionalRichness()
 +
 
 +
The Level of functional richness has 5 values. Each DPL command belongs to exactly one of these levels.
 +
They are defined near line 860 in 'DPLSetup.php':
 +
 
 +
0 => '
 +
addfirstcategorydate
 +
category
 +
count
 +
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
 +
randomseed
 +
replaceintitle
 +
resultsfooter
 +
resultsheader
 +
rowcolformat
 +
rows
 +
rowsize
 +
titlemaxlength
 +
userdateformat
 +
',
 +
2 => '
 +
addauthor
 +
addcategories
 +
addcontribution
 +
addeditdate
 +
addlasteditor
 +
addpagecounter
 +
addpagesize
 +
addpagetoucheddate
 +
adduser
 +
categoriesminmax
 +
createdby
 +
dominantsection
 +
dplcache
 +
dplcacheperiod
 +
eliminate
 +
headingcount
 +
headingmode
 +
hitemattr
 +
hlistattr
 +
ignorecase
 +
imagecontainer
 +
imageused
 +
include
 +
includematch
 +
includematchparsed
 +
includemaxlength
 +
includenotmatch
 +
includenotmatchparsed
 +
includepage
 +
includesubpages
 +
includetrim
 +
itemattr
 +
lastmodifiedby
 +
linksfrom
 +
linksto
 +
listattr
 +
minoredits
 +
modifiedby
 +
multisecseparators
 +
notcreatedby
 +
notlastmodifiedby
 +
notlinksfrom
 +
notlinksto
 +
notmodifiedby
 +
notuses
 +
reset
 +
secseparators
 +
skipthispage
 +
table
 +
tablerow
 +
tablesortcol
 +
title
 +
titlematch
 +
usedby
 +
uses
 +
',
 +
3 => '
 +
allrevisionsbefore
 +
allrevisionssince
 +
articlecategory
 +
categorymatch
 +
categoryregexp
 +
firstrevisionsince
 +
lastrevisionbefore
 +
maxrevisions
 +
minrevisions
 +
notcategorymatch
 +
notcategoryregexp
 +
nottitlematch
 +
nottitleregexp
 +
openreferences
 +
titleregexp
 +
',
 +
4 => '
 +
deleterules
 +
goal
 +
updaterules
 +
',

Revision as of 21:57, 13 June 2009

Manual Compatibility

As said before, DPL 1.8.2 contains all functionality of Extension:Intersection.

Migration aid

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

In the transition phase you may want to install DPL in PARALLEL to 'Intersection' for testing. DPL offers a second entry point for that purpose. Instead of require_once("DynamicPageList.php") you have to use require_once("DPLMigration.php"). DPL will then ONLY register the tag <Intersection>

In this constellation you can change some of your existing calls of 'Intersection' (which use the <DynamicPageList> tag) to the <Intersection> tag. Once you are convinced that this produces identical results and works with equal efficiency you can change to require_once("DynamicPageList.php"). Don't forget to change the statements back to the <DynamicPageList> tag!. Of course you must also remove the require_once() for the Intersection extension.


Levels of Functionality

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&gt tag available and the {{#dpl: ... }} parser function. They will by default offer their whole functionality - which may be a little bit more than you want.

Calling

  ExtDynamicPageList::setFunctionalRichness(0);

will ensure that they behave identical to Extension:Intersection.

Your LocalSettings.php might contain the following entries:

require_once( "$IP/extensions/DynamicPageList/DynamicPageList.php" );
# the next statement served only for migration and is now commented out:
# require_once( "$IP/extensions/DynamicPageList/DynamicPageListMigration.php" );
ExtDynamicPageList::$options['RunFromProtectedPagesOnly'] = 
      'Extension DPL (warning): current configuration '.
      'allows execution of DPL code from protected pages only.";
ExtDynamicPageList::$maxResultCount = 100;
ExtDynamicPageList::$allowUnlimitedResults = false; 
ExtDynamicPageList::$respectParserCache = true;
ExtDynamicPageList::setFunctionalRichness(0);

This would be a VERY conservative setting which allows DPL to run from protected pages only, restricting result sets to 100 pages, without real dynamic behaviour and with DPL tags offering nothing else but the mere functionality of extension:Intersection.

We recommend to

  • allow DPL also on non-protected pages (as is true for extension:intersection)
  • accept the default limitation of 500 pages as a maximum result size or even increase the number
  • configure true dynamic behaviour (using the dplcache where appropriate)
  • select 2,3 or 4 as your level of functional richness.

In this case the only statement you would need is the call to setFunctionalRichness()

The Level of functional richness has 5 values. Each DPL command belongs to exactly one of these levels. They are defined near line 860 in 'DPLSetup.php':

0 => ' addfirstcategorydate category count 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 randomseed replaceintitle resultsfooter resultsheader rowcolformat rows rowsize titlemaxlength userdateformat ', 2 => ' addauthor addcategories addcontribution addeditdate addlasteditor addpagecounter addpagesize addpagetoucheddate adduser categoriesminmax createdby dominantsection dplcache dplcacheperiod eliminate headingcount headingmode hitemattr hlistattr ignorecase imagecontainer imageused include includematch includematchparsed includemaxlength includenotmatch includenotmatchparsed includepage includesubpages includetrim itemattr lastmodifiedby linksfrom linksto listattr minoredits modifiedby multisecseparators notcreatedby notlastmodifiedby notlinksfrom notlinksto notmodifiedby notuses reset secseparators skipthispage table tablerow tablesortcol title titlematch usedby uses ', 3 => ' allrevisionsbefore allrevisionssince articlecategory categorymatch categoryregexp firstrevisionsince lastrevisionbefore maxrevisions minrevisions notcategorymatch notcategoryregexp nottitlematch nottitleregexp openreferences titleregexp ', 4 => ' deleterules goal updaterules ',