Difference between revisions of "Example 3"

From FollowTheScore
Jump to: navigation, search
(Find uncategorized articles)
 
(20 intermediate revisions by 6 users not shown)
Line 1: Line 1:
 
== Find Articles which have at least / at most [n] categories ==
 
== Find Articles which have at least / at most [n] categories ==
 
Members of the OAU with at least 3 categories, at most 6:
 
Members of the OAU with at least 3 categories, at most 6:
 +
<pre><nowiki>
 +
{{#dpl:categoriesminmax=3,6|category=African Union member states|addpagesize=true}}
 +
</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 create 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 18: Line 46:
 
== Produce an image gallery ==
 
== Produce an image gallery ==
  
 +
<pre><nowiki>
 
<DPL>
 
<DPL>
   namespace=Image
+
   namespace=File
 
   mode=userformat
 
   mode=userformat
 
   listseparators=<gallery>,%PAGE%\n,,</gallery>
 
   listseparators=<gallery>,%PAGE%\n,,</gallery>
 
</DPL>
 
</DPL>
 +
</nowiki></pre>
 +
 +
<DPL>
 +
  namespace=File
 +
  mode=userformat
 +
  listseparators=<gallery>,%PAGE%\n,,</gallery>
 +
</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 ==
 +
<pre><nowiki>
 +
{{#dpl:category=African Union member states|resultsheader=There are %PAGES% articles on OAU member states.|mode=userformat}}
 +
</nowiki></pre>
 +
 
{{#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 32: Line 86:
 
ordering articles by size
 
ordering articles by size
  
 +
<pre><nowiki>
 
<dpl>
 
<dpl>
 
   namespace=
 
   namespace=
Line 37: 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
 
</dpl>
 
</dpl>
 +
</nowiki></pre>
  
 +
<dpl>
 +
  namespace=
 +
  addpagesize=true
 +
  ordermethod=size
 +
  mode=userformat
 +
  listseparators={|class=sortable\n!Rank\n!Article\n!Bytes\n|-,\n|%NR%.\n|[[%PAGE%]]\n|align=right|%SIZE%,\n|-,\n|}
 +
  count=10
 +
  columns=3
 +
</dpl>
  
 
== Multi row output and article numbers ==
 
== Multi row output and article numbers ==
  
 
ordering articles by size, the table heading will be repeated 3 times   
 
ordering articles by size, the table heading will be repeated 3 times   
 +
 +
<pre><nowiki>
 +
<dpl>
 +
  namespace=
 +
  addpagesize=true
 +
  ordermethod=size
 +
  mode=userformat
 +
  listseparators={|class=sortable\n!Rank\n!width=200|Article\n!Bytes\n|-,\n|%NR%.\n|[[%PAGE%]]\n|align=right|%SIZE%,\n|-,\n|}
 +
  count=10
 +
  rows=3
 +
</dpl>
 +
</nowiki></pre>
  
 
<dpl>
 
<dpl>
Line 52: 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 62: Line 139:
 
ordering articles by size, the table heading will be repeated after every group of 5 lines   
 
ordering articles by size, the table heading will be repeated after every group of 5 lines   
  
 +
<pre><nowiki>
 
<dpl>
 
<dpl>
 
   namespace=
 
   namespace=
Line 67: 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
 +
  rowsize=5
 +
</dpl>
 +
</nowiki></pre>
 +
 
 +
<dpl>
 +
  namespace=
 +
  addpagesize=true
 +
  ordermethod=size
 +
  mode=userformat
 +
  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 75: Line 164:
 
This example shows how the size of an article can be used to display its name in a corresponding size;  
 
This example shows how the size of an article can be used to display its name in a corresponding size;  
 
we select 6 articles by '''random''':
 
we select 6 articles by '''random''':
{{Sortable Tables}}
+
 
 +
<pre><nowiki>
 +
<dpl>
 +
  namespace=
 +
  addpagesize=true
 +
  ordermethod=size
 +
  mode=userformat
 +
  randomcount=6
 +
  listseparators={|class=sortable\n!Article\n!Bytes\n|-,\n|<font size="%SIZEFS%">[[%PAGE%]]</font>\n|align=right|%SIZE%,\n|-,\n|}
 +
</dpl>
 +
</nowiki></pre>
 +
 
 
<dpl>
 
<dpl>
 
   namespace=
 
   namespace=
Line 82: 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 89: Line 189:
 
Two different scalings (%COUNTFS% and %COUNTFS2%) are available.
 
Two different scalings (%COUNTFS% and %COUNTFS2%) are available.
  
<u>based on %COUNTFS%:</u>
+
<pre><nowiki>
 +
{{#dpl:namespace=Template
 +
  |addpagecounter=true
 +
  |mode=userformat
 +
  |listseparators=,<font size="%COUNTFS%">[[%PAGE%|%TITLE%]]</font>,
 +
  |inlinetext= &nbsp;&bull;&nbsp;
 +
}}
 +
</nowiki></pre>
 +
 
 +
<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 108: Line 217:
  
 
== simple multi column output ==
 
== simple multi column output ==
 +
 +
<pre><nowiki>
 
<dpl>
 
<dpl>
 
   namespace=
 
   namespace=
 +
  titlematch=B%
 
   addpagesize=true
 
   addpagesize=true
 
   ordermethod=size
 
   ordermethod=size
Line 116: Line 228:
 
   columns=4
 
   columns=4
 
</dpl>
 
</dpl>
 +
</nowiki></pre>
 +
 +
<dpl>
 +
  namespace=
 +
  titlematch=B%
 +
  addpagesize=true
 +
  ordermethod=size
 +
  mode=userformat
 +
  listseparators=,[[%PAGE%]] &nbsp; &nbsp; <br>,,
 +
  columns=4
 +
</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.