« Modèle:Liste » : différence entre les versions
De Nefald
Autres actions
m A protégé « Modèle:Liste » ([Modifier=Autoriser uniquement les administrateurs] (infini) [Renommer=Autoriser uniquement les administrateurs] (infini)) |
Aucun résumé des modifications |
||
(6 versions intermédiaires par le même utilisateur non affichées) | |||
Ligne 1 : | Ligne 1 : | ||
<includeonly> | <includeonly><dpl> | ||
{| | {{#if:{{{category|}}}|category={{{category}}}}} | ||
{{#if:{{{notcategory|}}}|notcategory={{{notcategory}}}}} | |||
{{# | {{#if:{{{namespace|}}}|namespace={{{namespace}}}}} | ||
| | {{#if:{{{notnamespace|}}}|notnamespace={{{notnamespace}}}}} | ||
| | {{#if:{{{titlematch|}}}|titlematch={{{titlematch}}}}} | ||
|ordermethod={{{tri|title}}} | {{#if:{{{notitlematch|}}}|notitlematch={{{notitlematch}}}}} | ||
|order={{{ordre|ascending}}} | {{#if:{{{titleregexp|}}}|titleregexp={{{titleregexp}}}}} | ||
|mode=userformat | {{#if:{{{nottitleregexp|}}}|nottitleregexp={{{nottitleregexp}}}}} | ||
| | {{#if:{{{linksto|}}}|linksto={{{linksto}}}}} | ||
|format= | {{#if:{{{notlinksto|}}}|notlinksto={{{notlinksto}}}}} | ||
| | {{#if:{{{linksfrom|}}}|linksfrom={{{linksfrom}}}}} | ||
| | {{#if:{{{notlinksfrom|}}}|notlinksfrom={{{notlinksfrom}}}}} | ||
{{#if:{{{uses|}}}|uses={{{uses}}}}} | |||
{{#if:{{{notuses|}}}|notuses={{{notuses}}}}} | |||
{{#if:{{{usedby|}}}|usedby={{{usedby}}}}} | |||
{{#if:{{{imageused|}}}|imageused={{{imageused}}}}} | |||
{{#if:{{{imagecontainer|}}}|imagecontainer={{{imagecontainer}}}}} | |||
{{#if:{{{redirects|}}}|redirects={{{redirects}}}}} | |||
{{#if:{{{minrevisions|}}}|minrevisions={{{minrevisions}}}}} | |||
{{#if:{{{maxrevisions|}}}|maxrevisions={{{maxrevisions}}}}} | |||
{{#if:{{{minoredits|}}}|minoredits={{{minoredits}}}}} | |||
{{#if:{{{modifiedby|}}}|modifiedby={{{modifiedby}}}}} | |||
{{#if:{{{notmodifiedby|}}}|notmodifiedby={{{notmodifiedby}}}}} | |||
{{#if:{{{lastmodifiedby|}}}|lastmodifiedby={{{lastmodifiedby}}}}} | |||
{{#if:{{{notlastmodifiedby|}}}|notlastmodifiedby={{{notlastmodifiedby}}}}} | |||
{{#if:{{{createdby|}}}|createdby={{{createdby}}}}} | |||
{{#if:{{{notcreatedby|}}}|notcreatedby={{{notcreatedby}}}}} | |||
ordermethod={{{ordermethod|{{{tri|title}}}}}} | |||
{{#if:{{{order|}}}|order={{{order|{{{ordre|ascending}}}}}}}} | |||
{{#if:{{{ordercollation|}}}|ordercollation={{{ordercollation}}}}} | |||
{{#if:{{{count|}}}|count={{{count|{{{limite|500}}}}}}}} | |||
{{#if:{{{offset|}}}|offset={{{offset}}}}} | |||
{{#if:{{{randomseed|}}}|randomseed={{{randomseed}}}}} | |||
{{#if:{{{randomcount|}}}|randomcount={{{randomcount}}}}} | |||
{{#if:{{{distinct|}}}|distinct={{{distinct}}}}} | |||
mode={{#switch:{{{format|userformat}}} | |||
|liste=unordered | |||
|puces=unordered | |||
|ul=unordered | |||
|numerotee=ordered | |||
|ol=ordered | |||
|inline=inline | |||
|category=category | |||
|#default={{{mode|userformat}}} | |||
}} | |||
{{#if:{{{columns|}}}|columns={{{columns|{{{colonnes|1}}}}}}}} | |||
{{#if:{{{rows|}}}|rows={{{rows|{{{lignes|1}}}}}}}} | |||
{{#if:{{{rowsize|}}}|rowsize={{{rowsize}}}}} | |||
{{#if:{{{rowcolformat|}}}|rowcolformat={{{rowcolformat}}}}} | |||
{{#ifeq:{{{format|userformat}}}|tableau| | |||
|{{#if:{{{table|}}}|table={{{table}}}|table={{{tableintro|{{{!}} class="wikitable sortable"}}} | |||
! {{{colonnes_noms|Page}}}}}} | |||
|{{#if:{{{tablerow|}}}|tablerow={{{tablerow}}}|tablerow={{{lignetableau|{{!}}- | |||
{{!}} [[%PAGE%]]}}}}}}, | |||
{{#if:{{{listseparators|}}}|listseparators={{{listseparators}}}|listseparators={{{intro|{{{debut|}}}}}},{{{separator|{{{separateur|}}}}}},{{{outro|{{{fin|}}}}}}{{#ifeq:{{{format|}}}|tableau|{{!}}}{{!}}|}}}} | |||
}} | }} | ||
{{#if:{{{inlinetext|}}}|inlinetext={{{inlinetext}}}}} | |||
{{#if:{{{format|}}}|{{#ifneq:{{{format}}}|tableau|{{#ifneq:{{{format}}}|liste|{{#ifneq:{{{format}}}|puces|{{#ifneq:{{{format}}}|numerotee|format={{{format}}}}}}}}}}}}} | |||
{{#if:{{{replaceintitle|}}}|replaceintitle={{{replaceintitle}}}}} | |||
{{#if:{{{include|}}}|include={{{include}}}|{{#if:{{{infobox|}}}|include={{{infobox}}}:{{#if:{{{champs|}}}|{{{champs}}}|*}}{{#if:{{{shortdesc|}}}|,#REDIRECT,<nowiki>{{</nowiki>Short description<nowiki>}}</nowiki>}}|{{#if:{{{shortdesc|}}}|include=#REDIRECT,<nowiki>{{</nowiki>Short description<nowiki>}}</nowiki>}}}}}} | |||
{{#if:{{{exclude|}}}|exclude={{{exclude}}}}} | |||
{{#if:{{{includepage|}}}|includepage={{{includepage}}}}} | |||
{{#if:{{{excludepage|}}}|excludepage={{{excludepage}}}}} | |||
{{#if:{{{includematch|}}}|includematch={{{includematch}}}}} | |||
{{#if:{{{excludematch|}}}|excludematch={{{excludematch}}}}} | |||
{{#if:{{{includematchparsed|}}}|includematchparsed={{{includematchparsed}}}}} | |||
{{#if:{{{excludematchparsed|}}}|excludematchparsed={{{excludematchparsed}}}}} | |||
{{#if:{{{includemaxlength|}}}|includemaxlength={{{includemaxlength}}}}} | |||
{{#if:{{{ignorecase|}}}|ignorecase={{{ignorecase}}}}} | |||
{{#if:{{{shownamespace|}}}|shownamespace={{{shownamespace}}}}} | |||
{{#if:{{{escapelinks|}}}|escapelinks={{{escapelinks}}}}} | |||
{{#if:{{{skipthispage|}}}|skipthispage={{{skipthispage}}}}} | |||
{{#if:{{{noparse|}}}|noparse={{{noparse}}}}} | |||
{{#if:{{{dominantsection|}}}|dominantsection={{{dominantsection}}}}} | |||
{{#if:{{{headingmode|}}}|headingmode={{{headingmode}}}}} | |||
{{#if:{{{secseparators|}}}|secseparators={{{secseparators}}}}} | |||
{{#if:{{{multisecseparators|}}}|multisecseparators={{{multisecseparators}}}}} | |||
{{#if:{{{titlemaxlength|}}}|titlemaxlength={{{titlemaxlength}}}}} | |||
{{#if:{{{resultsheader|}}}|resultsheader={{{resultsheader}}}}} | |||
{{#if:{{{resultsfooter|}}}|resultsfooter={{{resultsfooter}}}}} | |||
{{#if:{{{oneresultheader|}}}|oneresultheader={{{oneresultheader}}}}} | |||
{{#if:{{{oneresultfooter|}}}|oneresultfooter={{{oneresultfooter}}}}} | |||
{{#if:{{{noresultsheader|}}}|noresultsheader={{{noresultsheader|{{{siaucun|<div style="color:#999;font-style:italic;">Aucun résultat trouvé.</div>}}}}}}}} | |||
{{#if:{{{noresultsfooter|}}}|noresultsfooter={{{noresultsfooter}}}}} | |||
allowcachedresults={{#if:{{{cache|}}}|{{{cache}}}|{{#if:{{{allowcachedresults|}}}|{{{allowcachedresults}}}|false}}}} | |||
{{#if:{{{reset|}}}|reset={{{reset}}}}} | |||
{{#if:{{{eliminate|}}}|eliminate={{{eliminate}}}}} | |||
{{#if:{{{openreferences|}}}|openreferences={{{openreferences}}}}} | |||
{{#if:{{{ignoreuselessarticle|}}}|ignoreuselessarticle={{{ignoreuselessarticle}}}}} | |||
{{#if:{{{execandexit|}}}|execandexit={{{execandexit}}}}} | |||
{{#if:{{{redirects|}}}|redirects={{{redirects}}}}} | |||
{{#if:{{{stablepages|}}}|stablepages={{{stablepages}}}}} | |||
{{#if:{{{qualitypages|}}}|qualitypages={{{qualitypages}}}}} | |||
{{#if:{{{debug|}}}|debug={{{debug}}}}} | |||
{{#if:{{{goal|}}}|goal={{{goal}}}}} | |||
{{#if:{{{suppresserrors|}}}|suppresserrors={{{suppresserrors}}}}} | |||
</dpl></includeonly><noinclude> | |||
== Documentation == | |||
Modèle universel pour [https://www.mediawiki.org/wiki/Extension:DynamicPageList4 DynamicPageList4] avec extraction automatique de contenu. | |||
=== Paramètres simplifiés === | |||
==== Sélection ==== | |||
{| class="wikitable" | |||
! Paramètre !! Alias !! Description !! Exemple | |||
|- | |||
| '''category''' || || Catégorie(s) || Plugin installé | |||
|- | |||
| '''notcategory''' || || Exclure catégorie(s) || Plugin obsolète | |||
|- | |||
| '''namespace''' || || Namespace(s) || Main{{!}}Template | |||
|- | |||
| '''titlematch''' || || Pattern du titre || World% | |||
|- | |||
| '''linksto''' || || Liens vers || Architecte | |||
|- | |||
| '''uses''' || || Utilise template || Template:InfoPlugin | |||
|} | |||
==== Tri et limite ==== | |||
{| class="wikitable" | |||
! Paramètre !! Alias !! Description !! Valeurs | |||
|- | |||
| '''ordermethod''' || '''tri''' || Méthode de tri || title, lastedit, created, category, popularity | |||
|- | |||
| '''order''' || '''ordre''' || Ordre || ascending, descending | |||
|- | |||
| '''count''' || '''limite''' || Nombre max || 100 | |||
|- | |||
| '''offset''' || || Décalage || 20 | |||
|} | |||
==== Format d'affichage ==== | |||
{| class="wikitable" | |||
! Paramètre !! Alias !! Description !! Valeurs | |||
|- | |||
| '''format''' || || Format global || tableau, liste, puces, numerotee, inline, category, userformat | |||
|- | |||
| '''intro''' || '''debut''' || Texte avant || <nowiki><div class="liste"></nowiki> | |||
|- | |||
| '''outro''' || '''fin''' || Texte après || <nowiki></div></nowiki> | |||
|- | |||
| '''separator''' || '''separateur''' || Entre items || <nowiki><hr></nowiki> | |||
|- | |||
| '''columns''' || '''colonnes''' || Nombre colonnes || 3 | |||
|} | |||
==== Extraction de contenu ==== | |||
{| class="wikitable" | |||
! Paramètre !! Description !! Exemple | |||
|- | |||
| '''shortdesc''' || Extraire Short description || yes | |||
|- | |||
| '''infobox''' || Template infobox || InfoPlugin | |||
|- | |||
| '''champs''' || Champs de l'infobox || description,documentation | |||
|- | |||
| '''include''' || Inclusion manuelle || {InfoPlugin}:description,#REDIRECT | |||
|} | |} | ||
==== Variables disponibles ==== | |||
Dans '''format''', '''tablerow''' ou '''listseparators''' : | |||
* '''%PAGE%''' : nom de la page | |||
* '''%TITLE%''' : titre affiché | |||
* '''%NAMESPACE%''' : namespace | |||
* '''%IMAGE%''' : première image | |||
* '''%EXTERNALLINK%''' : premier lien externe | |||
* '''%SIZE%''' : taille en octets | |||
* '''%AUTHOR%''' : créateur | |||
* '''%DATE%''' : date création | |||
* '''%LASTEDIT%''' : dernière modification | |||
* '''%PAGESEL%''' : contenu extrait (via include) | |||
* '''%PAGESEL:n%''' : n-ième élément extrait | |||
=== Exemples d'utilisation === | |||
=== | ==== 1. Liste simple avec Short description ==== | ||
<pre> | <pre> | ||
{{Liste| | {{Liste | ||
|category=Plugin installé | |||
|shortdesc=yes | |||
|format=* [[%PAGE%]] — %PAGESEL:1% | |||
}} | |||
</pre> | |||
==== 2. Tableau avec données d'infobox ==== | |||
<pre> | |||
{{Liste | |||
|category=Plugin installé | |||
|format=tableau | |||
|infobox=InfoPlugin | |||
|champs=description,documentation | |||
|colonnes_noms=Plugin !! Description !! Documentation | |||
|lignetableau={{!}}- | |||
{{!}} [[%PAGE%]] {{!}}{{!}} %PAGESEL:1% {{!}}{{!}} [%PAGESEL:2% Lien] | |||
}} | |||
</pre> | </pre> | ||
=== | ==== 3. Cartes en grille avec shortdesc ==== | ||
<pre> | |||
{{Liste | |||
; | |category=Plugin installé | ||
; | |shortdesc=yes | ||
|tri=lastedit | |||
|ordre=descending | |||
|intro=<div style="display:grid; grid-template-columns:repeat(auto-fill, minmax(300px, 1fr)); gap:20px;"> | |||
|format=<div style="border:1px solid #ddd; padding:15px;"> | |||
<h3>[[%PAGE%]]</h3> | |||
<p>%PAGESEL:1%</p> | |||
<small>Modifié: %LASTEDIT%</small> | |||
</div> | |||
|outro=</div> | |||
|separateur= | |||
}} | |||
</pre> | |||
=== | ==== 4. Tableau complet plugins avec tout ==== | ||
<pre> | |||
{{Liste | |||
|category=Plugin installé | |||
|shortdesc=yes | |||
|infobox=InfoPlugin | |||
|champs=description,documentation,version | |||
|format=tableau | |||
|tableintro={{{!}} class="wikitable sortable" | |||
! Plugin !! Short Desc !! Description !! Doc !! Version !! Taille !! Dernière modif | |||
|lignetableau={{!}}- | |||
{{!}} [[%PAGE%]] | |||
{{!}}{{!}} %PAGESEL:1% | |||
{{!}}{{!}} %PAGESEL:2% | |||
{{!}}{{!}} {{#if:%PAGESEL:3%|[%PAGESEL:3% 📄]|—}} | |||
{{!}}{{!}} %PAGESEL:4% | |||
{{!}}{{!}} %SIZE% octets | |||
{{!}}{{!}} %LASTEDIT% | |||
|tri=title | |||
|limite=100 | |||
}} | |||
</pre> | |||
==== | ==== 5. Liste avec regex d'extraction ==== | ||
<pre> | <pre> | ||
{{Liste|Plugin installé}} | {{Liste | ||
|category=Plugin installé | |||
|includematch=/\|description=(.*?)[\n\|]/s | |||
|format=* [[%PAGE%]]: %PAGESEL:1% | |||
}} | |||
</pre> | </pre> | ||
==== | ==== 6. Mode category (galerie) ==== | ||
<pre> | <pre> | ||
{{Liste| | {{Liste | ||
|category=Plugin installé | |||
|format=category | |||
|tri=category | |||
|colonnes=4 | |||
}} | |||
</pre> | </pre> | ||
==== | ==== 7. Recherche textuelle ==== | ||
<pre> | <pre> | ||
{{Liste| | {{Liste | ||
|category=Plugin installé | |||
|includematchparsed=/world|construction/i | |||
|shortdesc=yes | |||
|format=puces | |||
}} | |||
</pre> | </pre> | ||
=== | ==== 8. Top 10 pages modifiées ==== | ||
<pre> | |||
{{Liste | |||
|category=Plugin installé | |||
|tri=lastedit | |||
|ordre=descending | |||
|limite=10 | |||
|format=numerotee | |||
}} | |||
</pre> | |||
=== | ==== 9. Extraction multiple avec shortdesc ==== | ||
<pre> | |||
{{Liste | |||
|category=Grade | |||
|shortdesc=yes | |||
|infobox=InfoGrade | |||
|champs=couleur,permissions | |||
|intro=<div class="grades"> | |||
|format=<div class="grade" style="border-left:4px solid %PAGESEL:2%;"> | |||
<h3>[[%PAGE%]]</h3> | |||
<p><strong>Description:</strong> %PAGESEL:1%</p> | |||
<p><strong>Permissions:</strong> %PAGESEL:3%</p> | |||
</div> | |||
|outro=</div> | |||
|separateur= | |||
}} | |||
</pre> | |||
==== 10. Debug mode ==== | |||
<pre> | |||
{{Liste | |||
|category=Plugin installé | |||
|shortdesc=yes | |||
|debug=true | |||
|limite=5 | |||
}} | |||
</pre> | |||
=== Format des infobox requis === | |||
' | Pour que l'extraction fonctionne, structure tes infobox ainsi : | ||
<pre> | <pre> | ||
{{ | <includeonly>{{#tag:dpl| | ||
...paramètres... | |||
include={{{1|InfoPlugin}}}:description,{{{1|InfoPlugin}}}:documentation | |||
... | |||
}}</includeonly> | |||
</pre> | |||
Et dans les pages : | |||
{{ | <pre> | ||
| | {{InfoPlugin | ||
|description=Plugin de construction avancé | |||
|documentation=https://example.com/doc | |documentation=https://example.com/doc | ||
|version=1.2.3 | |||
}} | }} | ||
{{Short description|Plugin Minecraft pour construction}} | |||
Le reste du contenu... | |||
</pre> | </pre> | ||
=== | === Ordre d'extraction === | ||
* [ | |||
* | Quand tu utilises : | ||
<pre> | |||
|shortdesc=yes | |||
|infobox=InfoPlugin | |||
|champs=description,documentation | |||
</pre> | |||
Les %PAGESEL:n% correspondent à : | |||
* '''%PAGESEL:1%''' = Short description | |||
* '''%PAGESEL:2%''' = InfoPlugin.description | |||
* '''%PAGESEL:3%''' = InfoPlugin.documentation | |||
=== Paramètres DPL4 avancés === | |||
Tous les paramètres [https://www.mediawiki.org/wiki/Extension:DynamicPageList4 DPL4] sont supportés : | |||
* '''redirects''', '''stablepages''', '''qualitypages''' | |||
* '''minrevisions''', '''maxrevisions''', '''minoredits''' | |||
* '''modifiedby''', '''createdby''', '''lastmodifiedby''' | |||
* '''imageused''', '''imagecontainer''' | |||
* '''replaceintitle''', '''titlemaxlength''' | |||
* '''dominantsection''', '''headingmode''' | |||
* '''escapelinks''', '''shownamespace''' | |||
* '''allowcachedresults''', '''reset''', '''eliminate''' | |||
=== Dépannage === | |||
==== Aucun résultat ==== | |||
1. Vérifie que les pages sont dans la bonne catégorie | |||
2. Active '''debug=true''' | |||
3. Vérifie le nom de l'infobox | |||
==== Extraction vide ==== | |||
1. Vérifie que le template {{Short description}} existe | |||
2. Vérifie le format de ton infobox | |||
3. Utilise '''debug=true''' pour voir les valeurs extraites | |||
==== Performance ==== | |||
* Limite avec '''count''' | |||
* Active le cache : '''cache=true''' | |||
* Évite '''includematchparsed''' sur beaucoup de pages | |||
[[Catégorie:Modèle | [[Catégorie:Modèle]] | ||
[[Catégorie: | [[Catégorie:DPL]] | ||
</noinclude> | </noinclude> |
Dernière version du 6 octobre 2025 à 19:26
Documentation
Modèle universel pour DynamicPageList4 avec extraction automatique de contenu.
Paramètres simplifiés
Sélection
Paramètre | Alias | Description | Exemple |
---|---|---|---|
category | Catégorie(s) | Plugin installé | |
notcategory | Exclure catégorie(s) | Plugin obsolète | |
namespace | Namespace(s) | Template | |
titlematch | Pattern du titre | World% | |
linksto | Liens vers | Architecte | |
uses | Utilise template | Template:InfoPlugin |
Tri et limite
Paramètre | Alias | Description | Valeurs |
---|---|---|---|
ordermethod | tri | Méthode de tri | title, lastedit, created, category, popularity |
order | ordre | Ordre | ascending, descending |
count | limite | Nombre max | 100 |
offset | Décalage | 20 |
Format d'affichage
Paramètre | Alias | Description | Valeurs |
---|---|---|---|
format | Format global | tableau, liste, puces, numerotee, inline, category, userformat | |
intro | debut | Texte avant | <div class="liste"> |
outro | fin | Texte après | </div> |
separator | separateur | Entre items | <hr> |
columns | colonnes | Nombre colonnes | 3 |
Extraction de contenu
Paramètre | Description | Exemple |
---|---|---|
shortdesc | Extraire Short description | yes |
infobox | Template infobox | InfoPlugin |
champs | Champs de l'infobox | description,documentation |
include | Inclusion manuelle | {InfoPlugin}:description,#REDIRECT |
Variables disponibles
Dans format, tablerow ou listseparators :
- %PAGE% : nom de la page
- %TITLE% : titre affiché
- %NAMESPACE% : namespace
- %IMAGE% : première image
- %EXTERNALLINK% : premier lien externe
- %SIZE% : taille en octets
- %AUTHOR% : créateur
- %DATE% : date création
- %LASTEDIT% : dernière modification
- %PAGESEL% : contenu extrait (via include)
- %PAGESEL:n% : n-ième élément extrait
Exemples d'utilisation
1. Liste simple avec Short description
{{Liste |category=Plugin installé |shortdesc=yes |format=* [[%PAGE%]] — %PAGESEL:1% }}
2. Tableau avec données d'infobox
{{Liste |category=Plugin installé |format=tableau |infobox=InfoPlugin |champs=description,documentation |colonnes_noms=Plugin !! Description !! Documentation |lignetableau={{!}}- {{!}} [[%PAGE%]] {{!}}{{!}} %PAGESEL:1% {{!}}{{!}} [%PAGESEL:2% Lien] }}
3. Cartes en grille avec shortdesc
{{Liste |category=Plugin installé |shortdesc=yes |tri=lastedit |ordre=descending |intro=<div style="display:grid; grid-template-columns:repeat(auto-fill, minmax(300px, 1fr)); gap:20px;"> |format=<div style="border:1px solid #ddd; padding:15px;"> <h3>[[%PAGE%]]</h3> <p>%PAGESEL:1%</p> <small>Modifié: %LASTEDIT%</small> </div> |outro=</div> |separateur= }}
4. Tableau complet plugins avec tout
{{Liste |category=Plugin installé |shortdesc=yes |infobox=InfoPlugin |champs=description,documentation,version |format=tableau |tableintro={{{!}} class="wikitable sortable" ! Plugin !! Short Desc !! Description !! Doc !! Version !! Taille !! Dernière modif |lignetableau={{!}}- {{!}} [[%PAGE%]] {{!}}{{!}} %PAGESEL:1% {{!}}{{!}} %PAGESEL:2% {{!}}{{!}} {{#if:%PAGESEL:3%|[%PAGESEL:3% 📄]|—}} {{!}}{{!}} %PAGESEL:4% {{!}}{{!}} %SIZE% octets {{!}}{{!}} %LASTEDIT% |tri=title |limite=100 }}
5. Liste avec regex d'extraction
{{Liste |category=Plugin installé |includematch=/\|description=(.*?)[\n\|]/s |format=* [[%PAGE%]]: %PAGESEL:1% }}
6. Mode category (galerie)
{{Liste |category=Plugin installé |format=category |tri=category |colonnes=4 }}
7. Recherche textuelle
{{Liste |category=Plugin installé |includematchparsed=/world|construction/i |shortdesc=yes |format=puces }}
8. Top 10 pages modifiées
{{Liste |category=Plugin installé |tri=lastedit |ordre=descending |limite=10 |format=numerotee }}
9. Extraction multiple avec shortdesc
{{Liste |category=Grade |shortdesc=yes |infobox=InfoGrade |champs=couleur,permissions |intro=<div class="grades"> |format=<div class="grade" style="border-left:4px solid %PAGESEL:2%;"> <h3>[[%PAGE%]]</h3> <p><strong>Description:</strong> %PAGESEL:1%</p> <p><strong>Permissions:</strong> %PAGESEL:3%</p> </div> |outro=</div> |separateur= }}
10. Debug mode
{{Liste |category=Plugin installé |shortdesc=yes |debug=true |limite=5 }}
Format des infobox requis
Pour que l'extraction fonctionne, structure tes infobox ainsi :
<includeonly>{{#tag:dpl| ...paramètres... include={{{1|InfoPlugin}}}:description,{{{1|InfoPlugin}}}:documentation ... }}</includeonly>
Et dans les pages :
{{InfoPlugin |description=Plugin de construction avancé |documentation=https://example.com/doc |version=1.2.3 }} {{Short description|Plugin Minecraft pour construction}} Le reste du contenu...
Ordre d'extraction
Quand tu utilises :
|shortdesc=yes |infobox=InfoPlugin |champs=description,documentation
Les %PAGESEL:n% correspondent à :
- %PAGESEL:1% = Short description
- %PAGESEL:2% = InfoPlugin.description
- %PAGESEL:3% = InfoPlugin.documentation
Paramètres DPL4 avancés
Tous les paramètres DPL4 sont supportés :
- redirects, stablepages, qualitypages
- minrevisions, maxrevisions, minoredits
- modifiedby, createdby, lastmodifiedby
- imageused, imagecontainer
- replaceintitle, titlemaxlength
- dominantsection, headingmode
- escapelinks, shownamespace
- allowcachedresults, reset, eliminate
Dépannage
Aucun résultat
1. Vérifie que les pages sont dans la bonne catégorie 2. Active debug=true 3. Vérifie le nom de l'infobox
Extraction vide
1. Vérifie que le template Modèle:Short description existe 2. Vérifie le format de ton infobox 3. Utilise debug=true pour voir les valeurs extraites
Performance
- Limite avec count
- Active le cache : cache=true
- Évite includematchparsed sur beaucoup de pages