Progetto:Social: differenze tra le versioni

Vai alla navigazione Vai alla ricerca
Contenuto aggiunto Contenuto cancellato
Nessun oggetto della modifica
mNessun oggetto della modifica
 
(79 versioni intermedie di 5 utenti non mostrate)
Riga 1: Riga 1:
__NOTOC__
{{Type Manual|section=Controlling output format}}
__NOEDITSECTION__
{| style="width:100%; color:#222222; background-color:#F7F9FD; padding:3px; border:2px solid #7FA2FC; border-radius:5px;"
|colspan="2" style="text-align:center; background-color:#E4E9FF; color:#222222; border:1px solid #7FA2FC; margin:2px"|
=== Uno spettro si aggira per l'internet! ===
|-
| style="width:65%; border:1px solid #7FA2FC; padding:10px; margin:2px;"|
[[File:Icona stella rossa Facebook.png|125px|left]]
Questo è lo spazio ufficiale che Nonciclopedia dedica alla più grande invenzione dell'uomo nella categoria "perdite di tempo": i '''social network!''' (trad: "reticolati socialisti").


Un numero imprecisato di proletari si occupa di postare '''il meglio dei contenuti''' per invogliare ''laggente'' a lasciar perdere per un attimo i #gattini per venire a sgobbare qui; o almeno affinché il mondo non dimentichi che siamo ancora vivi. Quindi niente catene di Sant'Antonio, principi Nigeriani che regalano soldi, meme che su 4chan erano vecchi 5 anni fa e mipiacemipiacemipiacemipiacemipiacemipia': solo '''contenuti''' che invitino a '''<u>venire</u> sul sito'''. In generale, questo vuol dire contenuti ''di qualità'' (ovvero da [[N:LAT|Latrina]]) e/o ''di attualità'', che 'sti social hanno una memoria da pesce rosso.<br />
You can select one of several default formats or define your own format (<tt>[[#mode|mode=userformat]]</tt>); output can be grouped in columns or rows.
E il porno. Il porno funziona sempre.


I dati sull'acchiappamento di gonzi puoi visualizzarli in [[Progetto:Statistiche]] (vedi anche [[Discussioni progetto:Statistiche|la PD]] per avere più dettagli).
== General approach to output formatting ==
<!----------------------------SIDEBAR------------------------------------>
| style="vertical-align:top; background-color:#E4E9FF; border:1px solid #7FA2FC; padding:10px; margin:2px;" |
===== La nostra offerta socialista =====
* [[File:Icona_bottone_Facebook.png|25px]] [https://www.facebook.com/LaNonciclopedia '''La Nonciclopedia''' su Facebook]
* [[File:Icona_bottone_Twitter.png|25px]] [https://twitter.com/Nonciclopedia '''@Nonciclopedia''' su Twitter]
* [[File:Icona_bottone_Reddit.png|25px]] [https://www.reddit.com/r/Nonciclopedia '''/r/Nonciclopedia''' su Reddit]
|-
| colspan="2" style="background-color:#E4E9FF; text-align:center; color:#222222; border:1px solid #7FA2FC; margin:2px"|
=== Le ultime imprese socialiste ===
|-
| colspan="2"|
<div style="width:50%; border:1px solid #7FA2FC; padding:10px; margin:2px; float:left;"><twitter screen-name="Nonciclopedia" /></div>
<div style="border:1px solid #5CC3F4; padding:10px; margin:2px" float:right;" class="fb-page" data-href="https://www.facebook.com/LaNonciclopedia" data-tabs="timeline" data-width="500" data-hide-cover="true" data-adapt-container-width="true" data-hide-cover="false" data-show-facepile="false"></div>
NB: al momento solo anteprime di Twitter perché non siamo buoni a fare le altre.


==== I network asociali ====
The general approach to output formatting is two-fold:
Questi invece sono soscianettuoc sulla cui tomba sputiamo perché non meritano più la nostra presenza:

* Maispeis; abbiamo creato l'account ufficiale quando MS era già bello che morto e ormai non ricordiamo manco più qual è.
# There are a couple of simple predefined output formats which generate lists of articles
* [https://www.youtube.com/user/NoncicIopedia Iutubbo], nato nell'epoca in cui ogni 5 minuti usciva uno e ''ho un'idea fantastica'' per poi pentirsene 5 minuti dopo.
#:You will understand their meaning directly from reading
* [https://nonciclopedia.tumblr.com/ Tumblerone], il bloggone per femministone su cui davvero c'entravamo come il sale nel caffellatte.
# There is a mode called "userformat" which puts complete control into your hands
* [https://ask.fm/NonciOracolo Asch'e'femmene], dove fare domande tipo "ma Yahoo Answers non era già abbastanza?"
#:This is somewhat complicated.
* Istagrammo; sarebbe bello mettere un link ma idem come Myspace, comunque 'sto istagram non serve a una fava.

* [https://it.pinterest.com/nonciclopedia/ Finterest], aperto giusto nell'eventualità che qualcuno ci fottesse il nome come successo su FB.
While the standard output formats are meant to be used for fast generation of simple page lists,
* [https://disqus.com/by/nonciclopedia/ Disquaraus]: Il social networq trasversale dove farsi dare del coglione da veri ''influencer'' professionisti. Caduto in disuso da quando i geni del marketing del Fatto Quotidiano hanno pensato bene di richiedere la registrazione sul ''loro'' sito per commentare. E di colpo sono di nuovo gli anni 2000.
the userformat approach aims at transcluding contents from other pages and requires some effort to understand. There is a '''system of three tags''' which are used to enclose (a) the whole output, (b) each item, (c) each transcluded section of an item. A '''fourth tag''' is used to separate values between items of one section which occur more than once.

We assume that we have two documents which use templates x and y with varying arguments; while x is being used once within each document, y is used several times. In very short notation the structure might look as follows:
A: x(a) y(3) y(5)
B: x(b) y(4) y(1) y(2)

The following DPL parameters are used to define a set of tags which are used to construct the output:
* <tt>[[listseparators]]</tt> = liststart,itemstart,itemend,listend
* <tt>[[secseparators]]</tt> = sec-1-start,sec-1-end,sec-2-start,sec-2-end, .. , ..
* <tt>[[multisecseparators]]</tt> = multi-sep
The arguments of the above statements can contain '''references to %VARIABLES%'''. So ''sec-1-start'' might contain a reference like <tt>%PAGE%</tt> to output the page name. See [[format]] for more details on variable substitution.

Now think of the following page inclusion statement:
includepage={x}.dpl,{y}.dpl

The output will then look like this:
liststart
itemstart
sec-1-start
x.dpl(a)
sec-1-end
sec-2-start
y.dpl(3)
multi-sep
y.dpl(5)
sec-2-end
itemend
itemstart
sec-1-start
x.dpl(b)
sec-1-end
sec-2-start
y.dpl(4)
multi-sep
y.dpl(1)
multi-sep
y.dpl(2)
sec-2-end
itemend
listend

Assuming that the tags (<tt>liststart</tt>, <tt>itemstart</tt>, etc.) contain wiki syntax for table definitions and multi-sep defines a horizontal line, the output might look like this:

+------+---------------------+
| | | y.dpl(3) |
| A | x.dpl(a) | ---- |
| | | y.dpl(5) |
+------+----------+----------+
| | | y.dpl(4) |
| | | ---- |
| B | x.dpl(b) | y.dpl(1) |
| | | ---- |
| | | y.dpl(2) |
+------+----------+----------+

In some situations, however, you may want to create an output table where each of the calls of template y is used to create a separate output row. Using a sortable table you could then easily rearrange the output.

+------+---------------------+ +------+---------------------+
| A | x.dpl(a) | y.dpl(1) | | B | x.dpl(b) | y.dpl(1) |
+------+---------------------+ +------+---------------------+
| A | x.dpl(a) | y.dpl(2) | | B | x.dpl(b) | y.dpl(2) |
+------+---------------------+ +------+---------------------+
| B | x.dpl(b) | y.dpl(3) | | A | x.dpl(a) | y.dpl(3) |
+------+---------------------+ +------+---------------------+
| B | x.dpl(b) | y.dpl(4) | | A | x.dpl(a) | y.dpl(4) |
+------+---------------------+ +------+---------------------+
| B | x.dpl(b) | y.dpl(5 | | B | x.dpl(b) | y.dpl(5) |
+------+---------------------+ +------+---------------------+
There is a special parameter called <tt>[[dominantsection]]</tt> which you can use to mark one section of your <tt>[[includepage]]</tt> statement as "dominant" (in our example: <tt>dominatsection=2</tt> as {y}.dpl is the second argument of our <tt>includepage</tt> statement). You can only have one dominant section in a DPL statement. Marking a section as "dominant" only makes sense if you have multiple calls of the same template (or multiple chapters with the same heading) in your documents. Each piece of content in the dominant section will generate an individual output row with the values of all other columns being repeated.

----
As all of the above is not very easy to understand there are additional DPL commands (<tt>[[table]], [[tablerow]]</tt>) which make it fairly easy to create tabular output.

== Setting the basic output mode ==

===mode===

{{DPL parameter
|name = mode
|purpose= Provide basic control over the output of DPL.
}}

Syntax:

<code>mode=<i>modename</i></code>

<u>''modename'' can be one of:</u>

;''unordered'': outputs an unordered list &mdash; HTML tag "ul" &mdash; '''(default)'''
;''ordered'': outputs an ordered list &mdash; HTML tag "ol"
;''none'': outputs a list using newlines and HTML tags "br" to separate each item
;''inline'': outputs a list using symbol defined by the <tt>[[#inlinetext|inlinetext]]</tt> parameter to separate items.
;''category'': outputs resulting articles in a way category-pages are shown ('''you have to use <code>[[ordermethod]] = title | titlewithoutnamespace | category,title | user,title</code> with this option!''')

;''userformat'': will leave output control completely to the user; <br> see parameter <tt>[[listseparators]]</tt> and <tt>[[secseparators]]</tt>; in this mode DPL2 will offer built-in variables which must be referenced in the output format description provided by the user. '''mode=userformat''' is quite important to have complete control over the output.

For advanced use of DPL it is important to understand <tt>mode=userformat</tt>. Note that this mode is '''automatically implied''' when <tt>listseparators=</tt> or <tt>[[format]]=</tt> are used.

====Example1====

<table><tr valign=top><td>
<pre><nowiki>
<DPL>
category=Africa
mode=ordered
</DPL>
</nowiki></pre>

<td>This list will output pages that have <nowiki>[[Category:Africa]]</nowiki> shown in an &lt;ol&gt;...&lt;/ol&gt; list:

<ol>
<li>Nigeria
<li>Sudan
<li>Zimbabwe
</ol>
</table>

====Example2====

<pre><nowiki>
<DPL>
titlematch=%frica%
mode=category
ordermethod=titlewithoutnamespace
</DPL>
</nowiki></pre>

This list will output pages that have 'frica' in their name; pages will be ordered by their name regardless of category, the output will be shown in category style (i.e. with chapter capitals)

Related [[DPL extension variables]]: <code>$wgDPL2CategoryStyleListCutoff</code>.


== mode 'Inline' ==

===inlinetext===

{{DPL parameter
|name = inlinetext
|purpose= To define the inline text used in <code>mode=inline</code>
}}

Syntax:

<code>inlinetext=<i>wikitext</i></code>, with <i>wikitext</i> some wiki text
'''default is '&amp;nbsp;-&amp;nbsp;'''' except for mode=userformat where inlinetext is empty by default.

If you want normal "breaking spaces" (and not the NON-breaking spaces) you should use '&amp;#32;-&amp;#32;'.

Extra whitespaces are stripped by DPL from the beginning and end of <i>wikitext</i>. If you want to show one or multiple spaces, use one or multiple '<code>&amp;nbsp;</code>', or use 'nowiki' tags like in '&lt;nowiki&gt; - &lt;/nowiki&gt;' which has same effect as '&amp;nbsp;-&amp;nbsp;'.

Example:

<pre><nowiki>
<DPL>
category=Africa
mode=inline
inlinetext= &amp;nbsp; &amp;bull; &amp;nbsp;
</DPL>
</nowiki></pre>

This list will output pages that have <nowiki>[[Category:Africa]]</nowiki> shown like Item1 &bull; Item2 &bull; Item3 &bull; ...

== mode 'Userformat' ==

===listseparators===
{{DPL parameter
|name = listseparators (alias for format)
|purpose= see the [[format]] parameter.
}}
Note that ''format='' automatically implies ''mode=userformat'' whereas <tt>listseparators</tt> does not.

===format===

{{DPL parameter
|name = format
|purpose= customize the output format completely. Implicitly sets <tt>[[#mode|mode]]=userformat</tt>. Uses variable references like <tt>%PAGE%</tt> to describe the output format. See also the <tt>[[#secseparators|secseparators]]</tt> parameter.
}}

Note1: <tt>listseparators</tt> is an alias for <tt>format</tt> which does not automatically imply <tt>mode=userformat</tt>.

Note2: the <tt>format</tt> command is very flexible but somewhat complicated. If you want to create tabular output, you should have a look at the [[table]] command.

'''Syntax:'''

<code>format=Startall,Start,End,Endall</code>

'Startall', 'Start', 'End' and 'Endall' are wiki tags used to separate the list items.
* 'Startall' and 'Endall' define an outer frame for the whole list.
* 'Start' and 'End' build an inner frame for each article item.

Because wiki syntax depends on newline characters the string <tt>\n</tt> must be used to explicitly insert newline characters into the output.

As we want to be able to control output completely we reference article names and other possible output by special symbols:

* <tt>%NR%</tt> = the current article sequence number (starting from 1)
* <tt>%PAGE%</tt> = the name of the article (including namespace)
* <tt>%PAGEID%</tt> = the internal unique numeric ID of the arcticle page
* <tt>%IMAGE%</tt> = the physical path to an image (based on hash values, e.g. ''5/5d/myImage.jpg'')
* <tt>%PAGESEL%</tt> = the name of a page which was used within the selection criteria (only applies to <tt>[[linksfrom]]</tt> and <tt>[[linksto]]</tt>)
* <tt>%IMAGESEL%</tt> = the name of an image which was used within the selection criteria (only applies to <tt>[[imageused]]</tt>)
----
* <tt>%TITLE%</tt> = the title of the page (without the namespace)
* <tt>%NAMESPACE%</tt> = the namespace of the page
----
* <tt>%COUNT%</tt> = the usage counter (requires <tt>[[addpagecounter]]=true</tt>)
* <tt>%SIZE%</tt> = the article size (requires <tt>[[addpagesize]]=true</tt>)
* <tt>%SIZEFS%</tt> = a font size number which is based on the article size (logarithm of square root of counter)
* <tt>%COUNTFS%</tt> = a font size number which is based on the usage counter (currently this is the logarithm of the usage counter)
* <tt>%COUNTFS2%</tt> = similar to <tt>%COUNTFS%</tt>, but based on the logarithm of the square root of the usage counter.
* <tt>%EDITSUMMARY%</tt> = the change log message of a revision; only accessible if the DPL query is based on revisions.
----
* <tt>%DATE%</tt> = the date selected, eg. <tt>lastedit</tt>; requires <tt>[[addeditdate]]=true</tt> or similar; the formatting of the date can be influenced using <tt>[[#userdateformat|userdateformat=]]</tt>
* <tt>%USER%</tt> = the user who changed the document last; requires <tt>[[adduser]]=true</tt>
----
* <tt>%CONTRIBUTOR%</tt> = the user who made a contribution; requires <tt>[[addcontribution]]=true</tt>
* <tt>%CONTRIBUTION%</tt> = the number of bytes changed; requires <tt>[[addcontribution]]=true</tt>
* <tt>%CONTRIB%</tt> = an asterisk bar to indicate the amount of change; requires <tt>[[addcontribution]]=true</tt>
----
* <tt>%CATLIST%</tt> = a pipe-separated list of links to all categories to which the article belongs (requires <tt>[[addcategories]]=true</tt>)
* <tt>%CATBULLETS%</tt> = a bullet point list of links to all categories to which the article belongs (requires <tt>[[addcategories]]=true</tt>)
* <tt>%CATNAMES%</tt> = a comma-separated list of all categories to which the article belongs (requires <tt>[[addcategories]]=true</tt>)
----
* <tt>%REVISION%</tt> = the name of the revision of the article; this will only be available if you made a selection based on revisions
----
* <tt>%EXTERNALLINK%</tt> = the external hyperlink found as a consequence of the [[linkstoexternal]] statement
----

These symbols will be replaced by the corresponding values if they occur within 'Start' or 'End' or within the corresponding tags of the <tt>[[#secseparators|secseparators]]=</tt> parameter.

----

In addition there are some symbolic variables which can ONLY be used in <tt>[[resultsheader]]</tt> and <tt>[[resultsfooter]]</tt>:
* <tt>%PAGES%</tt> = number of articles in the result set
* <tt>%TOTALPAGES%</tt> = total number of articles in the result set, regardless of count limits; will only be calculated if used.
* <tt>%VERSION%</tt> = the current DPL version
----
* <tt>%DPLTIME%</tt> = contains the amount of time (in seconds + milliseconds) spent within DPL; this can be helpful if you observe slow response times for wiki pages that contain DPL statements. Example: ''2 (2009/06/13 09:27:43)'' would mean that DPL spent two seconds of the whole response time, starting at the time given in brackets.
----
* %FIRSTNAMESPACE%, %FIRSTTITLE%, %LASTNAMESPACE%, %LASTTITLE% : These variables contain namespace and title of the first / last articel in the result set; the information is intended to be used for page scrolling
* %SCROLLDIR% : The value of this variable is set by the URL parameter <tt>DPL_scrollDir</tt>. It is passed to the scroll helper template which uses it to produce its links for scrolling.

----

For example the classical default output of DPL2 can also be produced with the following statements:

Example:
<pre><nowiki>
<DPL>
category = Africa
format = ,\n* [[%PAGE%|%TITLE%]],,
</DPL>
</nowiki></pre>

Note that a bullet point list in wiki syntax is defined by a "*" at the ''beginning of a line'' -- therefore we have to use a special symbol '\n' or '¶' to refer to the beginning of a new line of wiki text. Replace the "*" by a "#" and you will get a numbered list. 'Startall' and 'Endall' are empty (note that we start with a comma, note the two commas at the end), the 'Start' tag is used to create a new line with an initial "* " followed by the page name, written as a link. That´s all.

Creating a top-five hitlist with access rates and bold article names of varying size could be done like this:
<pre><nowiki>
<DPL>
category = Africa
ordermethod = counter
order = descending
addpagecounter = true
count = 5
format = ,\n%COUNT% --- <font size="%COUNTFS%">'''[[%PAGE%]]'''</font>,<br/>,
</DPL>
</nowiki></pre>

You can also use HTML syntax for the tags, although this is discouraged.
<pre><nowiki>
<DPL>
linksto = Africa
format = <ul type="disc">,<li>[[%PAGE%]],</li>,</ul>
</DPL>
</nowiki></pre>

Now let us create a table using wiki syntax:
<pre><nowiki>
<DPL>
linksto = Africa
format = {| class="wikitable"¶!pages found,¶|-¶|[[%PAGE%]],,¶|}
</DPL>
</nowiki></pre>
We use 'Startall' to define the table header and 'Endall' for the footer.
Each article is presented in a table row using wiki syntax for table layout.

'''we could also produce image galleries:'''
<pre><nowiki>
<DPL>
namespace = Image
format = <gallery>,%PAGE%\n,,</gallery>
</DPL>
</nowiki></pre>

===secseparators===
{{DPL parameter
|name = secseparators
|purpose= customize the output format of included sections. Can be used with standard output modes and with <tt>[[#mode|mode]]=userformat</tt>.
}}

====Syntax====

<code>secseparators=Start1,End1,Start2,End2,..,..</code>

or

<code>secseparators=Start</code>

''Please note that the semantics of this parameter '''have changed with version 0.9.6!'''. When upgrading to 0.9.6 it will probably be necessary to change the <tt>secseparator</tt> statements.

In the first syntax variant, specify ''pairs of tags'' which correspond to the <tt>[[includepage]]</tt> statement. <tt>StartN</tt> and <tt>EndN</tt> are HTML strings or wiki tags which will be put around each transcluded section (see <tt>[[#includepage|includepage]]=name1,name2,...</tt>).

In the second syntax variant, specify just one element which will then be used as 'StartN' for all sections; in this case the second tag (<tt>EndN</tt>) will be empty for all transcluded sections.

Symbolic replacements of <tt>%PAGE%</tt> etc. take place as described in <tt>[[#listseparators|listseparators]]</tt>. In addition, the symbol <tt>%SECTION%</tt> can be used to refer to the section found (works only for chapter headings).

If the same section occurs more than once in an article (or an article includes the same template more than once) all such occurences will be transcluded as a block and the <tt>secseparator</tt> tags will only be put once around the whole block (but see <tt>[[#dominantsection|dominantsection]]</tt>).

====Example====

<pre><nowiki>
<DPL>
linksto = Africa
mode = userformat
listseparators = {|¶!pages found¶!fruit¶!color,¶|-¶|[[%PAGE%]],,¶|}
includepage = #fruit,#color
secseparators = ¶|,,¶|,,
</DPL>
</nowiki></pre>

Which produces,
<DPL>
linksto = Africa
mode = userformat
listseparators = {|¶!pages found¶!fruit¶!color,¶|-¶|[[%PAGE%]],,¶|}
includepage = #fruit,#color
secseparators = ¶|,,¶|,,
</DPL>

Use <tt>[[#listseparators|listseparators]]</tt> to define a table with three columns and put a link to the article in the first column of each row. Use <tt>secseparators</tt> to add more columns for each section found. There are two pairs for each transcluded section; the first element of each pair is a linefeed and a pipe (which define a new column in the table) and the second element of each pair is empty. Have a careful look at the '¶' symbols ('\n' can be used as an alternative). They always appear before a wiki syntax element which must be placed at the beginning of a new line. Thus, make sure that the wiki parser will understand them. Note: if an article does not contain a section named "fruit", it will result in an empty cell in the table.

As mentioned above, a single element can be used in the <tt>secseparators</tt> statement in order to apply this as a start tag to all transcluded sections; so it could have also been written:

====Example 2====
<pre><nowiki>
<DPL>
linksto = Africa
mode = userformat
listseparators = {|\n!pages found\n!fruit\n!color,\n|-\n|[[%PAGE%]],,\n|}
includepage = #fruit[50],#color[100 more..]
secseparators = \n|
</DPL>
</nowiki></pre>

Assuming that the chapters on ''fruit'' and ''color'' contain long texts, they can be truncated to 50 or 100 characters. A link which refers directly to those chapters will be generated automatically if needed.

===multisecseparators===

{{DPL parameter
|name = multisecseparators
|purpose= put a tag between multiple transcluded parts which refer to the same template or chapter.
}}

Syntax:

<code>multisecseparators=sep1,sep2,...</code>

The tags correspond to the transcluded section (see <tt>[[#includepage|includepage]]=name1,name2,...</tt>).

Symbolic replacements of <tt>%PAGE%</tt> etc. take place as described in <tt>[[#listseparators|listseparators]]</tt>. In addition the symbol <tt>%SECTION%</tt> can be used to refer to the section found (works only for chapter headings). It will give you the precise name of each heading even if you used a regular expression (double ##) in the include statement.

If an article uses the same template more than once you will get all references with "sepN" as a separator.

Example:
<pre><nowiki>
<DPL>
category=TestSSt
includepage={interfaces_overview} dpl
mode=userformat
listseparators=¶{|class=sortable ¶!Interface ¶!Source system ¶!Target system ¶!Technology,¶|-¶|[[%PAGE%]] ¶,¶,¶|}
secseparators = \n|
multisecseparators=¶|-¶|&amp;nbsp;|
</DPL>
</nowiki></pre>

See also [[Test article structure]].

===dominantsection===

{{DPL parameter
|name = dominantsection
|purpose= define a section with multiple occurrences as dominant, i.e. each piece of contents of this section (which is associated with a template call or a chapter within the original document) will create a separate output line.
}}

Syntax:

<code>dominantsection=number</code> between 1 and the number of arguments in your <tt>includepage=</tt> statement

If there is only 0 or 1 piece of contents for the dominant section you will see no difference from normal DPL behaviour.

Example:

See the explanations at the [[#General approach to output formatting|top of this document]] to understand the meaning of dominantsection.

Note:
Using <tt>dominantsection</tt> together with <tt>[[#table|table]]</tt> may lead to strange result formatting.

== Generating tabular output ==

===table===

{{DPL parameter
|name = table
|purpose= a simple syntax to create standard tabular output; see also [[tablerow]]
}}

Syntax:

<code>table=</code> ''tableatr'', ''linkheader'', (column headlines) ..

The <tt>table</tt> statement is a shortcut which implicitly sets certain values for other DPL parameters, namely <tt>[[mode]]</tt>, <tt>[[listseparators]]</tt> / <tt>[[format]]</tt>, <tt>[[secseparators]]</tt>, and <tt>[[multisecseparators]]</tt>.

The layout is less flexible than the individual use of all of the above parameters but will probably be sufficient in many cases, especially when used together with [[tablerow]].

If you use <tt>table</tt> in a DPL statement, it does not make sense to use one of the other options mentioned because their values will be overwritten without notice. There is one exception of this rule: It can make sense to specify the THIRD argument for <tt>format</tt> in combination with <tt>table</tt>. Therefore this parameter is NOT overwritten by the <tt>table</tt> command. The third argument can be used to output meta data like %COUNT%, %USER% etc. as columns in an output table. If you want to do so, the third parameter must contain wiki syntax for output columns like this:
include = {some template}:parm1,#some heading
table =,,tplparm,chapter,#hits
format =,,\n%COUNT%
Do not forget to escape the '|' symbol if your DPL statement uses parser function syntax. You will get a table which contains template parameters, chapter contents and the usage counter as a third column. Meta data can only be placed AFTER normal contents as we use the THIRD parameter of the <tt>[[format]]</tt> statement.

The use of <tt>table</tt> requires an <tt>[[include]]</tt> statement which should, for reasons of readability, directly precede the <tt>table</tt> statement). Each argument of the <tt>include</tt> statement will produce one or more columns in the output table described in the <tt>table</tt> statement.

'''<tt>table</tt> expects a comma-separated list of parameters''':

* The first parameter will be used to describe general parameters for the table
** it is recommended to make a CSS reference here, using something like <tt>class=wikitable</tt> or <tt>class=mytable</tt> if ''mytable'' is defined in the [[Mediawiki:Common.css]] document.
** <tt>class=wikitable</tt> is the '''default value'''. Use double-quotes to specify multiple classes, e.g., <tt>class="wikitable sortable"</tt>.

* The '''second parameter''' is the headline for the first column.
** The first column will automatically contain a reference to the article, so something like ''Article'' should be o.k.
** <tt>Article</tt> is the '''default value'''.
** if you use a single <tt>-</tt> (dash), the column with the hyperlink to the article will be ''suppressed''. You can supply a hyperlink to the article in any other column if you use <tt><nowiki>[[{{{%PAGE%}}}|{{{%TITLE%}}}]]</nowiki></tt> within a phantom template.

* All subsequent parameters are column headings which correspond to the arguments of the <tt>include</tt> parameter. Note that if you call a ''phantom template'' (like <tt>{Some Template}.dpl</tt>) in the include statement, you will have to provide as many headlines as the ''phantom template'' produces columns.

* <tt>mode</tt> will be set to ''userformat''

* <tt>listseparators</tt> will be configured to produce wiki syntax which defines a table

* <tt>secseparators</tt> will be configured to produce wiki syntax which creates a table row. The first column will always contain a hyperlink to the article of the query result (except you set the link header to '-' as described above.

* <tt>multisecseparators</tt> will be configured to produce wiki syntax which creates another table row for multiple occurencies of the ''first'' <tt>include</tt> argument. For all other arguments a linebreak will be used if we are dealing with template parameters and a horizontal separation line will be used when dealing with chapter contents. The background for this is the following: If you have an article which calls the same template several times, you may want to have a table where each template invocation becomes a row in your table.

When using ''phantom templates'' (i.e. templates which are called during DPL execution instead of the original template) they must be written to produce output according to wiki table syntax. When entering such a template we are already at the beginning of a column (i.e. a preceding line with a <tt>|</tt> has already been put into the output stream). So start directly with the contents of the first column. To add more columns use a <tt>|</tt> in a separate line. Example:
<pre><nowiki>
some output for the first column: {{{1|}}}
|
some output for the next column: {{{2|}}}
|
some output for the next column: {{{3|}}}
</nowiki></pre>

It may sound complicated, but is a ''huge'' improvement compared to the native use of <tt>mode, listseparators, secseparators</tt> and <tt>multisecseparators</tt>.

A typical DPL statement using the <tt>table</tt> parameter would contain:
include = #Chapter X,{T1}:parm1,#Chapter Y,{T2}.dpl
table = class=sortable, Article, X , t-p , Y , T2-a, T2-b
Note that we have written the above statement in a way to show the correspondence between <tt>include</tt> and <tt>table</tt>. You can see the first two parameters which define the table characteristics and a headline for the hyperlink to the article. Then follow headlines for each argument of <tt>include</tt>. Note that there are TWO headlines which correspond to the last argument of the <tt>include</tt> statement (assuming that Template:T2.dpl outputs TWO columns). ''Template:T2'' itself might have more or less than 2 arguments -- it only matters how many columns are output by ''Template:T2.dpl'').

Now look at the [[Test table|examples]]

===tablerow===

{{DPL parameter
|name = tablerow
|purpose= a simple syntax to create customized tabular output; see also [[table]]
}}

Syntax:

<code>tablerow=</code> ''coldef'', ..

Where ''coldef'' contains wiki code which uses the symbol '%%' to refer to the corresponding element of an <tt>[[include]]</tt> statement.

The <tt>table</tt> statement (which '''must''' be used as a prerequisite for <tt>tablerow</tt>) cares for the basics of table generation. So, when you define a column definition, you only need to specify the code for the field contents itself. You can start with field attributes like "bgcolor" or skip them. You can add a leading "\n" to make sure that the field contents is displayed correctly if it contains wiki syntax that depends on linebreaks (e.g. enumeration list).
You must specify all columns. i.e. you must have as many entries in the <tt>tablerow</tt> statement as there are columns in your table. Skipping a column would suppress output for that column completely.
The <tt>tablerow</tt> command is best explained by an example (you can also find this example on the title page of this wiki):
<pre><nowiki>
<dpl>
category=African Union member states
nottitlematch=Sudan
addpagecounter=true
includepage ={Infobox Country or territory}:area:population_estimate,%0[100]
format =,,\n|align=right|²{#ifexpr:%COUNT%>300¦<big>'''%COUNT%'''</big>¦%COUNT%}²,
table =,Country,Area,Population,Text,#hits
tablerow =align=right|%%,align=right|%%,bgcolor=lightyellow|<small>%%</small>,\n|align=right|%%
</dpl>
</nowiki></pre>
* We select some African countries, we exclude Sudan
* We acquire a piece of meta data about the articles we will find (in our case the usage counter)
* We include two named parameters from a template call, {{tl|Infobox Country or territory}}
* We include a short text passage from the text before the first chapter
* We use the third parameter of <tt>format</tt> to output the usage counter (we could even highlight values above 100 here, for example)
* We highlight usage values above 300
* We define a standard wiki table with the article name in the first column (named "Country")
* We define column headers for transcluded contents and for the usage counter
* We care for right alignment of the numerical values and define a bgcolor for the text

===tablesortcol===

{{DPL parameter
|name = tablesortcol
|purpose= define a column to be used as sort key (see also [[table]] )
}}

Syntax:

<code>tablesortcol=</code> ''number''

''number'' is the position of the column that shall be used as sortkey when the result is initially displayed.
* column numbering starts with ''1'';
* ''tablesortcol = 0'' means ''do not sort''; this is the default.
* Negative numbers are used to sort in descending order; e.g. ''-3'' would sort according to the third column in descending order.
* Note that the rest of the row after the selected column will also be part of the sortkey; so the contents of successive columns may serve as a secondary sort criterion if there are identical values in the selected column.
* Also note that the whole column contents is taken; this may include hidden contents or markup sequences if you used column formatting commands. For the same reason you cannot expect numeric contents to be sorted 'numerically' - sorting will always be alphabetical.
* you can of course use something like 'class=sortable' together with 'tablesortcol'. The difference is that ..
** interactive sorting only works after the article has been initially displayed
** interactive sorting tries to guess the content type of a column and sorts according to that (date, number, string)
* If you do not use <tt>tablesortcol</tt> the output order of your table rows will depend on the sort order by which the articles were analysed. That order depends on other DPL commands like <tt>[[ordermethod]]</tt>. The default is "alphabetically by title". So, without 'tablesortcol' you get the tablerows in alphabetical sequence of the article names where they come from. With 'tablesortcol' you can order them by the column contents itself.

== Heading mode ==

===headingmode===

{{DPL parameter
|name = headingmode
|purpose= To control the output of the headings in a DPL with complex/multi-parameter [[DPL:Manual - DPL parameters: Controlling output order#ordermethod|ordermethods]]. (No effect with single-param ordermethods.) For <code>ordermethod=<i>method1,method2,...</i></code>, <i>method1</i> is used for headings. E.g. <code>headingmode</code> affects category headings in <code>ordermethod=category,title</code> (2-param ordermethod). See also [[#headingcount|headingcount]]
}}

Syntax:

<code>headingmode=<i>modename</i></code>

''modename'' can be one of:
* ''none'' &mdash; headings are not displayed, no heading &mdash; '''(default)'''
* ''unordered'' &mdash; outputs an unordered list &mdash; HTML tag "ul"
* ''ordered'' &mdash; outputs an ordered list &mdash; HTML tag "ol"
* ''definition'' &mdash; outputs a definition list &mdash; HTML tag "dl"
* ''H2'' &mdash; outputs sections &mdash; HTML tags "H2"
* ''H3'' &mdash; outputs sections &mdash; HTML tags "H3"
* ''H4'' &mdash; outputs sections &mdash; HTML tags "H4"

Example:

<pre><nowiki>
<DPL>
category=Africa|Europe
ordermethod=category,title
headingmode=definition
mode=ordered
</DPL>
</nowiki></pre>

This list will output pages that belong to one of the categories Africa, Europe in a list similar to this (HTML source), with pages 1 and 2 in the Africa category, Page 1 in the Europe category as well (in fact, the titles are replaced with the appropriate links):
<pre><nowiki>
<dl>
<dt>Africa</dt>
<dd>
<ol>
<li>Page1</li>
<li>Page2</li>
</ol>
</dd>
<dt>Europe</dt>
<dd>
<ol>
<li>Page1</li>
</ol>
</dd>
</dl>
</nowiki></pre>

Headingmode can be used with multi-column output but the length of the columns may in this case vary more than you would expect.

===headingcount===

{{DPL parameter
|name = headingcount
|purpose= In combination with [[#headingmode|headingmode]] this parameter decides whether we show a text line with the number of articles per group or not.
}}

Syntax:

<code>headingcount=<i>true</i></code>

default is <code>headingcount=false</code>


=== listattr ===

{{DPL parameter
|name = listattr
|purpose= Adds attributes to HTML list elements, depending on <tt>[[#mode|mode]]</tt> (HTML element is <tt>ol</tt> for ordered, <tt>ul</tt> for unordered, <tt>div</tt> for others). Can be used with '''pseudo''' <tt>mode=inline</tt> where inline text contains one or more <tt><nowiki><BR/></nowiki></tt>.

Not applicable to <tt>mode=category</tt> or <tt>mode=inline</tt> (with no <tt><nowiki><BR/></nowiki></tt> in inline text).
}}

Syntax:
<code>listattr= attribute1="val1" attribute2="val2" ...</code>
Examples:
{|
! '''Input''' !! '''(HTML) Output''' !! '''Actual Output
|-
|-
<!----------------------------------------------->
|<pre><nowiki>
|colspan="2" style="text-align:center; background-color:#E4E9FF; color:#222222; border:1px solid #7FA2FC; margin:2px"|
<DPL>
=== Partecipa! ===
ordermethod=category,title
headingmode=ordered
mode=none
listattr= class="submenul"
itemattr= class="submenuli" style="font-style: italic;"
</DPL>
</nowiki></pre>
|<pre><nowiki>
<ol>
<li> Cat1 (link)
<div class="submenul">
<span class="submenuli" style="font-style: italic;"> Page1_1 </span> <br/>
<span class="submenuli" style="font-style: italic;"> Page1_2 </span>
</div>
</li>
<li> Cat2 (link)
<div class="submenul">
<span class="submenuli" style="font-style: italic;"> Page2_1 </span> <br/>
<span class="submenuli" style="font-style: italic;"> Page2_2 </span>
</div>
</li>
</ol>
</nowiki></pre>
|
<ol>
<li> Cat1 (link)
<div class="submenul">
<span class="submenuli" style="font-style: italic;"> Page1_1 </span> <br/>
<span class="submenuli" style="font-style: italic;"> Page1_2 </span>
</div>
</li>
<li> Cat2 (link)
<div class="submenul">
<span class="submenuli" style="font-style: italic;"> Page2_1 </span> <br/>
<span class="submenuli" style="font-style: italic;"> Page2_2 </span>
</div>
</li>
</ol>
|-
|-
| style="width:65%; border:1px solid #7FA2FC; padding:10px; margin:2px;"|
|<pre><nowiki>
Hai mai provato a diventare una ''Twitter Star'' partendo da zero? In genere bastano 2 anni di post che nessuno si incula per rendersi conto che ''è fottutamente impossibile!'' Ma da oggi Nonciclopedia ti offre la possibilità di sfruttare il suo sterminato (e drammaticamente in calo) pubblico di 40.000 mipiacioni e 160.000 accoliti '''menzionandoti''' quando pubblica contenuti realizzati da te sulle sue pagine ufficiali!<br />
<DPL>
Per richiedere e ''autorizzare'' tutto ciò, metti nella tua pagina utente il [[Template:Social]] inserendo i tuoi nominativi sui vari social; inserisci solo quelli che hai '''e''' di cui intendi autorizzare la menzione, e toglilo qualora cambiassi idea e non volessi più essere menzionato. '''NB:''' su molti social non siamo ancora/più attivi ma tu comunque inseriscili lo stesso: magari se vediamo che tanti li usano, potremmo riprendere a cagarceli.
ordermethod=category,title
<!----------------------------SIDEBAR------------------------------------>
headingmode=ordered
| style="vertical-align:top; background-color:#E4E9FF; border:1px solid #7FA2FC; padding:10px; margin:2px;" |
mode=unordered
===== I compagni socialisti =====
listattr= class="submenul"
I seguenti compagni hanno giurato fedeltà alla causa socialista e quindi selezionano il materiale, lo preparano alla socializzazione e lo pubblicano quando/come serve. '''Non rompere loro le palle personalmente''', se hai qualcosa che merita il pubblico ludibrio fai richiesta in [[{{TALKPAGENAME}}|PD]]. Va da sé che se la firma risale al Governo Berlusconi IV il compagno potrebbe <del>aver disertato</del> non essere mai esistito.
itemattr= class="submenuli" style="font-weight: bold;"
* --{{utente:Wedhro/firma}} 11:37, set 26, 2017 (CEST)
</DPL>
</nowiki></pre>
|<pre><nowiki>
<ol>
<li> Cat1 (link)
<ul class="submenul">
<li class="submenuli" style="font-weight: bold;"> Page1_1 </li>
<li class="submenuli" style="font-weight: bold;"> Page1_2 </li>
</ul>
</li>
<li> Cat2 (link)
<ul class="submenul">
<li class="submenuli" style="font-weight: bold;"> Page2_1 </li>
<li class="submenuli" style="font-weight: bold;"> Page2_2 </li>
</ul>
</li>
</ol>
</nowiki></pre>
|
<ol>
<li> Cat1 (link)
<ul class="submenul">
<li class="submenuli" style="font-weight: bold;"> Page1_1 </li>
<li class="submenuli" style="font-weight: bold;"> Page1_2 </li>
</ul>
</li>
<li> Cat2 (link)
<ul class="submenul">
<li class="submenuli" style="font-weight: bold;"> Page2_1 </li>
<li class="submenuli" style="font-weight: bold;"> Page2_2 </li>
</ul>
</li>
</ol>
|}
|}

