Line 15: Line 15:
 
Example: To find all English pages containing the word application - possibly capitalized enter this:
 
Example: To find all English pages containing the word application - possibly capitalized enter this:
 
{{Input|1=<nowiki>{{Search|[Aa]pplication}}</nowiki>}}
 
{{Input|1=<nowiki>{{Search|[Aa]pplication}}</nowiki>}}
 +
<!--
 
{{Search|[Aa]pplication}}
 
{{Search|[Aa]pplication}}
 +
-->
  
 
{{Info|1=The results should just be a link to each page containing the searched text. For some reason, however, some pages include the text at the beginning of the page, typically an info box, an image or tabular material. This can be avoided by ensuring that the pages searched start by <code><nowiki><languages /></nowiki></code>. If the page doesn't have translate tags this directive have no effect, but it prevents the unwanted inclusion of content from the page in the search result.}}
 
{{Info|1=The results should just be a link to each page containing the searched text. For some reason, however, some pages include the text at the beginning of the page, typically an info box, an image or tabular material. This can be avoided by ensuring that the pages searched start by <code><nowiki><languages /></nowiki></code>. If the page doesn't have translate tags this directive have no effect, but it prevents the unwanted inclusion of content from the page in the search result.}}
Line 22: Line 24:
  
 
In case the Search  template does not work for you use code like this to accomplish your desired result:
 
In case the Search  template does not work for you use code like this to accomplish your desired result:
 +
 +
{{Input|1=<nowiki>
 +
<DPL>
 +
  namespace = Main
 +
  nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z][)]))$
 +
  titlematch = A%|B%|C%|D%|E%|F%|G%|H%|I%|J%
 +
  include = *
 +
  includematch = @\{\{Remember\|[email protected]
 +
  includemaxlength = 0
 +
  format = ,\n* [[%PAGE%|%TITLE%]],,
 +
</DPL>
 +
<DPL>
 +
  namespace = Main
 +
  nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z][)]))$
 +
  titlematch = K%
 +
  include = *
 +
  includematch = @\{\{Remember\|[email protected]
 +
  includemaxlength = 0
 +
  format = ,\n* [[%PAGE%|%TITLE%]],,
 +
</DPL>
 +
<DPL>
 +
  namespace = Main
 +
  nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z][)]))$
 +
  titlematch = L%|M%|N%|O%|P%|Q%|R%|S%|T%|U%|V%|W%|X%|Y%|Z%
 +
  include = *
 +
  includematch = @\{\{Remember\|[email protected]
 +
  includemaxlength = 0
 +
  format = ,\n* [[%PAGE%|%TITLE%]],,
 +
</DPL></nowiki>}}
  
 
<DPL>
 
<DPL>

Revision as of 08:18, 22 August 2012

Reference: DPL Manual
See also Pipesmoker's notes and this page of examples
Example UI on this Template:Catlist 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}}
Dialog-information.png
Information
The results should just be a link to each page containing the searched text. For some reason, however, some pages include the text at the beginning of the page, typically an info box, an image or tabular material. This can be avoided by ensuring that the pages searched start by <languages />. If the page doesn't have translate tags this directive have no effect, but it prevents the unwanted inclusion of content from the page in the search result.


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 = Main
  nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z][)]))$
  titlematch = A%|B%|C%|D%|E%|F%|G%|H%|I%|J%
  include = *
  includematch = @\{\{Remember\|[email protected]
  includemaxlength = 0
  format = ,\n* [[%PAGE%|%TITLE%]],,
</DPL>
<DPL>
  namespace = Main
  nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z][)]))$
  titlematch = K%
  include = *
  includematch = @\{\{Remember\|[email protected]
  includemaxlength = 0
  format = ,\n* [[%PAGE%|%TITLE%]],,
</DPL>
<DPL>
  namespace = Main
  nottitleregexp = .*((/[a-z][a-z](.|-..)?)|([ _][(][a-z][a-z][)]))$
  titlematch = L%|M%|N%|O%|P%|Q%|R%|S%|T%|U%|V%|W%|X%|Y%|Z%
  include = *
  includematch = @\{\{Remember\|[email protected]
  includemaxlength = 0
  format = ,\n* [[%PAGE%|%TITLE%]],,
</DPL>

Extension:DynamicPageList (DPL), version 2.3.0 : ⧼dpl_log_1⧽

Extension:DynamicPageList (DPL), version 2.3.0 : ⧼dpl_log_1⧽

Extension:DynamicPageList (DPL), version 2.3.0 : ⧼dpl_log_1⧽


Warning.png
Warning
There is something very, very wrong with this query!


Searching for pages that hasn't been marked for translation

<DPL>
  nottitlematch = %/__|%/zh-%|%pt-%|%(%)
  namespace = Main
  include = *
  includenotmatch = /<languages/
  includemaxlength = 0
  resultsheader = Danish translation units containing the string "applikation"
  format = ,\n* [[%PAGE%|%TITLE%]]\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%
  nottitlematch = %/__|%/__-__|%/___|% (%
  namespace = | User | Draft
  resultsheader = Manual Pages:
  format = ,\n* [[%PAGE%|%TITLE%]]\n,,
</DPL>


All English pages linking to a given page

The LinksTo template is describes and tested here: User:Claus_chr/DPL/Test

Warning.png
Warning
This query seems to be affected by the same problem as the plain text query (above).


There are 264 pages beginning with A-J

There are 325 pages beginning with KA-KZ

There are 288 pages beginning with Ka-Kc or Ke-Kz

There are 309 pages beginning with Kd

There are 411 pages beginning with L-Z


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 Archive namespace. 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>
  titlematch = %_(%)
  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 = Main
  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 = Main
  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 = Main
  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>
  nottitlematch = %/__|%/zh-%|%(%)
  titlematch = Amarok%
  namespace = Main
  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>
  nottitlematch = %/__|%/zh-%|%pt-%|%(%)
  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>
  titlematch = %/en
  notnamespace = Translations
  columns = 3
  format = ,\n* [[%PAGE%|%TITLE%]],,
  resultsheader = There are %TOTALPAGES% pages (partly) translated to English. These are:\n
</DPL>



Content is available under Creative Commons License SA 4.0 unless otherwise noted.