User:Claus chr/DPL: Difference between revisions
No edit summary |
No edit summary |
||
(8 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
:See also [[User:Pipesmoker/Dynamic_Page_Lists|Pipesmoker's notes]] and [http://semeb.com/dpldemo/index.php?title=Extension_DPL this page of examples] | :See also [[User:Pipesmoker/Dynamic_Page_Lists|Pipesmoker's notes]] and [http://semeb.com/dpldemo/index.php?title=Extension_DPL this page of examples] | ||
:Example UI on [http://semeb.com/dpldemo/index.php?title=Template:Catlist this Template:Catlist page] | :Example UI on [http://semeb.com/dpldemo/index.php?title=Template:Catlist this Template:Catlist page] | ||
:Search on [[User:Claus chr/Search|this page]] | |||
All the examples on this page have been commented out to prevent the page from being very slow to load. If you want to see the outcome of a search example, just edit the page and remove the comment tags around the desired example. You don't need to save the page, a preview will give you the search results; that way you can experiment with the examples and easily restore the page to its original state when you are done. | All the examples on this page have been commented out to prevent the page from being very slow to load. If you want to see the outcome of a search example, just edit the page and remove the comment tags around the desired example. You don't need to save the page, a preview will give you the search results; that way you can experiment with the examples and easily restore the page to its original state when you are done. | ||
Line 50: | Line 51: | ||
{{Input|1=<nowiki> | {{Input|1=<nowiki> | ||
<DPL> | <DPL> | ||
namespace = | namespace = | ||
nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z](...)?[)]))$ | nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z](...)?[)]))$ | ||
titleregexp = ^[A-J] | titleregexp = ^[A-J] | ||
include = * | include = * | ||
includematch = @\{\{Remember\| | includematch = @\{\{Remember\|@ | ||
includemaxlength = 0 | includemaxlength = 0 | ||
format = ,\n* [[%PAGE%|%TITLE%]],, | format = ,\n* [[%PAGE%|%TITLE%]],, | ||
Line 60: | Line 61: | ||
</DPL> | </DPL> | ||
<DPL> | <DPL> | ||
namespace = | namespace = | ||
nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z](...)?[)]))$ | nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z](...)?[)]))$ | ||
titleregexp = ^K[A-Z] | titleregexp = ^K[A-Z] | ||
include = * | include = * | ||
includematch = @\{\{Remember\| | includematch = @\{\{Remember\|@ | ||
includemaxlength = 0 | includemaxlength = 0 | ||
format = ,\n* [[%PAGE%|%TITLE%]],, | format = ,\n* [[%PAGE%|%TITLE%]],, | ||
Line 70: | Line 71: | ||
</DPL> | </DPL> | ||
<DPL> | <DPL> | ||
namespace = | namespace = | ||
nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z](...)?[)]))$ | |||
titleregexp = ^K[a-ce-z] | |||
include = * | |||
includematch = @\{\{Remember\|@ | |||
includemaxlength = 0 | |||
format = ,\n* [[%PAGE%|%TITLE%]],, | |||
resultsheader = There are %TOTALPAGES% pages beginning with Ka-Kz but not Kd\n | |||
</DPL> | |||
<DPL> | |||
namespace = | |||
nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z](...)?[)]))$ | nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z](...)?[)]))$ | ||
titleregexp = ^ | titleregexp = ^Kd | ||
include = * | include = * | ||
includematch = @\{\{Remember\| | includematch = @\{\{Remember\|@ | ||
includemaxlength = 0 | includemaxlength = 0 | ||
format = ,\n* [[%PAGE%|%TITLE%]],, | format = ,\n* [[%PAGE%|%TITLE%]],, | ||
resultsheader = There are %TOTALPAGES% pages beginning with | resultsheader = There are %TOTALPAGES% pages beginning with Kd\n | ||
</DPL> | </DPL> | ||
<DPL> | <DPL> | ||
namespace = | namespace = | ||
nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z](...)?[)]))$ | nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z](...)?[)]))$ | ||
titleregexp = ^[L-Z] | titleregexp = ^[L-Z] | ||
include = * | include = * | ||
includematch = @\{\{Remember\| | includematch = @\{\{Remember\|@ | ||
includemaxlength = 0 | includemaxlength = 0 | ||
format = ,\n* [[%PAGE%|%TITLE%]],, | format = ,\n* [[%PAGE%|%TITLE%]],, | ||
Line 92: | Line 103: | ||
<!-- | <!-- | ||
<DPL> | <DPL> | ||
namespace = | namespace = | ||
nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z](...)?[)]))$ | nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z](...)?[)]))$ | ||
titleregexp = ^[A-J] | titleregexp = ^[A-J] | ||
include = * | include = * | ||
includematch = @\{\{Remember\| | includematch = @\{\{Remember\|@ | ||
includemaxlength = 0 | includemaxlength = 0 | ||
format = ,\n* [[%PAGE%|%TITLE%]],, | format = ,\n* [[%PAGE%|%TITLE%]],, | ||
Line 102: | Line 113: | ||
</DPL> | </DPL> | ||
<DPL> | <DPL> | ||
namespace = | namespace = | ||
nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z](...)?[)]))$ | nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z](...)?[)]))$ | ||
titleregexp = ^K[A-Z] | titleregexp = ^K[A-Z] | ||
include = * | include = * | ||
includematch = @\{\{Remember\| | includematch = @\{\{Remember\|@ | ||
includemaxlength = 0 | includemaxlength = 0 | ||
format = ,\n* [[%PAGE%|%TITLE%]],, | format = ,\n* [[%PAGE%|%TITLE%]],, | ||
Line 112: | Line 123: | ||
</DPL> | </DPL> | ||
<DPL> | <DPL> | ||
namespace = | namespace = | ||
nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z](...)?[)]))$ | |||
titleregexp = ^K[a-ce-z] | |||
include = * | |||
includematch = @\{\{Remember\|@ | |||
includemaxlength = 0 | |||
format = ,\n* [[%PAGE%|%TITLE%]],, | |||
resultsheader = There are %TOTALPAGES% pages beginning with Ka-Kz but not Kd\n | |||
</DPL> | |||
<DPL> | |||
namespace = | |||
nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z](...)?[)]))$ | nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z](...)?[)]))$ | ||
titleregexp = ^ | titleregexp = ^Kd | ||
include = * | include = * | ||
includematch = @\{\{Remember\| | includematch = @\{\{Remember\|@ | ||
includemaxlength = 0 | includemaxlength = 0 | ||
format = ,\n* [[%PAGE%|%TITLE%]],, | format = ,\n* [[%PAGE%|%TITLE%]],, | ||
resultsheader = There are %TOTALPAGES% pages beginning with | resultsheader = There are %TOTALPAGES% pages beginning with Kd\n | ||
</DPL> | </DPL> | ||
<DPL> | <DPL> | ||
namespace = | namespace = | ||
nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z](...)?[)]))$ | nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z](...)?[)]))$ | ||
titleregexp = ^[L-Z] | titleregexp = ^[L-Z] | ||
include = * | include = * | ||
includematch = @\{\{Remember\| | includematch = @\{\{Remember\|@ | ||
includemaxlength = 0 | includemaxlength = 0 | ||
format = ,\n* [[%PAGE%|%TITLE%]],, | format = ,\n* [[%PAGE%|%TITLE%]],, | ||
Line 138: | Line 159: | ||
{{Remember|2=Be aware!|1=The page count reported by each query is not the number of matching pages found, but the total number of pages searched in that group. That number should always be less than 500! If it is not then some of the pages will not have been searched.}} | {{Remember|2=Be aware!|1=The page count reported by each query is not the number of matching pages found, but the total number of pages searched in that group. That number should always be less than 500! If it is not then some of the pages will not have been searched.}} | ||
If you want to search other namespaces than Main, just change that line. The <code>nottitleregexp</code> lines filters out all translated pages including lingering old style translations and should not be touched. The <code>titlematch</code> lines are needed to split up the search into manageable chunks. There is a maximum of pages that can be handled by the <code>includematch</code> search; if too many pages pass through the title filters the first ones up to the maximum number will be searched; the rest will be silently ignored! Currently, the maximum seems to be | If you want to search other namespaces than Main, just change that line. If you want to search the Main namespace and one or more other namespaces use <code>namespace = | Other</code>. The enpty string before the '|' means Main — ''never write <code>Main</code>''; that no longer works. <code>Other</code> can be one or more other namespaces separated by '|' characters. | ||
The <code>nottitleregexp</code> lines filters out all translated pages including lingering old style translations and should not be touched. The <code>titlematch</code> lines are needed to split up the search into manageable chunks. There is a maximum of pages that can be handled by the <code>includematch</code> search; if too many pages pass through the title filters the first ones up to the maximum number will be searched; the rest will be silently ignored! Currently, the maximum seems to be somewhat more than 500. The <code>include</code> and <code>includemaxlength</code> should never be modified. | |||
<!-- | <!-- | ||
Line 146: | Line 169: | ||
<DPL> | <DPL> | ||
titlematch = %/da | titlematch = %/da | ||
namespace = | namespace = | ||
include = * | include = * | ||
includematch = /[Aa]pplikation/ | includematch = /[Aa]pplikation/ | ||
Line 158: | Line 181: | ||
<DPL> | <DPL> | ||
titlematch = %/da | titlematch = %/da | ||
namespace = | namespace = | ||
include = * | include = * | ||
includematch = /[Aa]pplikation/ | includematch = /[Aa]pplikation/ | ||
Line 167: | Line 190: | ||
--> | --> | ||
<!-- Won't work - see | <!-- Won't work - see below | ||
== Searching for pages that hasn't been marked for translation == | == Searching for pages that hasn't been marked for translation == | ||
Line 187: | Line 210: | ||
{{Input|1=<nowiki> | {{Input|1=<nowiki> | ||
<DPL> | <DPL> | ||
namespace = | namespace = | ||
nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z](...)?[)]))$ | nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z](...)?[)]))$ | ||
titleregexp = ^[A-J] | titleregexp = ^[A-J] | ||
Line 201: | Line 224: | ||
<!-- | <!-- | ||
<DPL> | <DPL> | ||
namespace = | namespace = | ||
nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z](...)?[)]))$ | nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z](...)?[)]))$ | ||
titleregexp = ^[A-J] | titleregexp = ^[A-J] | ||
Line 211: | Line 234: | ||
</DPL> | </DPL> | ||
<DPL> | <DPL> | ||
namespace = | namespace = | ||
nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z](...)?[)]))$ | nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z](...)?[)]))$ | ||
titleregexp = ^K[A-Z] | titleregexp = ^K[A-Z] | ||
Line 221: | Line 244: | ||
</DPL> | </DPL> | ||
<DPL> | <DPL> | ||
namespace = | namespace = | ||
nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z](...)?[)]))$ | |||
titleregexp = ^K[a-ce-z] | |||
include = * | |||
includenotmatch = #<languages[ ]?/># | |||
includemaxlength = 0 | |||
format = ,\n* [[%PAGE%|%TITLE%]],, | |||
resultsheader = There are %TOTALPAGES% pages beginning with Ka-Kz but not Kd\n | |||
</DPL> | |||
<DPL> | |||
namespace = | |||
nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z](...)?[)]))$ | nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z](...)?[)]))$ | ||
titleregexp = ^ | titleregexp = ^Kd | ||
include = * | include = * | ||
includenotmatch = #<languages[ ]?/># | includenotmatch = #<languages[ ]?/># | ||
includemaxlength = 0 | includemaxlength = 0 | ||
format = ,\n* [[%PAGE%|%TITLE%]],, | format = ,\n* [[%PAGE%|%TITLE%]],, | ||
resultsheader = There are %TOTALPAGES% pages beginning with Ka-Kz\n | resultsheader = There are %TOTALPAGES% pages beginning with Ka-Kz but not Kd\n | ||
</DPL> | </DPL> | ||
<DPL> | <DPL> | ||
namespace = | namespace = | ||
nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z](...)?[)]))$ | nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z](...)?[)]))$ | ||
titleregexp = ^[L-Z] | titleregexp = ^[L-Z] | ||
Line 239: | Line 272: | ||
format = ,\n* [[%PAGE%|%TITLE%]],, | format = ,\n* [[%PAGE%|%TITLE%]],, | ||
resultsheader = There are %TOTALPAGES% pages beginning with L-Z\n | resultsheader = There are %TOTALPAGES% pages beginning with L-Z\n | ||
</DPL> | |||
--> | |||
== Find all templates using a given template == | |||
{{Input|1=<nowiki> | |||
<DPL> | |||
namespace = Template | |||
include = * | |||
includematch = /{{Icon/ | |||
includemaxlength = 0 | |||
format = ,\n* [[%PAGE%|%TITLE%]],, | |||
resultsheader = There are %TOTALPAGES% templates using the Icon template\n | |||
</DPL> | |||
</nowiki>}} | |||
<!-- | |||
<DPL> | |||
namespace = Template | |||
include = * | |||
includematch = /{{Icon/ | |||
includemaxlength = 0 | |||
format = ,\n* [[%PAGE%|%TITLE%]],, | |||
resultsheader = There are %TOTALPAGES% templates using the Icon template\n | |||
</DPL> | </DPL> | ||
--> | --> | ||
Line 266: | Line 323: | ||
titlematch = %/Manual% | titlematch = %/Manual% | ||
nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z](...)?[)]))$ | nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z](...)?[)]))$ | ||
namespace = | namespace = | User | Draft | ||
resultsheader = Manual Pages: | resultsheader = Manual Pages: | ||
format = ,\n* [[%PAGE%|%TITLE%]]\n,, | format = ,\n* [[%PAGE%|%TITLE%]]\n,, | ||
Line 276: | Line 333: | ||
titlematch = %/Manual% | titlematch = %/Manual% | ||
nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z](...)?[)]))$ | nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z](...)?[)]))$ | ||
namespace = | namespace = | User | Draft | ||
resultsheader = Manual Pages: | resultsheader = Manual Pages: | ||
format = ,\n* [[%PAGE%|%TITLE%]]\n,, | format = ,\n* [[%PAGE%|%TITLE%]]\n,, | ||
Line 298: | Line 355: | ||
format = ,\n* [[%PAGE%|%TITLE%]],, | format = ,\n* [[%PAGE%|%TITLE%]],, | ||
</DPL></nowiki>}} | </DPL></nowiki>}} | ||
<!-- | |||
<DPL> | |||
titlematch = Kopete/% | |||
notnamespace = Translations | |||
columns = 3 | |||
format = ,\n* [[%PAGE%|%TITLE%]],, | |||
</DPL> | |||
--> | |||
==Akonadi Subpages in Danish== | ==Akonadi Subpages in Danish== | ||
Line 306: | Line 372: | ||
format = ,\n* [[%PAGE%|%TITLE%]],, | format = ,\n* [[%PAGE%|%TITLE%]],, | ||
</DPL></nowiki>}} | </DPL></nowiki>}} | ||
<!-- | |||
<DPL> | |||
titlematch = Akonadi%/da | |||
notnamespace = Translations | |||
format = ,\n* [[%PAGE%|%TITLE%]],, | |||
</DPL> | |||
--> | |||
==Archived pages== | ==Archived pages== | ||
Line 316: | Line 390: | ||
resultsheader = There are %TOTALPAGES% pages in the Archive namespace. These are:\n | resultsheader = There are %TOTALPAGES% pages in the Archive namespace. These are:\n | ||
</DPL></nowiki>}} | </DPL></nowiki>}} | ||
<!-- | |||
<DPL> | |||
titlematch = % | |||
namespace = Archive | |||
columns = 2 | |||
format = ,\n* [[%PAGE%|%TITLE%]],, | |||
resultsheader = There are %TOTALPAGES% pages in the Archive namespace. These are:\n | |||
</DPL> | |||
--> | |||
==NoIndexed pages== | ==NoIndexed pages== | ||
Line 323: | Line 407: | ||
columns = 2 | columns = 2 | ||
format = ,\n* [[%PAGE%|%TITLE%]],, | format = ,\n* [[%PAGE%|%TITLE%]],, | ||
resultsheader = There are %TOTALPAGES% pages in the | resultsheader = There are %TOTALPAGES% pages in the Noindexed_pages category. These are:\n | ||
</DPL></nowiki>}} | </DPL></nowiki>}} | ||
<!-- | |||
<DPL> | |||
titlematch = % | |||
category = Noindexed_pages | |||
columns = 2 | |||
format = ,\n* [[%PAGE%|%TITLE%]],, | |||
resultsheader = There are %TOTALPAGES% pages in the Noindexed_pages category. These are:\n | |||
</DPL> | |||
--> | |||
==Ignoring Deleted Pages== | ==Ignoring Deleted Pages== | ||
Line 334: | Line 428: | ||
{{Input|1=<nowiki><DPL> | {{Input|1=<nowiki><DPL> | ||
titleregexp = .*(([ _][(][a-z][a-z](...)?[)]))$ | |||
notcategory = Template | notcategory = Template | ||
notnamespace = Thread | notnamespace = Thread | ||
Line 342: | Line 436: | ||
resultsheader = There are %TOTALPAGES% pages (partly) remaining in old-style translations. These are:\n | resultsheader = There are %TOTALPAGES% pages (partly) remaining in old-style translations. These are:\n | ||
</DPL></nowiki>}} | </DPL></nowiki>}} | ||
<!-- | |||
<DPL> | |||
titleregexp = .*(([ _][(][a-z][a-z](...)?[)]))$ | |||
notcategory = Template | |||
notnamespace = Thread | |||
notnamespace = Summary | |||
columns = 2 | |||
format = ,\n* [[%PAGE%|%TITLE%]],, | |||
resultsheader = There are %TOTALPAGES% pages (partly) remaining in old-style translations. These are:\n | |||
</DPL> | |||
--> | |||
==Pages with old i18n bar== | ==Pages with old i18n bar== | ||
Line 347: | Line 453: | ||
{{Input|1=<nowiki><DPL> | {{Input|1=<nowiki><DPL> | ||
titlematch = % | titlematch = % | ||
namespace = | namespace = | ||
uses = Template:I18n/Language Navigation Bar | uses = Template:I18n/Language Navigation Bar | ||
columns = 3 | columns = 3 | ||
Line 354: | Line 460: | ||
</DPL></nowiki>}} | </DPL></nowiki>}} | ||
<!-- | |||
<DPL> | |||
titlematch = % | |||
namespace = | |||
uses = Template:I18n/Language Navigation Bar | |||
columns = 3 | |||
format = ,\n* [[%PAGE%|%TITLE%]],, | |||
resultsheader = There are %TOTALPAGES% pages that still display the old i18n language bar\n | |||
</DPL> | |||
--> | |||
==Pages with old i18n bar but w/o old-way-translated ones== | ==Pages with old i18n bar but w/o old-way-translated ones== | ||
{{Input|1=<nowiki><DPL> | {{Input|1=<nowiki><DPL> | ||
nottitlematch = %_(%) | nottitlematch = %_(%) | ||
namespace = | namespace = | ||
uses = Template:I18n/Language Navigation Bar | uses = Template:I18n/Language Navigation Bar | ||
columns = 3 | columns = 3 | ||
Line 364: | Line 480: | ||
resultsheader = There are %TOTALPAGES% relevant pages that still display the old i18n language bar\n | resultsheader = There are %TOTALPAGES% relevant pages that still display the old i18n language bar\n | ||
</DPL></nowiki>}} | </DPL></nowiki>}} | ||
<!-- | |||
<DPL> | |||
nottitlematch = %_(%) | |||
namespace = | |||
uses = Template:I18n/Language Navigation Bar | |||
columns = 3 | |||
format = ,\n* [[%PAGE%|%TITLE%]],, | |||
resultsheader = There are %TOTALPAGES% relevant pages that still display the old i18n language bar\n | |||
</DPL> | |||
--> | |||
==Pages not updated since 1st July 2010== | ==Pages not updated since 1st July 2010== | ||
{{Input|1=<nowiki><DPL> | {{Input|1=<nowiki><DPL> | ||
namespace = | namespace = | ||
lastrevisionbefore = 201007010000 | lastrevisionbefore = 201007010000 | ||
columns = 2 | columns = 2 | ||
Line 375: | Line 502: | ||
resultsheader = There are %TOTALPAGES% pages without recent updates\n | resultsheader = There are %TOTALPAGES% pages without recent updates\n | ||
</DPL></nowiki>}} | </DPL></nowiki>}} | ||
<!-- | |||
<DPL> | |||
namespace = | |||
lastrevisionbefore = 201007010000 | |||
columns = 2 | |||
ordermethod=lastedit | |||
format = ,\n* (%DATE%) [[%PAGE%|%TITLE%]],, | |||
resultsheader = There are %TOTALPAGES% pages without recent updates\n | |||
</DPL> | |||
--> | |||
== Listing Non-Translation Pages == | == Listing Non-Translation Pages == | ||
Line 380: | Line 518: | ||
nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z](...)?[)]))$ | nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z](...)?[)]))$ | ||
titlematch = Amarok% | titlematch = Amarok% | ||
namespace = | namespace = | ||
columns = 1 | columns = 1 | ||
format = ,\n* [[%PAGE%|%TITLE%]],, | format = ,\n* [[%PAGE%|%TITLE%]],, | ||
resultsheader = There are %TOTALPAGES% Amarok pages, not counting translations\n | resultsheader = There are %TOTALPAGES% Amarok pages, not counting translations\n | ||
</DPL></nowiki>}} | </DPL></nowiki>}} | ||
<!-- | |||
<DPL> | |||
nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z](...)?[)]))$ | |||
titlematch = Amarok% | |||
namespace = | |||
columns = 1 | |||
format = ,\n* [[%PAGE%|%TITLE%]],, | |||
resultsheader = There are %TOTALPAGES% Amarok pages, not counting translations\n | |||
</DPL> | |||
--> | |||
== List all pages in a specific namespace == | == List all pages in a specific namespace == | ||
Line 395: | Line 544: | ||
resultsheader = These %TOTALPAGES% pages are in the Mediawiki namespace\n | resultsheader = These %TOTALPAGES% pages are in the Mediawiki namespace\n | ||
</DPL></nowiki>}} | </DPL></nowiki>}} | ||
<!-- | |||
<DPL> | |||
nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z](...)?[)]))$ | |||
namespace = MediaWiki | |||
columns = 3 | |||
format = ,\n* [[%PAGE%|%TITLE%]],, | |||
resultsheader = These %TOTALPAGES% pages are in the Mediawiki namespace\n | |||
</DPL> | |||
--> | |||
==To count translated pages in a specific language:== | ==To count translated pages in a specific language:== | ||
{{Input|1=<nowiki><DPL> | {{Input|1=<nowiki><DPL> | ||
titleregexp = ^[A-J].*/en | |||
notnamespace = Translations | notnamespace = Translations | ||
columns = 3 | columns = 3 | ||
format = ,\n* [[%PAGE%|%TITLE%]],, | format = ,\n* [[%PAGE%|%TITLE%]],, | ||
resultsheader = There are %TOTALPAGES% pages (partly) translated to English. These are:\n | resultsheader = There are %TOTALPAGES% pages (partly) translated to English. These are:\n | ||
</DPL></nowiki>}} | </DPL> | ||
... | |||
</nowiki>}} | |||
<!-- | <!-- | ||
<DPL> | <DPL> | ||
titleregexp = ^[A-J].*/en | |||
notnamespace = Translations | notnamespace = Translations | ||
columns = 3 | columns = 3 | ||
format = ,\n* [[%PAGE%|%TITLE%]],, | format = ,\n* [[%PAGE%|%TITLE%]],, | ||
resultsheader = There are %TOTALPAGES% pages (partly) translated to English. These are:\n | resultsheader = There are %TOTALPAGES% pages beginning with A-J (partly) translated to English. These are:\n | ||
</DPL> | |||
<DPL> | |||
titleregexp = ^K[A-Z].*/en | |||
notnamespace = Translations | |||
columns = 3 | |||
format = ,\n* [[%PAGE%|%TITLE%]],, | |||
resultsheader = There are %TOTALPAGES% pages beginning with KA-KZ (partly) translated to English. These are:\n | |||
</DPL> | |||
<DPL> | |||
titleregexp = ^K[a-z].*/en | |||
notnamespace = Translations | |||
columns = 3 | |||
format = ,\n* [[%PAGE%|%TITLE%]],, | |||
resultsheader = There are %TOTALPAGES% pages beginning with Ka-Kz (partly) translated to English. These are:\n | |||
</DPL> | |||
<DPL> | |||
titleregexp = ^[L-Z].*/en | |||
notnamespace = Translations | |||
columns = 3 | |||
format = ,\n* [[%PAGE%|%TITLE%]],, | |||
resultsheader = There are %TOTALPAGES% pages beginning with L-Z (partly) translated to English. These are:\n | |||
</DPL> | </DPL> | ||
--> | --> |
Latest revision as of 07:55, 3 November 2018
- Reference: DPL Manual
- See also Pipesmoker's notes and this page of examples
- Example UI on this Template:Catlist page
- Search on this page
All the examples on this page have been commented out to prevent the page from being very slow to load. If you want to see the outcome of a search example, just edit the page and remove the comment tags around the desired example. You don't need to save the page, a preview will give you the search results; that way you can experiment with the examples and easily restore the page to its original state when you are done.
Searching for pages containing a certain text string
Text without wiki markup
Enter {{Search|text}}
anywhere to get the search results in the form of links. Here text can be plain text or a perl like regexp. Be careful to escape regexp meta characters. If the searched text contain wiki markup this template may nor give the desired results; see the next section.
The Search template searches only the main namespace, and only original English pages.
Example: To find all English pages containing the word 'application' - possibly capitalized enter this:
{{Search|[Aa]pplication}}
Translated text
Enter {{SearchLang|text|lang}}
anywhere to get the search results in the form of links. Here text can be plain text or a perl like regexp and lang is a language code. Be careful to escape regexp meta characters. If the searched text contain wiki markup this template may nor give the desired results; see the next section.
Example: To find all Danish pages containing the word 'program' - possibly capitalized enter this:
{{SearchLang|[Pp]rogram|da}}
Pages linking to a given page
Use {{LinksTo|full page name}}
. The full page name must be the entire wiki link up to (but not including) one of the characters '|', ']' or '#' and excluding Special:myLanguage. Note, that space characters in names are sometimes entered as '_', so in searches you should enter [ _]
for spaces.
Example: To find all pages linking to Getting Help enter
{{LinksTo|Getting[ _]Help}}
Text containing wiki markup
In case the Search template does not work for you use code like this to accomplish your desired result:
<DPL> namespace = nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z](...)?[)]))$ titleregexp = ^[A-J] include = * includematch = @\{\{Remember\|@ includemaxlength = 0 format = ,\n* [[%PAGE%|%TITLE%]],, resultsheader = There are %TOTALPAGES% pages beginning with A-J\n </DPL> <DPL> namespace = nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z](...)?[)]))$ titleregexp = ^K[A-Z] include = * includematch = @\{\{Remember\|@ includemaxlength = 0 format = ,\n* [[%PAGE%|%TITLE%]],, resultsheader = There are %TOTALPAGES% pages beginning with KA-KZ\n </DPL> <DPL> namespace = nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z](...)?[)]))$ titleregexp = ^K[a-ce-z] include = * includematch = @\{\{Remember\|@ includemaxlength = 0 format = ,\n* [[%PAGE%|%TITLE%]],, resultsheader = There are %TOTALPAGES% pages beginning with Ka-Kz but not Kd\n </DPL> <DPL> namespace = nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z](...)?[)]))$ titleregexp = ^Kd include = * includematch = @\{\{Remember\|@ includemaxlength = 0 format = ,\n* [[%PAGE%|%TITLE%]],, resultsheader = There are %TOTALPAGES% pages beginning with Kd\n </DPL> <DPL> namespace = nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z](...)?[)]))$ titleregexp = ^[L-Z] include = * includematch = @\{\{Remember\|@ includemaxlength = 0 format = ,\n* [[%PAGE%|%TITLE%]],, resultsheader = There are %TOTALPAGES% pages beginning with L-Z\n </DPL>
Normally, you'd want to copy all of this into your page and modify the includematch
lines to the pattern you want to search for. Note the two @
-characters; they mark the beginning and end of the actual search pattern. You can use any character instead of @
as long as it does not appear in the actual pattern.
If you want to search other namespaces than Main, just change that line. If you want to search the Main namespace and one or more other namespaces use namespace = | Other
. The enpty string before the '|' means Main — never write Main
; that no longer works. Other
can be one or more other namespaces separated by '|' characters.
The nottitleregexp
lines filters out all translated pages including lingering old style translations and should not be touched. The titlematch
lines are needed to split up the search into manageable chunks. There is a maximum of pages that can be handled by the includematch
search; if too many pages pass through the title filters the first ones up to the maximum number will be searched; the rest will be silently ignored! Currently, the maximum seems to be somewhat more than 500. The include
and includemaxlength
should never be modified.
Finding all pages not yet marked for translation
<DPL> namespace = nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z](...)?[)]))$ titleregexp = ^[A-J] include = * includenotmatch = #<languages[ ]?/># includemaxlength = 0 format = ,\n* [[%PAGE%|%TITLE%]],, resultsheader = There are %TOTALPAGES% pages beginning with A-J\n </DPL> ...
Find all templates using a given template
<DPL> namespace = Template include = * includematch = /{{Icon/ includemaxlength = 0 format = ,\n* [[%PAGE%|%TITLE%]],, resultsheader = There are %TOTALPAGES% templates using the Icon template\n </DPL>
Find discussion threads contributed by a user
Perhaps more talk namespaces needs to be searched.
<DPL> namespace = Talk | Thread createdby = AmirHP </DPL>
All English manual pages
<DPL> titlematch = %/Manual% nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z](...)?[)]))$ namespace = | User | Draft resultsheader = Manual Pages: format = ,\n* [[%PAGE%|%TITLE%]]\n,, </DPL>
All English pages linking to a given page
{{LinksTo|Plasma/Panels}}
Kopete Subpages in 3 columns
<DPL> titlematch = Kopete/% notnamespace = Translations columns = 3 format = ,\n* [[%PAGE%|%TITLE%]],, </DPL>
Akonadi Subpages in Danish
<DPL> titlematch = Akonadi%/da notnamespace = Translations format = ,\n* [[%PAGE%|%TITLE%]],, </DPL>
Archived pages
<DPL> titlematch = % namespace = Archive columns = 2 format = ,\n* [[%PAGE%|%TITLE%]],, resultsheader = There are %TOTALPAGES% pages in the Archive namespace. These are:\n </DPL>
NoIndexed pages
<DPL> titlematch = % category = Noindexed_pages columns = 2 format = ,\n* [[%PAGE%|%TITLE%]],, resultsheader = There are %TOTALPAGES% pages in the Noindexed_pages category. These are:\n </DPL>
Ignoring Deleted Pages
"As for DPL. If you hit a page with ?action=purge attached to the URL (i.e. http://en.wikinews.org/wiki/Template:Latest_news?action=purge ), it will dump all the removed pages."
Remaining old-style translations
<DPL> titleregexp = .*(([ _][(][a-z][a-z](...)?[)]))$ notcategory = Template notnamespace = Thread notnamespace = Summary columns = 2 format = ,\n* [[%PAGE%|%TITLE%]],, resultsheader = There are %TOTALPAGES% pages (partly) remaining in old-style translations. These are:\n </DPL>
Pages with old i18n bar
<DPL> titlematch = % namespace = uses = Template:I18n/Language Navigation Bar columns = 3 format = ,\n* [[%PAGE%|%TITLE%]],, resultsheader = There are %TOTALPAGES% pages that still display the old i18n language bar\n </DPL>
Pages with old i18n bar but w/o old-way-translated ones
<DPL> nottitlematch = %_(%) namespace = uses = Template:I18n/Language Navigation Bar columns = 3 format = ,\n* [[%PAGE%|%TITLE%]],, resultsheader = There are %TOTALPAGES% relevant pages that still display the old i18n language bar\n </DPL>
Pages not updated since 1st July 2010
<DPL> namespace = lastrevisionbefore = 201007010000 columns = 2 ordermethod=lastedit format = ,\n* (%DATE%) [[%PAGE%|%TITLE%]],, resultsheader = There are %TOTALPAGES% pages without recent updates\n </DPL>
Listing Non-Translation Pages
<DPL> nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z](...)?[)]))$ titlematch = Amarok% namespace = columns = 1 format = ,\n* [[%PAGE%|%TITLE%]],, resultsheader = There are %TOTALPAGES% Amarok pages, not counting translations\n </DPL>
List all pages in a specific namespace
<DPL> nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z](...)?[)]))$ namespace = MediaWiki columns = 3 format = ,\n* [[%PAGE%|%TITLE%]],, resultsheader = These %TOTALPAGES% pages are in the Mediawiki namespace\n </DPL>
To count translated pages in a specific language:
<DPL> titleregexp = ^[A-J].*/en notnamespace = Translations columns = 3 format = ,\n* [[%PAGE%|%TITLE%]],, resultsheader = There are %TOTALPAGES% pages (partly) translated to English. These are:\n </DPL> ...