×
Create a new article
Write your page title here:
We currently have 3,065 articles on YumeWiki. Type your article name above or click on one of the titles below and start writing!



YumeWiki
3,065Articles

Template:VersionHistory: Difference between revisions

(use --box-border css var for border color)
(use the subobject code (and added more to it))
Line 2: Line 2:
-->{{#if: {{#explode:{{lc:{{{1}}}}}|patch|1}}<!-- If it has the word "patch" return a value
-->{{#if: {{#explode:{{lc:{{{1}}}}}|patch|1}}<!-- If it has the word "patch" return a value
-->|</div><!-- If patch, close div of border bottom from previous template use
-->|</div><!-- If patch, close div of border bottom from previous template use
   --><!--{{#subobject:<!-- patches get a subobject too--><!--
   -->{{#subobject:<!-- patches get a subobject too-->
|Version = {{{1|}}}
|Version = {{{1|}}}
|Version/Type = patch
|Version/Type = patch
|Version/Author = {{{2|}}}|+sep=,
|Is part of game = {{NAMESPACE}}
|Has contributing author = {{{2|}}}|+sep=,
|Version/Date = {{{3|}}}
|Version/Date = {{{3|}}}
}}<!--
}}<!--
Line 22: Line 23:
   --></div><!-- Close image div
   --></div><!-- Close image div
   -->}}<!-- End image check
   -->}}<!-- End image check
   --><!--{{#subobject:<!-- since we know it's a version--><!--
   -->{{#subobject:<!-- since we know it's a version-->
|Version = {{{1|}}}
|Version = {{{1|}}}
|Version/Type = version
|Version/Type = version
|Version/Author = {{{3|}}}|+sep=,
|Version/Image = {{#arraymap:{{{2}}}|,|?|{{#explode:?|(|0}}|?}}|+sep=?
|Is part of game = {{NAMESPACE}}
|Has contributing author = {{{3|}}}|+sep=,
|Version/Date = {{{4|}}}
|Version/Date = {{{4|}}}
}}<!--
}}<!--

Revision as of 20:02, 8 September 2024

Documentation (for the above template, sometimes hidden or invisible)

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.

Template parameters

This template has custom formatting.

ParameterDescriptionTypeStatus
Version/Patch1

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.

Example
0.120d patch 3
Linerequired
Images/Author2

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.

Linesuggested
Author/Release Date3

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.

Linesuggested
Release Date/Nothing4

If a version, add the release date. It's recommended to use YYYY/MM/DD. Do not include a fourth parameter for patches.

Lineoptional

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
…