Template:Mod List: Difference between revisions
mNo edit summary |
mNo edit summary |
||
(10 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly><tabber> | <includeonly><tabber> | ||
|-|Alphabetical= | |-|Alphabetical= | ||
{{#ifexpr: {{PAGESINCAT: {{ | {{#ifexpr: {{PAGESINCAT: {{#replace:{{{1}}}|category = |}}}} {{#if: {{{3}}}|- {{PAGESINCAT: {{#replace:{{{2}}}|notcategory = |}}}}|}} {{#if: {{{4}}}|- {{PAGESINCAT: {{#replace:{{{3}}}|notcategory = |}}}}|}} {{#if: {{{5}}}|- {{PAGESINCAT: {{#replace:{{{4}}}|notcategory = |}}}}|}} {{#if: {{{6}}}|- {{PAGESINCAT: {{#replace:{{{5}}}|notcategory = |}}}}|}} {{#if: {{{7}}}|- {{PAGESINCAT: {{#replace:{{{6}}}|notcategory = |}}}}|}} {{#if: {{{8}}}|- {{PAGESINCAT: {{#replace:{{{7}}}|notcategory = |}}}}|}} {{#if: {{{9}}}|- {{PAGESINCAT: {{#replace:{{{8}}}|notcategory = |}}}}|}} {{#if: {{{10}}}|- {{PAGESINCAT: {{#replace:{{{9}}}|notcategory = |}}}}|}} {{#if: {{{11}}}|- {{PAGESINCAT: {{#replace:{{{10}}}|notcategory = |}}}}|}} > 6 | <div class="dplcategory">}}{{#if:{{{forceclass|}}}|<div class="dplcategory">|}} | ||
{{#dpl: | {{#dpl: | ||
|{{{ | |{{{1}}} | ||
|{{{ | |{{{2}}} | ||
|{{{ | |{{{3}}} | ||
|{{{ | |{{{4}}} | ||
|{{{ | |{{{5}}} | ||
|{{{ | |{{{6}}} | ||
|{{{ | |{{{7}}} | ||
|{{{ | |{{{8}}} | ||
|{{{ | |{{{9}}} | ||
|{{{ | |{{{10}}} | ||
|{{{ | |{{{11}}} | ||
| | |{{{12}}} | ||
| | |{{{13}}} | ||
|{{{ | |{{{14}}} | ||
|format = ,\n* [[%PAGE%|%TITLE%]] | |{{{15}}} | ||
|{{{16}}} | |||
|{{{17}}} | |||
|{{{18}}} | |||
|{{{19}}} | |||
|{{{20}}} | |||
|{{{21}}} | |||
|{{{22}}} | |||
|{{{23}}} | |||
|{{{24}}} | |||
|{{{25}}} | |||
|ordermethod = title | |||
|format = ,\n* [[%PAGE%|%TITLE%]] ²{#ifeq:¦²{GETSHORTDESC:%PAGE%}²¦¦ - ²{GETSHORTDESC:%PAGE%}²}²,, | |||
}} | }} | ||
|-|Most Viewed= | |-|Most Viewed= | ||
{{#ifexpr: {{PAGESINCAT: {{ | {{#ifexpr: {{PAGESINCAT: {{#replace:{{{1}}}|category = |}}}} {{#if: {{{3}}}|- {{PAGESINCAT: {{#replace:{{{2}}}|notcategory = |}}}}|}} {{#if: {{{4}}}|- {{PAGESINCAT: {{#replace:{{{3}}}|notcategory = |}}}}|}} {{#if: {{{5}}}|- {{PAGESINCAT: {{#replace:{{{4}}}|notcategory = |}}}}|}} {{#if: {{{6}}}|- {{PAGESINCAT: {{#replace:{{{5}}}|notcategory = |}}}}|}} {{#if: {{{7}}}|- {{PAGESINCAT: {{#replace:{{{6}}}|notcategory = |}}}}|}} {{#if: {{{8}}}|- {{PAGESINCAT: {{#replace:{{{7}}}|notcategory = |}}}}|}} {{#if: {{{9}}}|- {{PAGESINCAT: {{#replace:{{{8}}}|notcategory = |}}}}|}} {{#if: {{{10}}}|- {{PAGESINCAT: {{#replace:{{{9}}}|notcategory = |}}}}|}} {{#if: {{{11}}}|- {{PAGESINCAT: {{#replace:{{{10}}}|notcategory = |}}}}|}} > 6 | <div class="dplcategory">}}{{#if:{{{forceclass|}}}|<div class="dplcategory">|}} | ||
{{#dpl: | {{#dpl: | ||
|{{{ | |{{{1}}} | ||
|{{{ | |{{{2}}} | ||
|{{{ | |{{{3}}} | ||
|{{{ | |{{{4}}} | ||
|{{{ | |{{{5}}} | ||
|{{{ | |{{{6}}} | ||
|{{{ | |{{{7}}} | ||
|{{{ | |{{{8}}} | ||
|{{{ | |{{{9}}} | ||
|{{{ | |{{{10}}} | ||
|{{{ | |{{{11}}} | ||
|ordermethod | |{{{12}}} | ||
|order | |{{{13}}} | ||
|addpagecounter | |{{{14}}} | ||
|{{{15}}} | |||
|{{{16}}} | |||
|{{{17}}} | |||
|{{{18}}} | |||
|{{{19}}} | |||
|{{{20}}} | |||
|{{{21}}} | |||
|{{{22}}} | |||
|{{{23}}} | |||
|{{{24}}} | |||
|{{{25}}} | |||
|ordermethod = counter | |||
|order = descending | |||
|addpagecounter = true | |||
|format = ,\n# [[%PAGE%|%TITLE%]] <small>(%COUNT% views)</small> ²{#ifeq:¦²{GETSHORTDESC:%PAGE%}²¦¦ - ²{GETSHORTDESC:%PAGE%}²}²,, | |format = ,\n# [[%PAGE%|%TITLE%]] <small>(%COUNT% views)</small> ²{#ifeq:¦²{GETSHORTDESC:%PAGE%}²¦¦ - ²{GETSHORTDESC:%PAGE%}²}²,, | ||
}} | }} | ||
|-|Recently Updated= | |-|Recently Updated= | ||
{{#ifexpr: {{PAGESINCAT: {{ | {{#ifexpr: {{PAGESINCAT: {{#replace:{{{1}}}|category = |}}}} {{#if: {{{3}}}|- {{PAGESINCAT: {{#replace:{{{2}}}|notcategory = |}}}}|}} {{#if: {{{4}}}|- {{PAGESINCAT: {{#replace:{{{3}}}|notcategory = |}}}}|}} {{#if: {{{5}}}|- {{PAGESINCAT: {{#replace:{{{4}}}|notcategory = |}}}}|}} {{#if: {{{6}}}|- {{PAGESINCAT: {{#replace:{{{5}}}|notcategory = |}}}}|}} {{#if: {{{7}}}|- {{PAGESINCAT: {{#replace:{{{6}}}|notcategory = |}}}}|}} {{#if: {{{8}}}|- {{PAGESINCAT: {{#replace:{{{7}}}|notcategory = |}}}}|}} {{#if: {{{9}}}|- {{PAGESINCAT: {{#replace:{{{8}}}|notcategory = |}}}}|}} {{#if: {{{10}}}|- {{PAGESINCAT: {{#replace:{{{9}}}|notcategory = |}}}}|}} {{#if: {{{11}}}|- {{PAGESINCAT: {{#replace:{{{10}}}|notcategory = |}}}}|}} > 6 | <div class="dplcategory">}}{{#if:{{{forceclass|}}}|<div class="dplcategory">|}} | ||
{{#dpl: | {{#dpl: | ||
|{{{ | |{{{1}}} | ||
|{{{ | |{{{2}}} | ||
|{{{ | |{{{3}}} | ||
|{{{ | |{{{4}}} | ||
|{{{ | |{{{5}}} | ||
|{{{ | |{{{6}}} | ||
|{{{ | |{{{7}}} | ||
|{{{ | |{{{8}}} | ||
|{{{ | |{{{9}}} | ||
|{{{ | |{{{10}}} | ||
|{{{ | |{{{11}}} | ||
|ordermethod = | |{{{12}}} | ||
|order | |{{{13}}} | ||
| | |{{{14}}} | ||
| | |{{{15}}} | ||
|format = ,\n* [[%PAGE%|%TITLE%]] <small>(% | |{{{16}}} | ||
|{{{17}}} | |||
|{{{18}}} | |||
|{{{19}}} | |||
|{{{20}}} | |||
|{{{21}}} | |||
|{{{22}}} | |||
|{{{23}}} | |||
|{{{24}}} | |||
|{{{25}}} | |||
|ordermethod = lastedit | |||
|minoredits = exclude | |||
|order = descending | |||
|addeditdate = true | |||
|userdateformat = Y-m-d | |||
|format = ,\n* [[%PAGE%|%TITLE%]] <small>(Last revision: %DATE%)</small> ²{#ifeq:¦²{GETSHORTDESC:%PAGE%}²¦¦ - ²{GETSHORTDESC:%PAGE%}²}²,, | |||
}} | }} | ||
|-|Recently Added= | |-|Recently Added= | ||
{{#ifexpr: {{PAGESINCAT: {{ | {{#ifexpr: {{PAGESINCAT: {{#replace:{{{1}}}|category = |}}}} {{#if: {{{3}}}|- {{PAGESINCAT: {{#replace:{{{2}}}|notcategory = |}}}}|}} {{#if: {{{4}}}|- {{PAGESINCAT: {{#replace:{{{3}}}|notcategory = |}}}}|}} {{#if: {{{5}}}|- {{PAGESINCAT: {{#replace:{{{4}}}|notcategory = |}}}}|}} {{#if: {{{6}}}|- {{PAGESINCAT: {{#replace:{{{5}}}|notcategory = |}}}}|}} {{#if: {{{7}}}|- {{PAGESINCAT: {{#replace:{{{6}}}|notcategory = |}}}}|}} {{#if: {{{8}}}|- {{PAGESINCAT: {{#replace:{{{7}}}|notcategory = |}}}}|}} {{#if: {{{9}}}|- {{PAGESINCAT: {{#replace:{{{8}}}|notcategory = |}}}}|}} {{#if: {{{10}}}|- {{PAGESINCAT: {{#replace:{{{9}}}|notcategory = |}}}}|}} {{#if: {{{11}}}|- {{PAGESINCAT: {{#replace:{{{10}}}|notcategory = |}}}}|}} > 6 | <div class="dplcategory">}}{{#if:{{{forceclass|}}}|<div class="dplcategory">|}} | ||
{{#dpl: | {{#dpl: | ||
|{{{ | |{{{1}}} | ||
|{{{ | |{{{2}}} | ||
|{{{ | |{{{3}}} | ||
|{{{ | |{{{4}}} | ||
|{{{ | |{{{5}}} | ||
|{{{ | |{{{6}}} | ||
|{{{ | |{{{7}}} | ||
|{{{ | |{{{8}}} | ||
|{{{ | |{{{9}}} | ||
|{{{ | |{{{10}}} | ||
|{{{ | |{{{11}}} | ||
|ordermethod | |{{{12}}} | ||
|order | |{{{13}}} | ||
| | |{{{14}}} | ||
| | |{{{15}}} | ||
|format = ,\n* [[%PAGE%|%TITLE%]] <small>(% | |{{{16}}} | ||
|{{{17}}} | |||
|{{{18}}} | |||
|{{{19}}} | |||
|{{{20}}} | |||
|{{{21}}} | |||
|{{{22}}} | |||
|{{{23}}} | |||
|{{{24}}} | |||
|{{{25}}} | |||
|ordermethod = firstedit | |||
|order = descending | |||
|addeditdate = true | |||
|userdateformat = Y-m-d | |||
|format = ,\n* [[%PAGE%|%TITLE%]] <small>(Added: %DATE%)</small> ²{#ifeq:¦²{GETSHORTDESC:%PAGE%}²¦¦ - ²{GETSHORTDESC:%PAGE%}²}²,, | |||
}} | }} | ||
{{# | </tabber></includeonly><noinclude> | ||
</ | A very inefficient template for generating mod lists. | ||
Uses [[mediawikiwiki:Extension:TabberNeue|TabberNeue]] to make 4 tabs: Alphabetical, Most Viewed, Recently Updated, and Recently Added. | |||
It then checks if the category has more than 6 mods (does this by taking the value of <code><nowiki>{{{1}}}</nowiki></code>, removing <code><nowiki>category = </nowiki></code> dpl3 uses, and then checks if <code><nowiki>{{{3}}}</nowiki></code> exists to determine if categories are being excluded in <code><nowiki>{{{2}}}</nowiki></code> - '''Note: this could be wrong, a different dpl3 function could be used instead somewhere, things could be put out of order, or the category used could have less entries than categories excluded. Use <code>forceclass=true</code> to force a list to use dplcategory''' - and if so subtracting the number of excluded categories from the number of included categories. This gets checked all the way to <code><nowiki>#if: {{{11}}}</nowiki></code>, or the 9 subtracted categories) and if so sets the class to dplcategory, which [[MediaWiki:Common.css]] will display as 2 columns. It checks 1 times per tab for a total of 4 checks per usage of this template. | |||
In each tab it uses [[mediawikiwiki:Extension:DynamicPageList3|DynamicPageList3]] to generate a list of mods based off category entries. DPL3 doesn't allow Magic words, so use parameters to make it easier to fill in the game page/category name. 25 parameter slots just in case a lot of categories need included/excluded. Output removes <code>Game name mods/</code> from the hyperlink text (if <code>replaceintitle</code> is correctly set), and adds <code><nowiki>{{SHORTDESC}}</nowiki></code> if it exists. | |||
Alphabetical: Ordered by page title. No extra formatting. | |||
Most Viewed: Ordered by view count, descending. Include <code>%COUNT%</code> in the display. | |||
Recently Updated: Ordered by last edit, excluding minor edits, descending. Include <code>%DATE%</code> in the display. | |||
Recently Added: Ordered by first edit, descending. Include <code>%DATE%</code> in the display. | |||
</noinclude> |
Latest revision as of 20:12, 8 March 2024
A very inefficient template for generating mod lists.
Uses TabberNeue to make 4 tabs: Alphabetical, Most Viewed, Recently Updated, and Recently Added.
It then checks if the category has more than 6 mods (does this by taking the value of {{{1}}}
, removing category =
dpl3 uses, and then checks if {{{3}}}
exists to determine if categories are being excluded in {{{2}}}
- Note: this could be wrong, a different dpl3 function could be used instead somewhere, things could be put out of order, or the category used could have less entries than categories excluded. Use forceclass=true
to force a list to use dplcategory - and if so subtracting the number of excluded categories from the number of included categories. This gets checked all the way to #if: {{{11}}}
, or the 9 subtracted categories) and if so sets the class to dplcategory, which MediaWiki:Common.css will display as 2 columns. It checks 1 times per tab for a total of 4 checks per usage of this template.
In each tab it uses DynamicPageList3 to generate a list of mods based off category entries. DPL3 doesn't allow Magic words, so use parameters to make it easier to fill in the game page/category name. 25 parameter slots just in case a lot of categories need included/excluded. Output removes Game name mods/
from the hyperlink text (if replaceintitle
is correctly set), and adds {{SHORTDESC}}
if it exists.
Alphabetical: Ordered by page title. No extra formatting.
Most Viewed: Ordered by view count, descending. Include %COUNT%
in the display.
Recently Updated: Ordered by last edit, excluding minor edits, descending. Include %DATE%
in the display.
Recently Added: Ordered by first edit, descending. Include %DATE%
in the display.