Difference between revisions of "MagazineName"
From Sega Retro
Line 3: | Line 3: | ||
|fields=code,name,link,country | |fields=code,name,link,country | ||
|where=code="{{{1|}}}" | |where=code="{{{1|}}}" | ||
+ | |default= | ||
|format=template | |format=template | ||
|template=MagazineName/Name | |template=MagazineName/Name | ||
Line 9: | Line 10: | ||
|fields=num,name,date,code | |fields=num,name,date,code | ||
|where=code="{{{1|}}}" AND num="{{{2|}}}" | |where=code="{{{1|}}}" AND num="{{{2|}}}" | ||
+ | |default= | ||
|format=template | |format=template | ||
|template=MagazineName/Issue | |template=MagazineName/Issue | ||
Line 15: | Line 17: | ||
| {{#vardefine:mnamefull|<nowiki>#</nowiki>{{#var:mnum}}: "{{#var:mname}}"}} | | {{#vardefine:mnamefull|<nowiki>#</nowiki>{{#var:mnum}}: "{{#var:mname}}"}} | ||
| {{#vardefine:mnamefull|<nowiki>#</nowiki>{{#var:mnum}}}} | | {{#vardefine:mnamefull|<nowiki>#</nowiki>{{#var:mnum}}}} | ||
− | }}{{#if: {{{2|}}} | {{#ifeq:{{{noissuename|}}}|yes||{{#var:mnamefull}}{{#vardefine:mdate|({{#var:mdate}})}}}} {{#ifeq:{{{nopubdate|}}}|yes|| {{#var:mdate}}}} }}{{clearvar|mname|mnum|mdate}}</includeonly><noinclude> | + | }}{{#if:{{#var:mnum}}{{#var:mnum}}{{#var:mdate}}|{{#if: {{{2|}}} | {{#ifeq:{{{noissuename|}}}|yes||{{#var:mnamefull}}{{#vardefine:mdate|({{#var:mdate}})}}}} {{#ifeq:{{{nopubdate|}}}|yes|| {{#var:mdate}}}} }}|}}{{clearvar|mname|mnum|mdate}}</includeonly><noinclude> |
This template generates a full name for a magazine, given a name and an issue number (either a number or a date). This saves having to look up precise release dates of magazines, and should greatly speed up the creation of lists of articles. | This template generates a full name for a magazine, given a name and an issue number (either a number or a date). This saves having to look up precise release dates of magazines, and should greatly speed up the creation of lists of articles. | ||
Line 51: | Line 53: | ||
|<pre>{{MagazineName|dmuk|12|noissuename=yes|nopubdate=yes}}</pre> | |<pre>{{MagazineName|dmuk|12|noissuename=yes|nopubdate=yes}}</pre> | ||
| {{MagazineName|dmuk|12|noissuename=yes|nopubdate=yes}} | | {{MagazineName|dmuk|12|noissuename=yes|nopubdate=yes}} | ||
+ | |- | ||
+ | |<pre>{{MagazineName|bums|12}}</pre> | ||
+ | | {{MagazineName|bums|12}} | ||
|} | |} | ||
[[Category:Magazine templates]]</noinclude> | [[Category:Magazine templates]]</noinclude> |
Revision as of 10:55, 15 September 2020
This template generates a full name for a magazine, given a name and an issue number (either a number or a date). This saves having to look up precise release dates of magazines, and should greatly speed up the creation of lists of articles.
Use
{{MagazineName|<name>|<issueno>|nomagname=|noissuename=|nopubdate=}} |
By default this returns a long string - parts can be omitted using the |no(x) fields.
Examples
Code | Result |
---|---|
{{MagazineName|dmuk}} |
Dreamcast Magazine (UK) |
{{MagazineName|dmuk|12}} |
Dreamcast Magazine (UK) #12: "No. 12" (2000-08-10) |
{{MagazineName|dmuk|12|nomagname=yes}} |
#12: "No. 12" (2000-08-10) |
{{MagazineName|dmuk|12|noissuename=yes}} |
Dreamcast Magazine (UK) 2000-08-10 |
{{MagazineName|dmuk|12|nopubdate=yes}} |
Dreamcast Magazine (UK) #12: "No. 12" |
{{MagazineName|dmuk|12|nomagname=yes|nopubdate=yes}} |
#12: "No. 12" |
{{MagazineName|dmuk|12|nomagname=yes|noissuename=yes}} |
2000-08-10 |
{{MagazineName|dmuk|12|noissuename=yes|nopubdate=yes}} |
Dreamcast Magazine (UK) |
{{MagazineName|bums|12}} |