Difference between revisions of "Example 3"

From FollowTheScore
Jump to: navigation, search
 
(18 intermediate revisions by 5 users not shown)
Line 5: Line 5:
 
</nowiki></pre>
 
</nowiki></pre>
 
{{#dpl:categoriesminmax=3,6|category=African Union member states|addpagesize=true}}
 
{{#dpl:categoriesminmax=3,6|category=African Union member states|addpagesize=true}}
 +
 +
 +
== Show date and user of latest edit for country articles ==
 +
<pre><nowiki>
 +
<DPL>
 +
  category = Fictitious country
 +
  ordermethod = lastedit
 +
  order = ascending
 +
  resultsheader = ====latest edits:====\n
 +
  shownamespace = false
 +
  addeditdate = true
 +
  adduser = true
 +
  mode = ordered
 +
</DPL>
 +
</nowiki></pre>
 +
<DPL>
 +
  category = Fictitious country
 +
  ordermethod = lastedit
 +
  order = ascending
 +
  resultsheader = ====latest edits:====\n
 +
  shownamespace = false
 +
  addeditdate = true
 +
  adduser = true
 +
  mode = ordered
 +
</DPL>
  
 
== Find uncategorized articles ==
 
== Find uncategorized articles ==
Note: the following statement works if you created a special SQL view in the wiki database.
+
Note: the following statement works only if you created a special SQL view in the wiki database.
 
You need admin rights (including "CREATE VIEW permissions") for this. This demo site runs on a server where the author does not have such rights. So you will see an error message ...
 
You need admin rights (including "CREATE VIEW permissions") for this. This demo site runs on a server where the author does not have such rights. So you will see an error message ...
 
<pre><nowiki>
 
<pre><nowiki>
Line 23: Line 48:
 
<pre><nowiki>
 
<pre><nowiki>
 
<DPL>
 
<DPL>
   namespace=Image
+
   namespace=File
 
   mode=userformat
 
   mode=userformat
 
   listseparators=<gallery>,%PAGE%\n,,</gallery>
 
   listseparators=<gallery>,%PAGE%\n,,</gallery>
Line 30: Line 55:
  
 
<DPL>
 
<DPL>
   namespace=Image
+
   namespace=File
 
   mode=userformat
 
   mode=userformat
 
   listseparators=<gallery>,%PAGE%\n,,</gallery>
 
   listseparators=<gallery>,%PAGE%\n,,</gallery>
 
</DPL>
 
</DPL>
 +
 +
===Image gallery with alternative syntax===
 +
This allows passing of parameters et.c.
 +
<pre><nowiki>
 +
{{#dpl:
 +
  |namespace=File
 +
  |format=«gallery»,%PAGE%¦%NR%. %TITLE%\n,,«/gallery»
 +
}}
 +
</nowiki></pre>
 +
{{#dpl:
 +
  |namespace=File
 +
  |format=«gallery»,%PAGE%¦%NR%. %TITLE%\n,,«/gallery»
 +
}}
  
 
== Show number of articles instead of name list ==
 
== Show number of articles instead of name list ==
Line 42: Line 80:
 
{{#dpl:category=African Union member states|resultsheader=There are %PAGES% articles on OAU member states.|mode=userformat}}
 
{{#dpl:category=African Union member states|resultsheader=There are %PAGES% articles on OAU member states.|mode=userformat}}
  
 +
<!--
  
 
== Multi column output and article numbers ==
 
== Multi column output and article numbers ==
Line 53: Line 92:
 
   ordermethod=size
 
   ordermethod=size
 
   mode=userformat
 
   mode=userformat
   listseparators={|class=sortablewikitable id=2\n!Rank\n!Article\n!Bytes\n|-,\n|%NR%.\n|[[%PAGE%]]\n|align=right|%SIZE%,\n|-,\n|}
+
   listseparators={|class=sortable\n!Rank\n!Article\n!Bytes\n|-,\n|%NR%.\n|[[%PAGE%]]\n|align=right|%SIZE%,\n|-,\n|}
 
   count=10
 
   count=10
 
   columns=3
 
   columns=3
Line 64: Line 103:
 
   ordermethod=size
 
   ordermethod=size
 
   mode=userformat
 
   mode=userformat
   listseparators={|class=sortablewikitable id=2\n!Rank\n!Article\n!Bytes\n|-,\n|%NR%.\n|[[%PAGE%]]\n|align=right|%SIZE%,\n|-,\n|}
+
   listseparators={|class=sortable\n!Rank\n!Article\n!Bytes\n|-,\n|%NR%.\n|[[%PAGE%]]\n|align=right|%SIZE%,\n|-,\n|}
 
   count=10
 
   count=10
 
   columns=3
 
   columns=3
 
</dpl>
 
</dpl>
 
  
 
== Multi row output and article numbers ==
 
== Multi row output and article numbers ==
Line 80: Line 118:
 
   ordermethod=size
 
   ordermethod=size
 
   mode=userformat
 
   mode=userformat
   listseparators={|class=sortablewikitable id=2\n!Rank\n!width=200|Article\n!Bytes\n|-,\n|%NR%.\n|[[%PAGE%]]\n|align=right|%SIZE%,\n|-,\n|}
+
   listseparators={|class=sortable\n!Rank\n!width=200|Article\n!Bytes\n|-,\n|%NR%.\n|[[%PAGE%]]\n|align=right|%SIZE%,\n|-,\n|}
 
   count=10
 
   count=10
 
   rows=3
 
   rows=3
Line 91: Line 129:
 
   ordermethod=size
 
   ordermethod=size
 
   mode=userformat
 
   mode=userformat
   listseparators={|class=sortablewikitable id=2\n!Rank\n!width=200|Article\n!Bytes\n|-,\n|%NR%.\n|[[%PAGE%]]\n|align=right|%SIZE%,\n|-,\n|}
+
   listseparators={|class=sortable\n!Rank\n!width=200|Article\n!Bytes\n|-,\n|%NR%.\n|[[%PAGE%]]\n|align=right|%SIZE%,\n|-,\n|}
 
   count=10
 
   count=10
 
   rows=3
 
   rows=3
Line 107: Line 145:
 
   ordermethod=size
 
   ordermethod=size
 
   mode=userformat
 
   mode=userformat
   listseparators={|class=sortablewikitable id=2\n!Rank\n!width=200|Article\n!Bytes\n|-,\n|%NR%.\n|[[%PAGE%]]\n|align=right|%SIZE%,\n|-,\n|}
+
   listseparators={|class=sortable\n!Rank\n!width=200|Article\n!Bytes\n|-,\n|%NR%.\n|[[%PAGE%]]\n|align=right|%SIZE%,\n|-,\n|}
 
   count=10
 
   count=10
 
   rowsize=5
 
   rowsize=5
Line 118: Line 156:
 
   ordermethod=size
 
   ordermethod=size
 
   mode=userformat
 
   mode=userformat
   listseparators={|class=sortablewikitable id=2\n!Rank\n!width=200|Article\n!Bytes\n|-,\n|%NR%.\n|[[%PAGE%]]\n|align=right|%SIZE%,\n|-,\n|}
+
   listseparators={|class=sortable\n!Rank\n!width=200|Article\n!Bytes\n|-,\n|%NR%.\n|[[%PAGE%]]\n|align=right|%SIZE%,\n|-,\n|}
 
   count=10
 
   count=10
 
   rowsize=5
 
   rowsize=5
Line 128: Line 166:
  
 
<pre><nowiki>
 
<pre><nowiki>
{{Sortable Tables}}
 
 
<dpl>
 
<dpl>
 
   namespace=
 
   namespace=
Line 135: Line 172:
 
   mode=userformat
 
   mode=userformat
 
   randomcount=6
 
   randomcount=6
   listseparators={|class=sortablewikitable id=1\n!Article\n!Bytes\n|-,\n|<font size="%SIZEFS%">[[%PAGE%]]</font>\n|align=right|%SIZE%,\n|-,\n|}
+
   listseparators={|class=sortable\n!Article\n!Bytes\n|-,\n|<font size="%SIZEFS%">[[%PAGE%]]</font>\n|align=right|%SIZE%,\n|-,\n|}
 
</dpl>
 
</dpl>
 
</nowiki></pre>
 
</nowiki></pre>
  
{{Sortable Tables}}
 
 
<dpl>
 
<dpl>
 
   namespace=
 
   namespace=
Line 146: Line 182:
 
   mode=userformat
 
   mode=userformat
 
   randomcount=6
 
   randomcount=6
   listseparators={|class=sortablewikitable id=1\n!Article\n!Bytes\n|-,\n|<font size="%SIZEFS%">[[%PAGE%]]</font>\n|align=right|%SIZE%,\n|-,\n|}
+
   listseparators={|class=sortable\n!Article\n!Bytes\n|-,\n|<font size="%SIZEFS%">[[%PAGE%]]</font>\n|align=right|%SIZE%,\n|-,\n|}
 
</dpl>
 
</dpl>
  
Line 154: Line 190:
  
 
<pre><nowiki>
 
<pre><nowiki>
{{#dpl:namespace=
+
{{#dpl:namespace=Template
 
   |addpagecounter=true
 
   |addpagecounter=true
 
   |mode=userformat
 
   |mode=userformat
   |listseparators=,<font size="%COUNTFS%">[[%PAGE%]]</font>,
+
   |listseparators=,<font size="%COUNTFS%">[[%PAGE%|%TITLE%]]</font>,
 
   |inlinetext= &nbsp;&bull;&nbsp;  
 
   |inlinetext= &nbsp;&bull;&nbsp;  
 
}}
 
}}
 
</nowiki></pre>
 
</nowiki></pre>
  
<u>based on %COUNTFS%:</u>
+
<u>Templates based on %COUNTFS%:</u>
  
{{#dpl:namespace=
+
{{#dpl:namespace=Template
 
   |addpagecounter=true
 
   |addpagecounter=true
 
   |mode=userformat
 
   |mode=userformat
   |listseparators=,<font size="%COUNTFS%">[[%PAGE%]]</font>,
+
   |listseparators=,<font size="%COUNTFS%">[[%PAGE%|%TITLE%]]</font>,
 
   |inlinetext= &nbsp;&bull;&nbsp;  
 
   |inlinetext= &nbsp;&bull;&nbsp;  
 
}}
 
}}
  
<u>based on %COUNTFS2%:</u>
+
<u>Articles based on %COUNTFS2%:</u>
  
 
{{#dpl:namespace=
 
{{#dpl:namespace=
Line 185: Line 221:
 
<dpl>
 
<dpl>
 
   namespace=
 
   namespace=
 +
  titlematch=B%
 
   addpagesize=true
 
   addpagesize=true
 
   ordermethod=size
 
   ordermethod=size
Line 195: Line 232:
 
<dpl>
 
<dpl>
 
   namespace=
 
   namespace=
 +
  titlematch=B%
 
   addpagesize=true
 
   addpagesize=true
 
   ordermethod=size
 
   ordermethod=size
Line 201: Line 239:
 
   columns=4
 
   columns=4
 
</dpl>
 
</dpl>
 +
 +
<dpl>reset=all</dpl>
 +
 +
-->

Latest revision as of 08:17, 8 February 2011

Find Articles which have at least / at most [n] categories

Members of the OAU with at least 3 categories, at most 6:

{{#dpl:categoriesminmax=3,6|category=African Union member states|addpagesize=true}}


Show date and user of latest edit for country articles

<DPL>
  category = Fictitious country
  ordermethod = lastedit
  order = ascending
  resultsheader = ====latest edits:====\n
  shownamespace = false
  addeditdate = true
  adduser = true
  mode = ordered
</DPL>

latest edits:

  1. 2009-04-14 15:02:23 DPL Example 007 main page 1 . . Bwyseur
  2. 2009-04-14 15:32:28 Nigunda . . Kw123
  3. 2010-01-19 14:41:07 Somango . . Gero
  4. 2010-01-19 14:49:26 Nigunda Test . . Gero

Find uncategorized articles

Note: the following statement works only if you created a special SQL view in the wiki database. You need admin rights (including "CREATE VIEW permissions") for this. This demo site runs on a server where the author does not have such rights. So you will see an error message ...

<dpl>
  category=
</dpl>

Extension:DynamicPageList (DPL), version 3.2.1: Warning: Skipping bad option for parameter 'category'.


Extension:DynamicPageList (DPL), version 3.2.1: Error: No selection criteria found! You must use at least one of the following parameters: category, namespace, titlematch, linksto, uses, createdby, modifiedby, lastmodifiedby, or their 'not' variants


Extension:DynamicPageList (DPL), version 3.2.1: Warning: No results.

Produce an image gallery

<DPL>
  namespace=File
  mode=userformat
  listseparators=<gallery>,%PAGE%\n,,</gallery>
</DPL>

Image gallery with alternative syntax

This allows passing of parameters et.c.

{{#dpl:
   |namespace=File
   |format=«gallery»,%PAGE%¦%NR%. %TITLE%\n,,«/gallery»
}}

Show number of articles instead of name list

{{#dpl:category=African Union member states|resultsheader=There are %PAGES% articles on OAU member states.|mode=userformat}}

There are 4 articles on OAU member states.