Difference between revisions of "VideoName"

From Sega Retro

 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{{#ifeq: {{{novideoname|}}} | yes || {{#cargo_query:
+
<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
 
tables=videonames
 
|fields=code,name,link,country
 
|fields=code,name,link,country
Line 17: Line 18:
 
| {{#vardefine:vnamefull|"{{#var:vname}}"}}  
 
| {{#vardefine:vnamefull|"{{#var:vname}}"}}  
 
| {{#vardefine:vnamefull|}}  
 
| {{#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>
+
}}{{#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 59: 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:Video 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