The first video in the TASBot Re: (TASBot Revisited) series is out! TASBot Re: Gradius covers our first run from AGDQ 2014.

Historians wanted: Inquire here.

Template:Format run data: Difference between revisions

Template page
m (Pass through lookup ID as anchor param)
Tag: 2017 source edit
m (Add docs and TemplateData)
Tag: 2017 source edit
Line 1: Line 1:
<onlyinclude><includeonly>{{#switch:{{{2|}}}
<onlyinclude><includeonly>{{#switch:{{{2|}}}
|SML2 Memory Tour={{{{{1|showcase}}}
|SML2 Memory Tour={{{{{1|showcase}}}
|anchor={{{2}}}
|anchor={{{2}}}
Line 15: Line 16:
|tasvideos-movie-value=/Userfiles/Info/31714711949576163
|tasvideos-movie-value=/Userfiles/Info/31714711949576163
}}
}}
|VVVVVV={{{{{1|showcase}}}
|VVVVVV={{{{{1|showcase}}}
|anchor={{{2}}}
|anchor={{{2}}}
Line 30: Line 32:
|tasvideos-movie-value=2715
|tasvideos-movie-value=2715
}}
}}
|#default={{t|format run data}}: <span style="color: red;">No such run "{{{2|}}}"</span>}}</includeonly></onlyinclude>
|#default={{t|format run data}}: <span style="color: red;">No such run "{{{2|}}}"</span>}}</includeonly></onlyinclude>
Calls another template of your choosing with the data about the specified run as template arguments.
The first parameter to this template is the name of the template to call, and the second is the ID of the run to look up.
For example, <code><nowiki>{{format run data|showcase|SML2 Memory Tour}}</nowiki></code> produces:
{{format run data|showcase|SML2 Memory Tour}}
...equivalent to this call:
<pre><nowiki>
{{showcase
|anchor=SML2 Memory Tour
|author={{TASVideosU|link_7777}}
|game-name=Super Mario Land 2
|lead=[[dwangoAC]]
|platform={{TASVideos|/Platforms#GameBoy|Game Boy}}
|presenter=dwangoAC, link_7777
|recording={{YouTube video|1GF_LFPz34U|TASVideos (YouTube)}}, {{YouTube video|1=EHfw-BEuRO8?time_continue=429|2=GDQ (YouTube)}}
|run-branch=Memory Tour Showcase
|tasvideos-game=452
|tasvideos-movie-template=TASVideos
|tasvideos-movie-value=/Userfiles/Info/31714711949576163
}}
</nowiki></pre>
This page holds only the [[metawikimedia:Help:Array|data]]; the specified template (can be in any namespace) must provide the "implementation".
Passing e.g. <code>:Page/subpage</code> as the first argument will transclude a main namespace article, as per usual.
The "callback" template can make use of the following parameters:
* <code>anchor</code>: (always present) The same ID passed to this template for the lookup. The intention is to use the same ID as a section anchor, as {{t|showcase}} does.
* <code>appearance</code>: (always present) The name of the relevant event appearance page, or the name of a redirect to it.
* <code>author</code>: (always present) A rich text list of the run/playaround's authors.
* <code>game-name</code>: (always present) The full name of the game.
* <code>game-pub-year</code>: (always present) The year the game was published.
* <code>lead</code>: (always present) A rich text list of the people who oversaw the presentation at the event.
* <code>platform</code>: (always present) The system/platform the game is for, currently as rich text.
* <code>presenter</code>: (always present) A rich text list of the people who presented at the event.
* <code>recording</code>: (always present) A rich text list of links to videos.
* <code>run-branch</code>: (always present) The 'branch' or 'goal' of the run, e.g. <q>100%</q>, <q>credits warp</q>, <q>playaround</q>.
* <code>tasvideos-game</code>: (always present) The game's ID on TASVideos (without the 'G' suffix).
* <code>tasvideos-movie-template</code>: (always present) The name of one of the {{t|TASVideos}} family of templates, e.g. <code>TASVideosM</code>.
* <code>tasvideos-movie-value</code>: (always present) Depending on the value of <code>tasvideos-movie-template</code>:
** when it's {{t|TASVideosM}}, this is the run's publication ID on TASVideos (without the 'M' suffix);
** when it's {{t|TASVideos}}, this is the relative URI of some page on TASVideos that pertains to this run (i.e. without the <code>https://tasvideos.org</code> prefix);
** in any case it should be passed on to the template specified by <code>tasvideos-movie-template</code> without processing.
<templatedata>
{
"params": {
"1": {
"label": "Callback Template Name",
"description": "name of template or article to be transcluded with data as arguments",
"type": "wiki-page-name",
"default": "showcase",
"suggested": true
},
"2": {
"label": "Run 'Lookup' ID",
"description": "the string that uniquely identifies a particular presentation of a run/playaround",
"type": "string",
"required": true
}
},
"description": "Calls another template of your choosing with the data about the specified run as template arguments.",
"paramOrder": [
"1",
"2"
],
"format": "inline"
}
</templatedata>

Revision as of 09:08, 11 November 2023


Calls another template of your choosing with the data about the specified run as template arguments. The first parameter to this template is the name of the template to call, and the second is the ID of the run to look up. For example, {{format run data|showcase|SML2 Memory Tour}} produces:

Super Mario Land 2 Memory Tour Showcase
Game(s) Super Mario Land 2
Platform(s) [https://tasvideos.org/Platforms#GameBoy Game Boy]
Author(s) link_7777
Lead(s) dwangoAC
Presenter(s) dwangoAC, link_7777
Video(s) TASVideos (YouTube), GDQ (YouTube)

...equivalent to this call:

{{showcase
|anchor=SML2 Memory Tour
|author={{TASVideosU|link_7777}}
|game-name=Super Mario Land 2
|lead=[[dwangoAC]]
|platform={{TASVideos|/Platforms#GameBoy|Game Boy}}
|presenter=dwangoAC, link_7777
|recording={{YouTube video|1GF_LFPz34U|TASVideos (YouTube)}}, {{YouTube video|1=EHfw-BEuRO8?time_continue=429|2=GDQ (YouTube)}}
|run-branch=Memory Tour Showcase
|tasvideos-game=452
|tasvideos-movie-template=TASVideos
|tasvideos-movie-value=/Userfiles/Info/31714711949576163
}}

This page holds only the data; the specified template (can be in any namespace) must provide the "implementation". Passing e.g. :Page/subpage as the first argument will transclude a main namespace article, as per usual.

The "callback" template can make use of the following parameters:

  • anchor: (always present) The same ID passed to this template for the lookup. The intention is to use the same ID as a section anchor, as {{showcase}} does.
  • appearance: (always present) The name of the relevant event appearance page, or the name of a redirect to it.
  • author: (always present) A rich text list of the run/playaround's authors.
  • game-name: (always present) The full name of the game.
  • game-pub-year: (always present) The year the game was published.
  • lead: (always present) A rich text list of the people who oversaw the presentation at the event.
  • platform: (always present) The system/platform the game is for, currently as rich text.
  • presenter: (always present) A rich text list of the people who presented at the event.
  • recording: (always present) A rich text list of links to videos.
  • run-branch: (always present) The 'branch' or 'goal' of the run, e.g. 100%, credits warp, playaround.
  • tasvideos-game: (always present) The game's ID on TASVideos (without the 'G' suffix).
  • tasvideos-movie-template: (always present) The name of one of the {{TASVideos}} family of templates, e.g. TASVideosM.
  • tasvideos-movie-value: (always present) Depending on the value of tasvideos-movie-template:
    • when it's {{TASVideosM}}, this is the run's publication ID on TASVideos (without the 'M' suffix);
    • when it's {{TASVideos}}, this is the relative URI of some page on TASVideos that pertains to this run (i.e. without the https://tasvideos.org prefix);
    • in any case it should be passed on to the template specified by tasvideos-movie-template without processing.

Calls another template of your choosing with the data about the specified run as template arguments.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Callback Template Name1

name of template or article to be transcluded with data as arguments

Default
showcase
Page namesuggested
Run 'Lookup' ID2

the string that uniquely identifies a particular presentation of a run/playaround

Stringrequired