m (make images float to right) |
(remove div closing, now you require Template:vhend + change how to check for patch to support making the desc a parameter) |
||
Line 1: | Line 1: | ||
<includeonly><!-- | <includeonly><!-- | ||
-->{{#if:{{{ | -->{{#if: {{#explode:{{{1}}}|patch|1}}<!-- If it has the word "patch" return a value | ||
-->|</div><!-- If patch, close div of border bottom from previous template use | |||
--><!--{{#subobject:<!-- patches get a subobject too--><!-- | |||
|Version = {{{1|}}} | |||
|Version/Type = patch | |||
|Version/Author = {{{2|}}}|+sep=, | |||
|Version/Date = {{{3|}}} | |||
}}<!-- | |||
-->|<!-- If version: | -->|<!-- If version: | ||
--><h3><!-- Open header | --><h3><!-- Open header | ||
-->{{#switch:{{NAMESPACENUMBER}}<!-- Switch for version label | -->{{#switch:{{NAMESPACENUMBER}}<!-- Switch for version label | ||
Line 21: | Line 27: | ||
|Version/Author = {{{3|}}}|+sep=, | |Version/Author = {{{3|}}}|+sep=, | ||
|Version/Date = {{{4|}}} | |Version/Date = {{{4|}}} | ||
}}<!-- | }}<!-- | ||
-->}}<!-- End version check | -->}}<!-- End version check | ||
The below is common to every template usage | The below is common to every template usage | ||
--><div style="display:table-cell;padding:6px 10px;"><!-- Div for author and date info | --><div style="display:table-cell;padding:6px 10px;"><!-- Div for author and date info | ||
-->{{#if:{{{ | -->{{#if:{{#explode:{{{1}}}|patch|1}}<!-- Version check | ||
-->|<!-- if patch: | -->|<!-- if patch: | ||
--><b> | --><b>Patch {{#explode:{{{1}}}|patch|1}} / </b><!-- separate with a slash and unbold | ||
-->}}<!-- End version check | -->}}<!-- End version check | ||
-->{{#if: {{#if:{{{ | -->{{#if: {{#if:{{#explode:{{{1}}}|patch|1}}|{{{2|}}}|{{{3|}}}}}<!-- If theres an author | ||
-->|'''Contributing Authors:''' <!-- Space here | -->|'''Contributing Authors:''' <!-- Space here | ||
-->{{#arraymap:{{#if:{{{ | -->{{#arraymap:{{#if:{{#explode:{{{1}}}|patch|1}}|{{{2|}}}|{{{3|}}}}}<!-- Array categories | ||
-->|,|#|[[:Category:#|#]]|,\s}}<!-- End array usage | -->|,|#|[[:Category:#|#]]|,\s}}<!-- End array usage | ||
--><br><!-- Separate author list and date with newline | --><br><!-- Separate author list and date with newline | ||
-->}}<!-- End version+author check | -->}}<!-- End version+author check | ||
-->'''Release Date:''' {{{ | -->'''Release Date:''' {{#if:{{#explode:{{{1}}}|patch|1}}|{{{3|}}}|{{{4|}}}}}<!-- | ||
--></div><!-- Close div of author and date info | --></div><!-- Close div of author and date info | ||
--><div style="padding:6px 10px;border-bottom:1px solid #a2a9b1;border-top:1px solid #a2a9b1;"><!-- Open div for bottom border of box, above text | --><div style="padding:6px 10px;border-bottom:1px solid #a2a9b1;border-top:1px solid #a2a9b1;"><!-- Open div for bottom border of box, above text | ||
--></includeonly><noinclude>{{documentation}}</noinclude> | --></includeonly><noinclude>{{documentation}}</noinclude> |
Revision as of 12:01, 7 July 2024
Description
This template is used to format version history and changelogs in a consistent and accessible manner.
Usage
For a version, the template is called using {{vh}} and ended with {{vhend}}. Patches are placed in between the main {{vh}} call and the {{vhend}}, but still use {{vh}}.
The template aims to format the list in a fluid and responsive manner that supports varying screen sizes. It was made in response to the old table style of changelogs causing issues on mobile devices.
Patches must include the word "patch" in order to be formatted correctly, in the format [version] patch [patch_number]
. This may be unideal for games with irregular patch schemes. Changes to this system (that do not break existing uses of the template) would be welcome.
There is an unused data component in the template that would add version data to the API. It is disabled as the data is redundant except release date.
Parameters
Version History lists. Fluid structure.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Version/Patch | 1 | The full name of the version or patch. Patches are recognised if this parameter has "patch" in the input. This changes what the following parameters do.
| Line | required |
Images/Author | 2 | If a version, specify images in the form "Filename.png (Page Name), File2…". If a patch, add a list of author names, or leave blank if it's a solo game. | Line | suggested |
Author/Release Date | 3 | If a version, add a list of author names, or leave blank if it's a solo game. If a patch, add the release date. It's recommended to use YYYY/MM/DD. | Line | suggested |
Release Date/Nothing | 4 | If a version, add the release date. It's recommended to use YYYY/MM/DD. Do not include a fourth parameter for patches. | Line | optional |
Sample
This is an example on how the template can be used:
This page lists the version history of <some game>. {{vh |0.02 |SnowyWorld.png (Snowy World) |PersonA, PersonB |2020/04/19 }} *Changed a warp *Added Snowy World **Accessed from another world *etc {{vh |0.02 patch 1 |PersonB |2020/04/25 }} *Fixed an issue {{vhend}} {{vh |0.01 …