Difference between revisions of "Template:Infobox album"

From The Wiki Camp 2
Jump to navigation Jump to search
(Undo revision 69154 by Chubs (talk))
Tag: Undo
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{{{{|safesubst:}}}#invoke:Unsubst-infobox||$params=italic_title,name,type,longtype,artist,cover,border,alt,caption,released,recorded,venue,studio,genre,length,language,label,director,producer,compiler,chronology,prev_title,prev_year,year,next_title,next_year,misc|$extra=italic_title,longtype,border,caption,language,director,compiler,chronology,year,misc|$aliases=italic title>italic_title,Italic title>italic_title,Name>name,Type>type,image>cover,Cover>cover,Border>border,Alt>alt,Caption>caption,Longtype>longtype,Artist>artist,Released>released,Recorded>recorded,Venue>venue,Studio>studio,Genre>genre,Length>length,Language>language,Label>label,Director>director,Producer>producer,Compiler>compiler,Chronology>chronology,Misc>misc|$flags=override|$B={{#ifeq:{{#invoke:Is infobox in lead|main|[Ii]nfobox [Aa]lbum}}|true|{{short description|{{#invoke:Plain text|main|{{#if:{{#invoke:string|match|{{{released|{{{release|}}}}}}|%d%d%d%d|ignore_errors = true}}|{{#invoke:string|match|{{{released|{{{release|}}}}}}|%d%d%d%d|ignore_errors = true}} {{#switch:{{Infobox album/link|{{{type|}}} }}|[[Extended play|EP]] = EP|#default = {{lc:{{Infobox album/link|{{{type|}}} }}}}}}|{{Infobox album/link|{{{type|}}} }}}}{{#if:{{{longtype|}}}|&#32;{{{longtype|}}}}}{{#if:{{{artist|}}}|&#32;by {{{artist|}}}}}}}|noreplace}}}}<!--
+
{{<includeonly>safesubst:</includeonly>#invoke:Unsubst-infobox||$params=italic_title,name,type,longtype,artist,cover,border,alt,caption,released,recorded,venue,studio,genre,length,language,label,director,producer,compiler,chronology,prev_title,prev_year,year,next_title,next_year,misc|$extra=italic_title,longtype,border,caption,language,director,compiler,chronology,year,misc|$aliases=italic title>italic_title,Italic title>italic_title,Name>name,Type>type,image>cover,Cover>cover,Border>border,Alt>alt,Caption>caption,Longtype>longtype,Artist>artist,Released>released,Recorded>recorded,Venue>venue,Studio>studio,Genre>genre,Length>length,Language>language,Label>label,Director>director,Producer>producer,Compiler>compiler,Chronology>chronology,Misc>misc|$flags=override|$B={{#ifeq:{{#invoke:Is infobox in lead|main|[Ii]nfobox [Aa]lbum}}|true|{{#if:{{Has short description}} |<!--Do nothing--> |{{short description|{{#invoke:Plain text|main|{{#if:{{#invoke:string|match|{{{released|}}}|%d%d%d%d|ignore_errors = true}}|{{#invoke:string|match|{{{released|}}}|%d%d%d%d|ignore_errors = true}} {{#switch:{{Infobox album/link|{{{type|}}} }}|[[Extended play|EP]] = EP|#default = {{lc:{{Infobox album/link|{{{type|}}} }}}}}}|{{Infobox album/link|{{{type|}}} }}}}{{#if:{{{longtype|}}}|&#32;{{{longtype|}}}}}{{#if:{{{artist|}}}|&#32;by {{{artist|}}}}}}}}}|noreplace}}}}<!--
  
 
-->{{Infobox
 
-->{{Infobox
Line 6: Line 6:
  
 
| aboveclass  = summary album
 
| aboveclass  = summary album
| abovestyle  = {{#ifeq:{{{italic_title|yes}}}|yes|font-style: italic;}} background-color: {{#ifeq:{{Infobox album/color|{{{type|}}}}}|khaki|{{Infobox album/color}}|{{Infobox album/color|{{{type|}}} }} }}
+
| abovestyle  = {{#ifeq:{{{italic_title|yes}}}|yes|font-style: italic;}} background-color: {{#ifeq:{{Infobox album/color|{{{type|}}}}}|khaki|{{Infobox album/color}}|{{Infobox album/color|{{{type|}}} }} }}; font-size: 125%;
 
| above      = {{#if:{{{name|}}}|{{{name}}}|<includeonly><span style="font-style: normal">Untitled</span></includeonly>}}
 
| above      = {{#if:{{{name|}}}|{{{name}}}|<includeonly><span style="font-style: normal">Untitled</span></includeonly>}}
  
| image      = {{#invoke:InfoboxImage|InfoboxImage|image={{#switch:{{{image|{{{cover|}}}}}}|blank=|???=Nocover.png|#default={{{image|{{{cover|}}}}}}}}|border={{{border|}}}|alt={{{alt|}}}}}
+
| image      = {{#invoke:InfoboxImage|InfoboxImage|image={{#switch:{{{image|{{{cover|}}}}}}|blank=|???=Nocover.png|#default={{{image|{{{cover|}}}}}}}}|border={{{border|}}}|alt={{{alt|}}}|title={{{alt|}}}}}
 
| caption    = {{{caption|}}}
 
| caption    = {{{caption|}}}
  
Line 28: Line 28:
 
| class5      = plainlist
 
| class5      = plainlist
 
| label6      = [[Music genre|Genre]]
 
| label6      = [[Music genre|Genre]]
| data6      = {{#ifexist:Template:Infobox album/genre/{{FULLPAGENAME}}|{{Infobox album/genre/{{FULLPAGENAME}}}}|{{{genre|}}}}}
+
| data6      = {{{genre|}}}
 
| class6      = category hlist
 
| class6      = category hlist
 
| label7      = Length
 
| label7      = Length
Line 48: Line 48:
 
| class12    = hlist
 
| class12    = hlist
  
| header13    = {{#if:{{{last_album|}}}{{{next_album|}}}{{{prev_title|}}}{{{next_title|}}}|{{#if:{{{chronology|}}}|{{{chronology|}}}|{{#ifeq: {{str letter|{{delink| {{{artist|}}} }}}}|0|{{{artist|}}}|{{#invoke:String2 | ucfirst |{{{artist|}}}}}}}}} chronology }}
+
| header13    = {{#if:{{{prev_title|}}}{{{next_title|}}}|{{#if:{{{chronology|}}}|{{{chronology|}}}|{{#ifeq: {{str letter|{{delink| {{{artist|}}} }}}}|0|{{{artist|}}}|{{#invoke:String2 | ucfirst |{{{artist|}}}}}}}}} chronology }}
| data14      = {{#if:{{{last_album|}}}{{{next_album|}}}{{{prev_title|}}}{{{next_title|}}}|
+
| data14      = {{#if:{{{prev_title|}}}{{{next_title|}}}|
{{(!}} style="background: transparent; width: 100%; min-width: 100%; border-collapse: collapse"
+
<div style="display:flex;">
{{!}}- style="line-height: 1.4em;"
+
<div style="line-height: 1.4em;"></div>
{{!}} style="width: 33%; text-align: center; vertical-align: top; padding: .2em .1em .2em 0" {{!}} {{#if:{{{prev_title|}}}|''{{{prev_title}}}''{{#if:{{{prev_year|}}}|<br />({{{prev_year}}})}}|{{{last_album|}}}<span style="display:none">{{#if:{{{last_album|}}}|{{#invoke:String|match|error_category=Music infoboxes with Module:String errors{{!}}A|1={{{last_album|}}}|2=^''([^<]+)''%s*< ?/? ?[Bb][Rr] ?/? ?>|nomatch={{#invoke:String|match|error_category=Music infoboxes with Module:String errors{{!}}A|1={{{last_album|}}}|2=^<div class="plainlist"><ul><li>''([^<]+)''</li>}}}}{{#invoke:String|match|error_category=Music infoboxes with Module:String errors{{!}}A|1={{{last_album|}}}|2=< ?/? ?[Bb][Rr] ?/? ?>%s*%((%d+)%)|nomatch={{#invoke:String|match|error_category=Music infoboxes with Module:String errors{{!}}A|1={{{last_album|}}}|2=<li>%((%d+)%)</li></ul></div>}}}}}}</span> }}
+
<div style="width: 33%; text-align: center; vertical-align: top; padding: .2em .1em .2em 0"> {{#if:{{{prev_title|}}}|''{{{prev_title}}}''{{#if:{{{prev_year|}}}|<br />({{{prev_year}}})}}|}}</div>
{{!}} style="width: 33%; text-align: center; vertical-align: top; padding: .2em .1em" {{!}} {{{this_album|'''''{{{name|{{PAGENAMEBASE}}}}}'''''}}}{{#if:{{{next_year|}}}{{{prev_year|}}}|<br />({{{year|{{#invoke:String|match|error_category=Music infoboxes with Module:String errors{{!}}A|{{{released|}}}|%d%d%d+}}}}})}}
+
<div style="width: 33%; text-align: center; vertical-align: top; padding: .2em .1em"> '''''{{{name|{{PAGENAMEBASE}}}}}'''''{{#if:{{{next_year|}}}{{{prev_year|}}}|<br />({{{year|{{#invoke:String|match|error_category=Music infoboxes with Module:String errors{{!}}A|{{{released|}}}|%d%d%d+}}}}})}}</div>
{{!}} style="width: 33%; text-align: center; vertical-align: top; padding: .2em 0 .2em .1em" {{!}} {{#if:{{{next_title|}}}|''{{{next_title}}}''{{#if:{{{next_year|}}}|<br />({{{next_year}}})}}|{{{next_album|}}}<span style="display:none">{{#if:{{{next_album|}}}|{{#invoke:String|match|error_category=Music infoboxes with Module:String errors{{!}}A|1={{{next_album|}}}|2=^''([^<]+)''%s*< ?/? ?[Bb][Rr] ?/? ?>|nomatch={{#invoke:String|match|error_category=Music infoboxes with Module:String errors{{!}}A|1={{{next_album|}}}|2=^<div class="plainlist"><ul><li>''([^<]+)''</li>}}}}{{#invoke:String|match|error_category=Music infoboxes with Module:String errors{{!}}A|1={{{next_album|}}}|2=< ?/? ?[Bb][Rr] ?/? ?>%s*%((%d+)%)|nomatch={{#invoke:String|match|error_category=Music infoboxes with Module:String errors{{!}}A|1={{{next_album|}}}|2=<li>%((%d+)%)</li></ul></div>}}}}}}</span> }}
+
<div style="width: 33%; text-align: center; vertical-align: top; padding: .2em 0 .2em .1em"> {{#if:{{{next_title|}}}|''{{{next_title}}}''{{#if:{{{next_year|}}}|<br />({{{next_year}}})}}|}}</div>
{{!)}}
+
</div>
 
}}
 
}}
 
| below      = {{{misc|}}}
 
| below      = {{{misc|}}}
Line 63: Line 63:
 
  }}{{#ifeq:{{Infobox album/color|{{{type|}}}}}|khaki
 
  }}{{#ifeq:{{Infobox album/color|{{{type|}}}}}|khaki
 
   |[[Category:Album articles with non-standard infoboxes]][[Category:Song articles needing single infobox conversion]]
 
   |[[Category:Album articles with non-standard infoboxes]][[Category:Song articles needing single infobox conversion]]
  }}[[Category:Articles with hAudio microformats]]{{#switch:{{lc:{{{image|{{{cover|}}}}}}}}
+
  }}{{#switch:{{lc:{{{image|{{{cover|}}}}}}}}
 
   |
 
   |
 
   |???
 
   |???
Line 71: Line 71:
 
   |??? = {{main other|[[Category:Album articles lacking alt text for covers]]}}
 
   |??? = {{main other|[[Category:Album articles lacking alt text for covers]]}}
 
  }}
 
  }}
}}{{#if:{{#ifeq:{{str left|{{{last_album|}}}|22}}|<div class="plainlist"|1|}}{{#ifeq:{{str left|{{{this_album|}}}|22}}|<div class="plainlist"|1|}}{{#ifeq:{{str left|{{{next_album|}}}|22}}|<div class="plainlist"|1|}}|[[Category:Pages using infobox chronology parameters with plainlists]]}}{{#ifeq:{{{type|}}}||[[Category:Pages using infobox album with empty type parameter]]}}{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using infobox album with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Infobox album]] with unknown parameter "_VALUE_"|ignoreblank=y|italic_title |type |name |image |cover |border |alt |caption |longtype |artist |released |recorded |venue |studio |genre |length |language |label |director |producer |compiler |prev_title|prev_year|next_title|next_year|chronology|year|misc}}{{#if:{{#invoke:String|match|error_category=Music infoboxes with Module:String errors{{!}}A|1={{{prev_title|}}}{{{last_album|}}}{{{prev_year|}}}{{{next_title|}}}{{{next_album|}}}{{{next_year|}}}{{{italic_title|}}}{{{italic title|}}}{{{type|}}}{{{name|}}}{{{image|}}}{{{cover|}}}{{{border|}}}{{{alt|}}}{{{caption|}}}{{{longtype|}}}{{{artist|}}}{{{released|}}}{{{recorded|}}}{{{venue|}}}{{{studio|}}}{{{genre|}}}{{{length|}}}{{{language|}}}{{{label|}}}{{{director|}}}{{{producer|}}}{{{compiler|}}}{{{chronology|}}}{{{this_album|}}}{{{year|}}}x|2=</?t[drh][ >]|nomatch=}}|{{main other|[[Category:Music infoboxes with malformed table placement|A]]}}}}{{main other|{{#if:{{{length|}}}|{{#if:{{#invoke:String|match|error_category=Music infoboxes with Module:String errors{{!}}A|1={{#invoke:hms|main|duration={{{length|}}}}}|2=class="duration"|plain=true|nomatch=}}|[[Category:Articles with hAudio microformats]]}}}}}}}}<noinclude>
+
}}{{main other|{{#ifeq:{{{type|}}}||[[Category:Pages using infobox album with empty type parameter]]}}}}{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using infobox album with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Infobox album]] with unknown parameter "_VALUE_"|ignoreblank=y|italic_title |type |name |image |cover |border |alt |caption |longtype |artist |released |recorded |venue |studio |genre |length |language |label |director |producer |compiler |prev_title|prev_year|next_title|next_year|chronology|year|misc}}{{#if:{{#invoke:String|match|error_category=Music infoboxes with Module:String errors{{!}}A|1={{{prev_title|}}}{{{prev_year|}}}{{{next_title|}}}{{{next_year|}}}{{{italic_title|}}}{{{italic title|}}}{{{type|}}}{{{name|}}}{{{image|}}}{{{cover|}}}{{{border|}}}{{{alt|}}}{{{caption|}}}{{{longtype|}}}{{{artist|}}}{{{released|}}}{{{recorded|}}}{{{venue|}}}{{{studio|}}}{{{genre|}}}{{{length|}}}{{{language|}}}{{{label|}}}{{{director|}}}{{{producer|}}}{{{compiler|}}}{{{chronology|}}}{{{year|}}}x|2=</?t[drh][ >]|nomatch=}}|{{main other|[[Category:Music infoboxes with malformed table placement|A]]}}}}{{main other|{{#if:{{{length|}}}|{{#if:{{#invoke:String|match|error_category=Music infoboxes with Module:String errors{{!}}A|1={{#invoke:hms|main|duration={{{length|}}}}}|2=class="duration"|plain=true|nomatch=}}|}}}}}}}}<noinclude>
 
{{Documentation}}
 
{{Documentation}}
 
<!-- Add categories to the /doc subpage, not here. -->
 
<!-- Add categories to the /doc subpage, not here. -->
 
</noinclude>
 
</noinclude>

Latest revision as of 07:17, 1 May 2023