=== itemattr ===

{{DPL parameter
|name = itemattr
|purpose= Adds attributes to HTML list items, depending on 'mode' (element is 'li' for ordered/unordered, 'span' for others).

Not applicable to 'mode=category'.
}}

Syntax:
<code>itemattr= attribute1="val1" attribute2="val2" ...</code>
Example: see [[#listitemattr|listitemattr]].

=== hlistattr ===

{{DPL parameter
|name = hlistattr
|purpose= Adds attributes to the HTML list element at the heading/top level, depending on 'headingmode' (HTML element would be 'ol' for ordered, 'ul' for unordered, 'dl' for definition, 'div' for others)

Not yet applicable to 'headingmode=none'.
}}

Syntax:
<code>hlistattr= attribute1="val1" attribute2="val2" ...</code>
Example:
{|
! '''Input''' !! '''(HTML) Output''' !! '''Actual Output'''
|- valign=top
|<pre><nowiki>
<DPL>
ordermethod=category,pagetouched
headingmode=H2
mode=ordered
hlistattr= class="topmenul" id="dmenu"
</DPL>
</nowiki></pre>
|<pre><nowiki>
<div class="topmenul" id="dynamicmenu">
<H2> Category 1 (link) </H2>
<ol>
<li>Page1_1</li>
<li>Page1_2</li>
</ol>
<H2> Category 2 (link) </H2>
<ol>
<li>Page2_1</li>
</ol>
</div>
</nowiki></pre>
|
<div class="topmenul" id="dynamicmenu">

<H2> Category 1 (link) </H2>
<ol>
<li>Page1_1</li>
<li>Page1_2</li>
</ol>
<H2> Category 2 (link) </H2>
<ol>
<li>Page2_1</li>
</ol>
</div>
|}

See also [[#hitemattr|hitemattr]].

=== hitemattr ===

{{DPL parameter
|name = hitemattr
|purpose= Adds attributes to HTML list items (headings) at the heading level, depending on 'headingmode' (HTML element would be 'li' for ordered/unordered, 'div' for others).

To be used with headingmode='unordered' or 'ordered'. (Not yet applicable for others.)
}}

Syntax:
<code>hitemattr= attribute1="val1" attribute2="val2" ...</code>
Example:
{|
! '''Input''' !! '''(HTML) Output''' !! '''Actual Output'''
|- valign=top
|<pre><nowiki>
<DPL>
ordermethod=category,title
headingmode=unordered
mode=ordered
hlistattr= class="topmenul" id="dmenu"
hitemattr= class="topmenuli" style="color: red;"
</DPL>
</nowiki></pre>
|<pre><nowiki>
<ul class="topmenul" id="dmenu">
<li class="topmenuli" style="color: red;"> Category 1 (link)
<ol>
<li>Page1_1</li>
<li>Page1_2</li>
</ol>
</li>
<li class="topmenuli" style="color: red;"> Category 2 (link)
<ol>
<li>Page2_1</li>
</ol>
</li>
</ul>
</nowiki></pre>
|
<ul class="topmenul" id="dmenu">
<li class="topmenuli" style="color: red;"> Category 1 (link)
<ol>
<li>Page1_1</li>
<li>Page1_2</li>
</ol>
</li>
<li class="topmenuli" style="color: red;"> Category 2 (link)
<ol>
<li>Page2_1</li>
</ol>
</li>
</ul>
|}

===userdateformat===

{{DPL parameter
|name = userdateformat
|purpose= Define a special layout for date formatting.
}}

Syntax:

<code>userdateformat=<i>formatstring</i></code>

The ''formatstring'' may contain letters like "y,Y,m,M,d,D,h,H,i,I,s" for year, month day. Other characters are printed as they are. See the documentation for php function date() for more details [http://www.php.net/manual/en/function.date.php]. The "userdateformat" applies to all date/time fields, see the parameters: [[DPL:Manual - DPL parameters: Controlling output volume#addeditdate|addeditdate]],[[DPL:Manual - DPL parameters: Controlling output volume#addpagetoucheddate|addpagetoucheddate]],[[DPL:Manual - DPL parameters: Controlling output volume#addfirstcategorydate|addfirstcategorydate]]

Example:

userdateformat=Y-m-d (D)

Default:

By default DPL uses "Y-m-d H:i:s" to display date and time. Note that MediaWiki stores all dates/times in UTC format. When displaying a time stamp DPL will translate it according to
# the timezone preference (difference to UTC/GMT) given by the user in his user settings
# if no preference is given and for all anonymous users the local time on the server will be used.

So you will either see a time based on your local time (browser based) or based on the timezone in which the wiki server is running.

The same kind of translation applies to dates you specify when selecting articles by revsion date/time.

== Control the way article names are displayed ==


===shownamespace===

{{DPL parameter
|name = shownamespace
|purpose= To restrict the appearance of the namespace name of a page before the page. As the switch is ''true'' by default it should be set to ''false'' if you want to avoid namespaces to be shown in the output.
}}

Syntax:

<code>shownamespace=false</code>

Example:

<pre><nowiki>
<DPL>
category = Africa
namespace = Talk
shownamespace = false
</DPL>
</nowiki></pre>

This list will output all Talk pages in <nowiki>[[Category:Africa]]</nowiki>, listed without the Talk: prepended to page names.

Note that in "mode=userformat" there is a different way to decide whether you want to output the title with or without namespace. In mode=userformat two built-in variables are provided which contain the page name including the namespace (%PAGE%) and the base title name (%TITLE%).


===escapelinks===

{{DPL parameter
|name = escapelinks
|purpose= Regarding ''images'' and ''categories'' this parameter allows you to decide whether
* you want to see a link to the image or to the category page (escapelinks=true, this is the default)
* you want to see the image or make the page which contains the DPL statement part of the categories which are returned by DPL (escapelinks=false)
}}

Syntax:
:<code>escapelinks=false</code>

Note: You can use this parameter to show images; an other way to do this is to use the gallery extension in combination with DPL; there is an [[Test escapelinks|example]] for this on the dpldemo website.


===titlemaxlength===

{{DPL parameter
|name = titlemaxlength
|purpose= To limit the number of characters of the title to display. If the page title (this does not include the namespace or any other prefix before the title) is bigger than the titlemaxlength value, the title is truncated and ended by '...'.
}}

Syntax:

<code>titlemaxlength=<i>number of characters</i></code>

===replaceintitle===

{{DPL parameter
|name = replaceintitle
|purpose= execute a string replacement operation on the %TITLE% var
}}

Syntax:

<code>replaceintitle=<i>search for,replacement</i></code>

The "search for" argument must be an expression which can be used in a php preg_replace() function call.

Example:

to remove the string "demo" in article names, you must write
: replaceintitle=/demo/,

Note that standard regexp rules apply. The regexp must start with a non-alphanumeric character -- but not with a backslash!
It is good habit to use a '/' if this character is not needed within the regexp itself. Read the php manual to understand the details of regular expressions.


== Arranging article lists in columns and rows ==

===columns===

{{DPL parameter
|name = columns
|purpose= Define a column layout for the output.
}}

Syntax:

<code>columns=<i>ncols</i></code>

'''Example:'''

<pre><nowiki>
<dpl></nowiki>
category=Test
columns=3
rowcolformat=width=100%
</dpl>
</pre>

Simply displays all articles and subcategories in [[:Category:Test]] in 3 columns (<tt>[[#rowcolformat|rowcolformat]]</tt> is used to make the table width 100%).

<dpl>
category=Test
columns=3
rowcolformat=width=100%
</dpl>

'''More complex example:'''

In <tt>[[mode]]=[[userformat]]</tt> the outer tags from <tt>[[#listseparators|listseparators]]</tt> will be repeated for each column.

<pre><nowiki>
<DPL></nowiki>
category=Africa
addpagesize=true
ordermethod=size
mode=userformat
listseparators={|class=sortablewikitable id=2\n!Rank\n!Article\n!Bytes\n|-,\n|%NR%.\n|[[%PAGE%]]\n|align=right|%SIZE%,\n|-,\n|}
count=12
columns=3
</DPL>
</pre>

The output will contain a list of the 12 largest articles on Africa, arranged in three columns. Each column consists of a table which has itself three columns: rank, article name and size. ''Unfortunately, it doesn't work...''

<DPL>
category=Africa
addpagesize=true
ordermethod=size
mode=userformat
listseparators={|class=sortablewikitable id=2\n!Rank\n!Article\n!Bytes\n|-,\n|%NR%.\n|[[%PAGE%]]\n|align=right|%SIZE%,\n|-,\n|}
count=12
columns=3
</DPL>

===rows===
{{DPL parameter
|name = rows
|purpose= Define a row layout for the output. A "row" is a group of output lines for which the heading is repeated. If you do not know how big your result will be, it may be better to use the "rowsize" parameter.
}}

Syntax:

<code>rows=<i>nrows</i></code>

In "mode=userformat" the outer tags from "listseparators" will be repeated for each column. Thus you can create long lists where the table heading is repeated from time to time.
Example:

<pre><nowiki>
<DPL>
category=Africa
addpagesize=true
ordermethod=size
mode=userformat
listseparators={|class=sortablewikitable id=2\n!Rank\n!Article\n!Bytes\n|-,\n|%NR%.\n|[[%PAGE%]]\n|align=right|%SIZE%,\n|-,\n|}
count=12
rows=2
</DPL>
</nowiki></pre>

The output will contain a list of the 12 largest articles on Africa, arranged in two rows (of 6 lines each). Each row consists of a table which has itself three columns: rank, article name and size.

===rowsize===

{{DPL parameter
|name = rowsize
|purpose= Define a row layout for the output. A "row" is a group of n output lines for which the heading will be repeated.
}}

Syntax:

<code>rowsize=<i>nrowsize</i></code>

In "mode=userformat" the outer tags from "listseparators" will be repeated after each group of "rowsize" output lines.
Thus you can create long lists where the table heading is repeated in regular intervals.
Example:

<pre><nowiki>
<DPL>
category=Africa
addpagesize=true
ordermethod=size
mode=userformat
listseparators={|class=sortablewikitable id=2\n!Rank\n!width=200px|Article\n!Bytes\n|-,\n|%NR%.\n|[[%PAGE%]]\n|align=right|%SIZE%,\n|-,\n|}
rowsize=20
</DPL>
</nowiki></pre>

The output will contain a list of all articles on Africa. After each group of 20 entries (article names) the table heading will be repeated. It may be useful to set the width of the column with the article names explicitly, so that the tables in each row have equal width.

===rowcolformat===

{{DPL parameter
|name = rowcolformat
|purpose= Defines layout properties (using [[wikibooks:HTML_Programming/Tables|HTML table tag parameters]]) for the row/column grid.
}}

Syntax:

<code>rowcolformat=<i>html tags</i></code>
Example:

<pre><nowiki>
<DPL>
category=Africa
columns=3
rowcolformat=cellspacing=20
</DPL>
</nowiki></pre>

There will be more space around the columns than normal. See <tt>[[#columns|columns]]</tt> above for another example.

The ideal way to use <tt>rowcolformat</tt> is to assign a CSS class to your DPL table which has been defined in your ''mediawiki:Common.css'' article.

Example:

<pre><nowiki>
<DPL>
category=Africa
columns=3
rowcolformat=class=dpl3columns
</DPL>
</nowiki></pre>

In your Common.css article you might have written something like

table.dpl3columns td {
background: #f2f2f2;
padding: 0.5em;
border:3px;
width:33%;
}

Versione attuale delle 08:16, 10 apr 2023


Uno spettro si aggira per l'internet!

Questo è lo spazio ufficiale che Nonciclopedia dedica alla più grande invenzione dell'uomo nella categoria "perdite di tempo": i social network! (trad: "reticolati socialisti").

Un numero imprecisato di proletari si occupa di postare il meglio dei contenuti per invogliare laggente a lasciar perdere per un attimo i #gattini per venire a sgobbare qui; o almeno affinché il mondo non dimentichi che siamo ancora vivi. Quindi niente catene di Sant'Antonio, principi Nigeriani che regalano soldi, meme che su 4chan erano vecchi 5 anni fa e mipiacemipiacemipiacemipiacemipiacemipia': solo contenuti che invitino a venire sul sito. In generale, questo vuol dire contenuti di qualità (ovvero da Latrina) e/o di attualità, che 'sti social hanno una memoria da pesce rosso.
E il porno. Il porno funziona sempre.

I dati sull'acchiappamento di gonzi puoi visualizzarli in Progetto:Statistiche (vedi anche la PD per avere più dettagli).

La nostra offerta socialista

Le ultime imprese socialiste

NB: al momento solo anteprime di Twitter perché non siamo buoni a fare le altre.

I network asociali

Questi invece sono soscianettuoc sulla cui tomba sputiamo perché non meritano più la nostra presenza:

  • Maispeis; abbiamo creato l'account ufficiale quando MS era già bello che morto e ormai non ricordiamo manco più qual è.
  • Iutubbo, nato nell'epoca in cui ogni 5 minuti usciva uno e ho un'idea fantastica per poi pentirsene 5 minuti dopo.
  • Tumblerone, il bloggone per femministone su cui davvero c'entravamo come il sale nel caffellatte.
  • Asch'e'femmene, dove fare domande tipo "ma Yahoo Answers non era già abbastanza?"
  • Istagrammo; sarebbe bello mettere un link ma idem come Myspace, comunque 'sto istagram non serve a una fava.
  • Finterest, aperto giusto nell'eventualità che qualcuno ci fottesse il nome come successo su FB.
  • Disquaraus: Il social networq trasversale dove farsi dare del coglione da veri influencer professionisti. Caduto in disuso da quando i geni del marketing del Fatto Quotidiano hanno pensato bene di richiedere la registrazione sul loro sito per commentare. E di colpo sono di nuovo gli anni 2000.

Partecipa!

Hai mai provato a diventare una Twitter Star partendo da zero? In genere bastano 2 anni di post che nessuno si incula per rendersi conto che è fottutamente impossibile! Ma da oggi Nonciclopedia ti offre la possibilità di sfruttare il suo sterminato (e drammaticamente in calo) pubblico di 40.000 mipiacioni e 160.000 accoliti menzionandoti quando pubblica contenuti realizzati da te sulle sue pagine ufficiali!
Per richiedere e autorizzare tutto ciò, metti nella tua pagina utente il Template:Social inserendo i tuoi nominativi sui vari social; inserisci solo quelli che hai e di cui intendi autorizzare la menzione, e toglilo qualora cambiassi idea e non volessi più essere menzionato. NB: su molti social non siamo ancora/più attivi ma tu comunque inseriscili lo stesso: magari se vediamo che tanti li usano, potremmo riprendere a cagarceli.

I compagni socialisti

I seguenti compagni hanno giurato fedeltà alla causa socialista e quindi selezionano il materiale, lo preparano alla socializzazione e lo pubblicano quando/come serve. Non rompere loro le palle personalmente, se hai qualcosa che merita il pubblico ludibrio fai richiesta in PD. Va da sé che se la firma risale al Governo Berlusconi IV il compagno potrebbe aver disertato non essere mai esistito.

  • -- WEDHRO B A 🗿? 11:37, set 26, 2017 (CEST)