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



YumeWiki
3,036Articles

Template:VersionHistory: Difference between revisions

(reverted change to image format. it turns out the link part was breaking it. vh once again has no dependencies)
(setup for associating version and date)
Line 4: Line 4:
   --><div style="clear:both;"></div></div></div><!-- Clear, remove bottom border div, remove main box div
   --><div style="clear:both;"></div></div></div><!-- Clear, remove bottom border div, remove main box div
   --><h3><!-- Open header
   --><h3><!-- Open header
      -->{{#switch:{{NAMESPACENUMBER}}<!-- Switch for version label
  -->{{#switch:{{NAMESPACENUMBER}}<!-- Switch for version label
      -->|3014=Ver<!-- Uneven Dream
  -->|3014=Ver<!-- Uneven Dream
      -->|Version&#32;<!--
  -->|Version&#32;<!--
      -->}}<!-- End switch for version label
  -->}}<!-- End switch for version label
   -->{{{1}}}</h3><!-- Close header
   -->{{{1}}}</h3><!-- Close header
   --><div style="border:4px solid #b2af9c;><!-- Open main box div
   --><div style="border:4px solid #b2af9c;><!-- Open main box div
      -->{{#if:{{{2|}}}<!-- Check for images
  -->{{#if:{{{2|}}}<!-- Check for images
       -->|<div id="mw-content" class="floatleft" style="padding:12px;padding-bottom:1px;margin-right:2%;font-size:1px;"><!-- Open image div
  -->|<!-- If there are images:
        -->{{#arraymap:{{{2}}}|,|?|[[File:{{#sub:?|0|{{#pos:?|(}}}}{{!}}left{{!}}border{{!}}370x370px{{!}}{{#if:{{#pos:?|(}}|link={{NAMESPACE}}:{{#replace:{{#sub:?|{{#expr:1 + {{#pos:?|(}}}}}}|)|}}}}]]|\n}}<!-- Array for images and their annotations
       --><div id="mw-content" class="floatleft" style="padding:12px;padding-bottom:1px;margin-right:2%;font-size:1px;"><!-- Open image div
      --></div><!-- Close image div
      -->{{#arraymap:{{{2}}}|,|?|[[File:{{#explode:?|(|0}}{{!}}left{{!}}border{{!}}370px{{!}}{{#if:{{#explode:?|(|1}}|link={{NAMESPACE}}:{{#replace:{{#explode:?|(|1}}|)|}}}}]]|\n}}<!-- Array for images and their annotations
      -->}}<!-- End image check
  --></div><!-- Close image div
  -->}}<!-- End image check
  --><!--{{#subobject:<!-- since we know it's a version--><!--
|Version = {{{1|}}}
|Version/Type = version
|Version/Author = {{{3|}}}|+sep=,
|Version/Date = {{{4|}}}
}}<!--
-->|</div><!-- If patch, close div of border bottom from previous template use
-->|</div><!-- If patch, close div of border bottom from previous template use
-->}}<!-- End check for dot
  --><!--{{#subobject:<!-- patches get a subobject too--><!--
|Version = {{{1|}}}
|Version/Type = patch
|Version/Author = {{{2|}}}|+sep=,
|Version/Date = {{{3|}}}
}}<!--
-->}}<!-- 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:{{{4|}}}<!-- Check if version
-->{{#if:{{{4|}}}<!-- Version check
   -->|<!-- If version
-->|<!-- nothing if version
      -->{{#if:{{{3|}}}<!-- Only place authors list if one is specified
-->|<!-- if patch:
      -->|'''Contributing Authors:''' <!-- Space here
   --><b><!-- bold it
        -->{{#arraymap:{{{3}}}<!-- Array categories
  -->{{#if:{{#explode:{{{1}}}|patch|1}}<!-- returns empty if the word patch isn't in
        -->|,|#|[[:Category:#|#]]|,&#32;}}<!-- End array usage
  -->|Patch {{#explode:{{{1}}}|patch|1}}<!-- normal patch stuff
      --><br><!-- Separate author list and date with newline
  -->|{{{1}}}<!-- put raw input
      -->}}<!-- End author check
  -->}}<!-- End type of prepending
  -->|<b>{{#tag:nowiki|Patch {{{1|}}} / }}<!-- If patch, prepend text using the patch number
  --> / </b><!-- separate with a slash and unbold
      -->{{#if:{{{2|}}}<!-- Only place authors list if one is specified
-->}}<!-- End version check
      -->|Contributing Authors:</b> <!-- Space here
-->{{#if: {{#if:{{{4|}}}|{{{3|}}}|{{{2|}}}}}<!-- If theres an author
        -->{{#arraymap:{{{2}}}<!-- Array categories
-->|'''Contributing Authors:''' <!-- Space here
        -->|,|#|[[:Category:#|#]]|,&#32;}}<!-- End array usage
  -->{{#arraymap:{{#if:{{{4|}}}|{{{3|}}}|{{{2|}}}}}<!-- Array categories
      --><br><!-- Separate author list and date with newline
  -->|,|#|[[:Category:#|#]]|,\s}}<!-- End array usage
      -->|</b><!-- Ensure you close bolding even if no author
  --><br><!-- Separate author list and date with newline
      -->}}<!-- End author check
-->}}<!-- End version+author check
  -->}}<!-- End version check
-->'''Release Date:''' {{{4|{{{3|}}}}}}<!--
-->'''Release Date:''' {{{4|{{{3|}}}}}}<!--
--></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>
--></includeonly><noinclude>{{documentation}}</noinclude>
 
use in a version history page like this
<pre>{{vh
|0.100a
|example.png (Example World), two.png (Another World)
|author1, author2
|1999/09/19}}
*text
*text
...
</pre>
or for patches like this
<pre>{{vh
|2
|author1, author2
|1999/09/29}}
*text
*text
...
</pre>
If there is normal page content below a usage of this template, put a couple <nowiki></div></nowiki> in there to stop the css from bleeding onto it
 
[[Template:VersionHistory/Images]]
 
[[Template:VersionHistory/Category]]
 
 
[[Category:Formatting templates]]
</noinclude>

Revision as of 22:31, 4 July 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
…