Difference between revisions of "VideoName"

From Sega Retro

(Created page with "<includeonly>{{{1|}}} {{{2|}}}</includeonly><noinclude> {{TODO}} This template generates a full name for a video, given a name and an episode number (either a number or a da...")
 
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{{{1|}}} {{{2|}}}</includeonly><noinclude>
+
<includeonly>{{#ifeq:{{{1|}}}|digitiser|{{#if:{{{novideoname|}}}|{{{2|}}}|''[[Digitiser]]'' (UK) {{#if:{{{2|}}}|([[Digitiser/Archive/{{#sub:{{{2|}}}|0|4}}|{{{2|}}}]])}}}}
 +
|{{#ifeq: {{{novideoname|}}} | yes || {{#cargo_query:
 +
tables=videonames
 +
|fields=code,name,link,country
 +
|where=code="{{{1|}}}"
 +
|default=
 +
|format=template
 +
|template=VideoName/Name
 +
}}}}{{clearvar|vname|vnum|vdate}}{{#if: {{{2|}}} | {{#cargo_query:
 +
tables=episodenames
 +
|fields=num,name,date,time
 +
|where=code="{{{1|}}}" AND num="{{{2|}}}"
 +
|default=
 +
|format=template
 +
|template=VideoName/Issue
 +
}}}}{{#ifeq:{{#var:vname}}|{{#var:vnum}}|{{clearvar|vname}}}} {{
 +
#if: {{#var:vname}}
 +
| {{#vardefine:vnamefull|"{{#var:vname}}"}}
 +
| {{#vardefine:vnamefull|}}
 +
}}{{#if:{{#var:vnum}}{{#var:vnum}}{{#var:vdate}}|{{#if: {{{2|}}} | {{#ifeq:{{{noepisodename|}}}|yes||{{#var:vnamefull}}{{#vardefine:vdate|({{#var:vdate}}, {{#var:vtime}})}}}} {{#ifeq:{{{nopubdate|}}}|yes|| {{#var:vdate}}}} }}|}}{{clearvar|vname|vnum|vdate|vtime}}}}</includeonly><noinclude>
 
{{TODO}}
 
{{TODO}}
  
Line 41: Line 60:
 
|<pre>{{VideoName|bums|12}}</pre>
 
|<pre>{{VideoName|bums|12}}</pre>
 
| {{VideoName|bums|12}}
 
| {{VideoName|bums|12}}
 +
|-
 +
|<pre>{{VideoName|digitiser|1995-01-01}}</pre>
 +
| {{VideoName|digitiser|1995-01-01}}
 +
|-
 +
|<pre>{{VideoName|digitiser|1995-01-01|novideoname=yes}}</pre>
 +
| {{VideoName|digitiser|1995-01-01|novideoname=yes}}
 
|}
 
|}
  
[[Category:Magazine templates]]</noinclude>
+
[[Category:Video templates]]</noinclude>

Latest revision as of 11:20, 27 April 2021


Clock.svg
This task is unfinished
This is a wiki task that requires more thought or peer review. An important issue that needs to be solved, which will appear at the top of Sega Retro:Todo until this message is removed.


This template generates a full name for a video, given a name and an episode number (either a number or a date).

Use

{{VideoName|<name>|<episodeno>|novideoname=|noepisodename=|nopubdate=}}

By default this returns a long string - parts can be omitted using the |no(x) fields.

Examples

Code Result
{{VideoName|gamesmastertv}}
GamesMaster (UK)
{{VideoName|gamesmastertv|1x01}}
GamesMaster (UK) "Series 1, episode 1" (1992-01-07, 24:00)
{{VideoName|gamesmastertv|1x01|novideoname=yes}}
"Series 1, episode 1" (1992-01-07, 24:00)
{{VideoName|gamesmastertv|1x01|noepisodename=yes}}
GamesMaster (UK) 1992-01-07
{{VideoName|gamesmastertv|1x01|nopubdate=yes}}
GamesMaster (UK) "Series 1, episode 1"
{{VideoName|gamesmastertv|1x01|novideoname=yes|nopubdate=yes}}
"Series 1, episode 1"
{{VideoName|gamesmastertv|1x01|novideoname=yes|noepisodename=yes}}
1992-01-07
{{VideoName|gamesmastertv|1x01|noepisodename=yes|nopubdate=yes}}
GamesMaster (UK)
{{VideoName|bums|12}}
{{VideoName|digitiser|1995-01-01}}
Digitiser (UK) (1995-01-01)
{{VideoName|digitiser|1995-01-01|novideoname=yes}}
1995-01-01