Difference between revisions of "MagazineName"
From Sega Retro
(seems to work as intended) |
Scarred Sun (talk | contribs) m (Protected "Template:MagazineName": High-traffic template ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))) |
||
(5 intermediate revisions by 3 users not shown) | |||
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 | ||
− | }}}}{{#ifeq:{{#var:mname}}|{{#var:mnum}}|{{clearvar|mname}}}} | + | }}}}{{#ifeq:{{#var:mname}}|{{#var:mnum}}|{{clearvar|mname}}}} {{ |
− | {{#if: {{#var:mname}} | + | #if: {{#var:mname}} |
| {{#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}}}} }}</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 25: | Line 27: | ||
==Examples== | ==Examples== | ||
− | {| | + | {|class="prettytable" |
− | |<pre>{{MagazineName|dmuk}}</pre> | + | ! Code || Result |
− | | | + | |- |
− | + | | <pre>{{MagazineName|dmuk}}</pre> | |
− | + | | {{MagazineName|dmuk}} | |
− | + | |- | |
− | |||
|<pre>{{MagazineName|dmuk|12}}</pre> | |<pre>{{MagazineName|dmuk|12}}</pre> | ||
− | | | + | | {{MagazineName|dmuk|12}} |
− | + | |- | |
− | |||
− | |||
− | |||
|<pre>{{MagazineName|dmuk|12|nomagname=yes}}</pre> | |<pre>{{MagazineName|dmuk|12|nomagname=yes}}</pre> | ||
− | | | + | | {{MagazineName|dmuk|12|nomagname=yes}} |
− | + | |- | |
− | |||
− | |||
− | |||
|<pre>{{MagazineName|dmuk|12|noissuename=yes}}</pre> | |<pre>{{MagazineName|dmuk|12|noissuename=yes}}</pre> | ||
− | | | + | | {{MagazineName|dmuk|12|noissuename=yes}} |
− | + | |- | |
− | |||
− | |||
− | |||
|<pre>{{MagazineName|dmuk|12|nopubdate=yes}}</pre> | |<pre>{{MagazineName|dmuk|12|nopubdate=yes}}</pre> | ||
− | | | + | | {{MagazineName|dmuk|12|nopubdate=yes}} |
− | + | |- | |
− | |||
− | |||
− | |||
|<pre>{{MagazineName|dmuk|12|nomagname=yes|nopubdate=yes}}</pre> | |<pre>{{MagazineName|dmuk|12|nomagname=yes|nopubdate=yes}}</pre> | ||
− | | | + | | {{MagazineName|dmuk|12|nomagname=yes|nopubdate=yes}} |
− | + | |- | |
− | |||
− | |||
− | |||
|<pre>{{MagazineName|dmuk|12|nomagname=yes|noissuename=yes}}</pre> | |<pre>{{MagazineName|dmuk|12|nomagname=yes|noissuename=yes}}</pre> | ||
+ | | {{MagazineName|dmuk|12|nomagname=yes|noissuename=yes}} | ||
+ | |- | ||
+ | |<pre>{{MagazineName|dmuk|12|noissuename=yes|nopubdate=yes}}</pre> | ||
+ | | {{MagazineName|dmuk|12|noissuename=yes|nopubdate=yes}} | ||
+ | |- | ||
+ | |<pre>{{MagazineName|bums|12}}</pre> | ||
+ | | {{MagazineName|bums|12}} | ||
|} | |} | ||
− | |||
− | + | [[Category:Magazine templates]]</noinclude> | |
− | |||
− | |||
− |
Latest revision as of 18:34, 7 November 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}} |