Jump to content

Template:Infobox album: Difference between revisions

No edit summary
No edit summary
Line 1: Line 1:
{{<includeonly>safesubst:</includeonly>#invoke:Unsubst-infobox||$params=italic_title,name,type,longtype,artist,cover,imageclass,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--> |{{#if: {{{released|}}} | {{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}}}}}}}}<!--
<includeonly><div class="infobox" style="width:22em; border:1px solid #aaa; background:#f9f9f9; padding:1em; float:right; clear:right; margin:0 0 1em 1em; font-size:88%;">
<div style="background:{{#switch:{{{type|}}}
|studio=lightblue
|live=burlywood
|compilation=darkseagreen
|ep=khaki
|mixtape=lightcoral
|soundtrack=gainsboro
|#default=lightblue}}; text-align:center; font-size:110%; font-weight:bold; padding:0.5em; margin:-0.5em -0.5em 0.5em -0.5em;">{{#if:{{{name|}}}|{{{name}}}|{{PAGENAME}}}}</div>


-->{{Infobox
{{#if:{{{cover|}}}|<div style="text-align:center; margin:0.5em 0;">[[File:{{{cover}}}|220px|{{{alt|}}}]]</div>}}
| italic title= {{if empty|{{{italic_title|}}}|<noinclude>no</noinclude>}}
| bodyclass  = vevent haudio


| aboveclass  = summary album
<table style="width:100%; border-collapse:collapse;">
| abovestyle  = {{#ifeq:{{if empty|{{{italic_title|}}}|yes}}|yes|font-style: italic;}} color: inherit; background-color: {{#ifeq:{{Infobox album/color|{{{type|}}}}}|khaki|{{Infobox album/color}}|{{Infobox album/color|{{{type|}}} }} }}; font-size: 125%;
{{#if:{{{artist|}}}|<tr><th style="text-align:left; background:#eee; padding:0.2em 0.5em; width:35%;">Artist</th><td style="padding:0.2em 0.5em;">{{{artist}}}</td></tr>}}
| above      = {{if empty|{{encodefirst|1={{{name|}}}}}|<includeonly><span style="font-style: normal">Untitled</span></includeonly>}}
{{#if:{{{released|}}}|<tr><th style="text-align:left; background:#eee; padding:0.2em 0.5em;">Released</th><td style="padding:0.2em 0.5em;">{{{released}}}</td></tr>}}
{{#if:{{{recorded|}}}|<tr><th style="text-align:left; background:#eee; padding:0.2em 0.5em;">Recorded</th><td style="padding:0.2em 0.5em;">{{{recorded}}}</td></tr>}}
{{#if:{{{studio|}}}|<tr><th style="text-align:left; background:#eee; padding:0.2em 0.5em;">Studio</th><td style="padding:0.2em 0.5em;">{{{studio}}}</td></tr>}}
{{#if:{{{genre|}}}|<tr><th style="text-align:left; background:#eee; padding:0.2em 0.5em;">Genre</th><td style="padding:0.2em 0.5em;">{{{genre}}}</td></tr>}}
{{#if:{{{length|}}}|<tr><th style="text-align:left; background:#eee; padding:0.2em 0.5em;">Length</th><td style="padding:0.2em 0.5em;">{{{length}}}</td></tr>}}
{{#if:{{{label|}}}|<tr><th style="text-align:left; background:#eee; padding:0.2em 0.5em;">Label</th><td style="padding:0.2em 0.5em;">{{{label}}}</td></tr>}}
{{#if:{{{producer|}}}|<tr><th style="text-align:left; background:#eee; padding:0.2em 0.5em;">Producer(s)</th><td style="padding:0.2em 0.5em;">{{{producer}}}</td></tr>}}
</table>


| image      = {{#invoke:InfoboxImage|InfoboxImage|image={{#switch:{{if empty|{{{image|}}}|{{{cover|}}}}}|blank=|???=Nocover.png|#default={{if empty|{{{image|}}}|{{{cover|}}}}}}}|border={{{border|}}}|alt={{{alt|}}}|title={{{alt|}}}}}
{{#if:{{{prev_title|}}}{{{next_title|}}}|<div style="text-align:center; margin-top:0.5em;">
| imageclass = {{{imageclass|}}}
<table style="width:100%; border-collapse:collapse; background:#eee;">
| caption    = {{{caption|}}}
<tr>
<td style="width:45%; text-align:left; padding:0.2em 0.5em;">{{#if:{{{prev_title|}}}|{{{prev_title}}}{{#if:{{{prev_year|}}}|<br/><small>{{{prev_year}}}</small>}}}}</td>
<td style="width:10%; text-align:center; padding:0.2em; font-weight:bold;">{{#if:{{{artist|}}}|{{{artist}}} chronology}}</td>
<td style="width:45%; text-align:right; padding:0.2em 0.5em;">{{#if:{{{next_title|}}}|{{{next_title}}}{{#if:{{{next_year|}}}|<br/><small>{{{next_year}}}</small>}} →}}</td>
</tr>
</table></div>}}


| headerstyle = color: #202122;background-color: {{#ifeq:{{Infobox album/color|{{{type|}}}}}|khaki|{{Infobox album/color}}|{{Infobox album/color|{{{type|}}}}}}}
{{#if:{{{misc|}}}|<div style="text-align:center; margin-top:0.5em;">{{{misc}}}</div>}}
| headerclass = description
</div></includeonly><noinclude>
 
| header1    = <includeonly>{{Infobox album/link|{{{type|}}} }}</includeonly>{{#if:{{{longtype|}}}|&#32;{{{longtype|}}}}}{{#if:{{{artist|}}}|&#32;by <div class="contributor" style="display:inline">{{{artist|}}}</div> }}
| label2      = Released
| data2      = {{{released|}}}
| class2      = published
| label3      = Recorded
| data3      = {{{recorded|}}}
| class3      = plainlist
| label4      = Venue
| data4      = {{{venue|}}}
| label5      = Studio
| data5      = {{{studio|}}}
| class5      = plainlist
| label6      = [[Music genre|Genre]]
| data6      = {{{genre|}}}
| class6      = category hlist
| label7      = Length
| data7      = {{#invoke:hms|main|duration={{{length|}}}}}
| label8      = Language
| data8      = {{{language|}}}
| class8      = category
| label9      = [[Record label|Label]]
| data9      = {{{label|}}}
| class9      = hlist
| label10    = [[Film director|Director]]
| data10      = {{{director|}}}
| class10    = hlist
| label11    = [[Record producer|Producer]]
| data11      = {{{producer|}}}
| class11    = hlist
| label12    = Compiler
| data12      = {{{compiler|}}}
| class12    = hlist
 
| header13    = {{#if:{{{prev_title|}}}{{{next_title|}}}|{{#if:{{{chronology|}}}|{{{chronology|}}}|{{#ifeq: {{str letter|{{delink| {{{artist|}}} }}}}|0|{{{artist|}}}|{{#invoke:String2 | ucfirst |{{{artist|}}}}}}}}} chronology }}
| data14      = {{#if:{{{prev_title|}}}{{{next_title|}}}|
{{(!}} role="presentation" style="color:inherit; background: transparent; width: 100%; min-width: 100%; border-collapse: collapse; display: inline-table;"
{{!}}- style="line-height: 1.4em;"
{{!}} 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}}})}}|}}
{{!}} style="width: 33%; text-align: center; vertical-align: top; padding: .2em .1em" {{!}} '''''{{if empty|{{encodefirst|1={{{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+}}}}})}}
{{!}} 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}}})}}|}}
{{!)}}
}}
| below      = {{{misc|}}}
}}{{category handler
|main={{#ifeq:{{Infobox album/color|{{{type|}}}|Test}}|Test
  |[[Category:Album articles with non-standard infoboxes]]
}}{{#ifeq:{{Infobox album/color|{{{type|}}}}}|khaki
  |[[Category:Album articles with non-standard infoboxes]][[Category:Song articles needing single infobox conversion]]
}}[[Category:Articles with hAudio microformats]]{{#switch:{{lc:{{if empty|{{{image|}}}|{{{cover|}}}}}}}
  |
  |???
  |nocover.png = {{#ifeq:{{#invoke:Is infobox in lead|main|[Ii]nfobox [Aa]lbum}}|true|[[Category:Album infoboxes lacking a cover]]}}
}}{{#switch:{{lc:{{if empty|{{{image|}}}|{{{alt|}}}}}}}
  |
  |??? = {{main other|[[Category:Album articles lacking alt text for covers]]}}
}}
}}{{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 |imageclass |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|}}}{{{imageclass|}}}{{{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=}}|[[Category:Articles with hAudio microformats]]}}}}}}}}{{#invoke:Check for conflicting parameters|check
| template = [[Template:Infobox album]]
| cat = {{main other|Category:Pages using infobox album with conflicting parameters}}
| image; cover
}}<noinclude>
{{Documentation}}
{{Documentation}}
<!-- Add categories to the /doc subpage, not here. -->
</noinclude>
</noinclude>

Revision as of 16:26, 15 May 2026

   📄 Template documentation
   
   This is a documentation subpage for Template:Infobox album.
It contains usage information, categories, and other content that is not part of the original template page.

Usage

{{Infobox album
| name       = 
| type       = 
| cover      = 
| alt        = 
| artist     = 
| released   = 
| recorded   = 
| studio     = 
| genre      = 
| length     = 
| label      = 
| producer   = 
| prev_title = 
| prev_year  = 
| next_title = 
| next_year  = 
| misc       = 
}}

Parameters

  • type – studio, live, compilation, ep, mixtape, soundtrack
  • misc – Use
    Singles from Infobox album
    template for single list