No edit summary |
Paine Ellsworth (talk | contribs) m per edit request on talk page - uc |
||
(94 intermediate revisions by 24 users not shown) | |||
Line 1: | Line 1: | ||
{{#switch:{{{1|}}} |
<includeonly>{{#switch: {{lc:{{delink|{{{1|}}}}}}}<!-- |
||
|EP=salmon |
|||
|Studio album=orange |
|||
|Live album=darkturquoise |
|||
|Greatest hits=darkseagreen |
|||
|Box set=darkseagreen |
|||
|Compilation album=darkseagreen |
|||
|Remix album=darkseagreen |
|||
|Cover album=plum |
|||
|Tribute album=plum |
|||
|Soundtrack=gainsboro |
|||
|Television theme=gainsboro |
|||
|Film score=gainsboro |
|||
|gainsboro |
|||
}}<noinclude> |
|||
==Usage== |
|||
This template is an auxiliar one and should be only used by the [[:User:ReyBrujo/Sandbox]] template. Based on the type of album this template receives, it returns the color that will be used. |
|||
-->|studio album|studio|album |
|||
===Quick reference table=== |
|||
|tribute|tribute album |
|||
{| style="background:transparent;" |
|||
|cover album|cover |
|||
!bgcolor= "{{User:ReyBrujo/Temp/Sandbox|EP}}" |EPs||{{User:ReyBrujo/Temp/Sandbox|EP}} |
|||
|double album |
|||
|- |
|||
|demo = lightsteelblue<!-- |
|||
!bgcolor= "{{User:ReyBrujo/Temp/Sandbox|Studio album}}" |Original studio albums||{{User:ReyBrujo/Temp/Sandbox|Studio album}} |
|||
|- |
|||
!bgcolor= "{{User:ReyBrujo/Temp/Sandbox|Live album}}" |Live albums and live EPs||{{User:ReyBrujo/Temp/Sandbox|Live album}} |
|||
|- |
|||
!bgcolor={{User:ReyBrujo/Temp/Sandbox|Greatest hits}}|Greatest hits, box sets and other compilations||{{User:ReyBrujo/Temp/Sandbox|Greatest hits}} |
|||
|- |
|||
!bgcolor= "{{User:ReyBrujo/Temp/Sandbox|Cover album}}" |Cover and tribute albums||{{User:ReyBrujo/Temp/Sandbox|Cover album}} |
|||
|- |
|||
!bgcolor={{User:ReyBrujo/Temp/Sandbox|Soundtrack}}|Soundtracks and television theme songs||{{User:ReyBrujo/Temp/Sandbox|Soundtrack}} |
|||
|- |
|||
!bgcolor={{User:ReyBrujo/Temp/Sandbox|Unknown}}|Unknown type||{{User:ReyBrujo/Temp/Sandbox|Unknown}} |
|||
|} |
|||
-->|extended play|ep |
|||
===Valid arguments=== |
|||
|single album =  #F4BF92<!-- |
|||
* EP |
|||
* Studio album |
|||
* Live album |
|||
* Greatest hits |
|||
* Box set |
|||
* Compilation album |
|||
* Remix album |
|||
* Cover |
|||
* Tribute album |
|||
* Soundtrack |
|||
* Television theme |
|||
* Film score |
|||
-->|live album|live = burlywood<!-- |
|||
==Unit test== |
|||
If at any time the ''Expected'' and ''Obtained'' columns do not match, this template can be considered broken. This table makes the template automatically check itself. If a {{y}} mark is seen, it means that self test worked fine. if there is a {{n}} mark, it means the test failed. Whenever you make a modification to the template, please save the page, hit CTRL+F5, and check if all the self tests have passed. If you add a new type to the template, remember to add the type using this format: |
|||
-->|compilation album|compilation |
|||
<code> |
|||
|greatest hits|greatest |
|||
<pre> |
|||
|box set|box |
|||
| <nowiki>{{User:ReyBrujo/Temp/Sandbox|typename}}</nowiki> |
|||
|remix album|remix |
|||
| typecolor |
|||
|mixtape =  #BFE0BF<!-- |
|||
| {{User:ReyBrujo/Temp/Sandbox|typename}} |
|||
| {{#ifeq:{{User:ReyBrujo/Temp/Sandbox|typename}}|typecolor|{{y}}|{{n}}}} |
|||
</pre> |
|||
</code> |
|||
-->|soundtrack album|soundtrack |
|||
Replace ''typename'' with the new type name (in example, ''Epic soundtrack''), and ''typecolor'' with the color assigned to the type (in example, ''brown''). |
|||
|television theme|television |
|||
|film score|film |
|||
|cast recording|cast album|cast = gainsboro<!-- |
|||
-->|video|dvd =  #99CCFF<!-- |
|||
'''Note''': Sometimes the test may pass while previewing the page, but once saved the test would fail, no matter how many times the cache is cleared. In this case, please click [{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAME}}|action=purge}} this link] to purge the cache. If that doesn't solve the problem, please post a note in the Talk page of the template and an editor will review the changes. |
|||
{|class="wikitable" |
|||
-->|single|singles = khaki<!-- |
|||
|- |
|||
! Template usage |
|||
-->|song =  #E6E8FA<!-- |
|||
! Expected |
|||
! Obtained |
|||
-->|other = peachpuff<!-- |
|||
! Test |
|||
|- |
|||
-->|{{#if:{{{2|}}}|{{{2}}}|peachpuff}} |
|||
| <nowiki>{{User:ReyBrujo/Temp/Sandbox|EP}}</nowiki> |
|||
}}</includeonly><noinclude> |
|||
| salmon |
|||
{{Documentation}} |
|||
| {{User:ReyBrujo/Temp/Sandbox|EP}} |
|||
| {{#ifeq:{{User:ReyBrujo/Temp/Sandbox|EP}}|salmon|{{y}}|{{n}}}} |
|||
|- |
|||
| <nowiki>{{User:ReyBrujo/Temp/Sandbox|Studio album}}</nowiki> |
|||
| orange |
|||
| {{User:ReyBrujo/Temp/Sandbox|Studio album}} |
|||
| {{#ifeq:{{User:ReyBrujo/Temp/Sandbox|Studio album}}|orange|{{y}}|{{n}}}} |
|||
|- |
|||
| <nowiki>{{User:ReyBrujo/Temp/Sandbox|Live album}}</nowiki> |
|||
| darkturquoise |
|||
| {{User:ReyBrujo/Temp/Sandbox|Live album}} |
|||
| {{#ifeq:{{User:ReyBrujo/Temp/Sandbox|Live album}}|darkturquoise|{{y}}|{{n}}}} |
|||
|- |
|||
| <nowiki>{{User:ReyBrujo/Temp/Sandbox|Greatest hits}}</nowiki> |
|||
| darkseagreen |
|||
| {{User:ReyBrujo/Temp/Sandbox|Greatest hits}} |
|||
| {{#ifeq:{{User:ReyBrujo/Temp/Sandbox|Greatest hits}}|darkseagreen|{{y}}|{{n}}}} |
|||
|- |
|||
| <nowiki>{{User:ReyBrujo/Temp/Sandbox|Box set}}</nowiki> |
|||
| darkseagreen |
|||
| {{User:ReyBrujo/Temp/Sandbox|Box set}} |
|||
| {{#ifeq:{{User:ReyBrujo/Temp/Sandbox|Box set}}|darkseagreen|{{y}}|{{n}}}} |
|||
|- |
|||
| <nowiki>{{User:ReyBrujo/Temp/Sandbox|Compilation album}}</nowiki> |
|||
| darkseagreen |
|||
| {{User:ReyBrujo/Temp/Sandbox|Compilation album}} |
|||
| {{#ifeq:{{User:ReyBrujo/Temp/Sandbox|Compilation album}}|darkseagreen|{{y}}|{{n}}}} |
|||
|- |
|||
| <nowiki>{{User:ReyBrujo/Temp/Sandbox|Remix album}}</nowiki> |
|||
| darkseagreen |
|||
| {{User:ReyBrujo/Temp/Sandbox|Remix album}} |
|||
| {{#ifeq:{{User:ReyBrujo/Temp/Sandbox|Remix album}}|darkseagreen|{{y}}|{{n}}}} |
|||
|- |
|||
| <nowiki>{{User:ReyBrujo/Temp/Sandbox|Cover album}}</nowiki> |
|||
| plum |
|||
| {{User:ReyBrujo/Temp/Sandbox|Cover album}} |
|||
| {{#ifeq:{{User:ReyBrujo/Temp/Sandbox|Cover album}}|plum|{{y}}|{{n}}}} |
|||
|- |
|||
| <nowiki>{{User:ReyBrujo/Temp/Sandbox|Tribute album}}</nowiki> |
|||
| plum |
|||
| {{User:ReyBrujo/Temp/Sandbox|Tribute album}} |
|||
| {{#ifeq:{{User:ReyBrujo/Temp/Sandbox|Tribute album}}|plum|{{y}}|{{n}}}} |
|||
|- |
|||
| <nowiki>{{User:ReyBrujo/Temp/Sandbox|Soundtrack}}</nowiki> |
|||
| gainsboro |
|||
| {{User:ReyBrujo/Temp/Sandbox|Soundtrack}} |
|||
| {{#ifeq:{{User:ReyBrujo/Temp/Sandbox|Soundtrack}}|gainsboro|{{y}}|{{n}}}} |
|||
|- |
|||
| <nowiki>{{User:ReyBrujo/Temp/Sandbox|Television theme}}</nowiki> |
|||
| gainsboro |
|||
| {{User:ReyBrujo/Temp/Sandbox|Television theme}} |
|||
| {{#ifeq:{{User:ReyBrujo/Temp/Sandbox|Television theme}}|gainsboro|{{y}}|{{n}}}} |
|||
|- |
|||
| <nowiki>{{User:ReyBrujo/Temp/Sandbox|Film score}}</nowiki> |
|||
| gainsboro |
|||
| {{User:ReyBrujo/Temp/Sandbox|Film score}} |
|||
| {{#ifeq:{{User:ReyBrujo/Temp/Sandbox|Film score}}|gainsboro|{{y}}|{{n}}}} |
|||
|- |
|||
| <nowiki>{{User:ReyBrujo/Temp/Sandbox|testing}}</nowiki> |
|||
| gainsboro |
|||
| {{User:ReyBrujo/Temp/Sandbox|gainsboro}} |
|||
| {{#ifeq:{{User:ReyBrujo/Temp/Sandbox|testing}}|gainsboro|{{y}}|{{n}}}} |
|||
|- |
|||
| <nowiki>{{User:ReyBrujo/Temp/Sandbox}}</nowiki> |
|||
| gainsboro |
|||
| {{User:ReyBrujo/Temp/Sandbox}} |
|||
| {{#ifeq:{{User:ReyBrujo/Temp/Sandbox}}|gainsboro|{{y}}|{{n}}}} |
|||
|} |
|||
</noinclude> |
</noinclude> |
Latest revision as of 18:01, 13 July 2022
Important
When modifying this template, don't forget to update Template:Infobox album/link.
Usage
This is an auxiliary template used by the {{Infobox album}} template, as well as other templates used in it and {{Infobox song}}'s |misc=
parameter: {{Singles}}, {{Extra album cover}}, {{Extra chronology}}, {{Extra track listing}}, {{External music video}} and {{Audio sample}}. It should never be used on its own. The first parameter should be one of the codes from the table below, representing a type of album (parameter "Type"). The template returns the color that will be used.
Quick reference table
Code | Color | Display |
---|---|---|
studio | lightsteelblue | Studio album by artist |
demo | lightsteelblue | Demo album by artist |
EP | #F4BF92 | EP by artist |
single album | #F4BF92 | Single album by artist |
live | burlywood | Live album by artist |
greatest | #BFE0BF | Greatest hits album by artist |
remix | #BFE0BF | Remix album by artist |
box | #BFE0BF | Box set by artist |
compilation | #BFE0BF | Compilation album by artist |
mixtape | #BFE0BF | Mixtape by artist |
soundtrack | gainsboro | Soundtrack album by artist |
film | gainsboro | Film score by artist |
cast | gainsboro | Cast recording by artist |
video | #99CCFF | Video by artist |
other | peachpuff | other by artist |
Unit test
If at any time the Expected and Obtained columns do not match, this template can be considered broken. This table makes the template automatically check itself. If a mark is seen, it means that self test worked fine. If there is a mark, it means the test failed. Whenever you make a modification to the template, please save the page, hit CTRL+F5, and check if all the self tests have passed. If you add a new type to the template, remember to add the type using this format:
| <nowiki>typename</nowiki>
| typecolor
| {{Template:Infobox album/color|typename}}
| {{#ifeq:{{Template:Infobox album/color|typename}}|typecolor|{{y}}|{{n}}}}
Replace typename with the new type name (in example, Epic soundtrack), and typecolor with the color assigned to the type (in example, brown). See Wikipedia:Colours and Wikipedia:Infobox colours for additional information.
Note: Sometimes the test may pass while previewing the page, but once saved the test would fail, no matter how many times the cache is cleared. In this case, please click this link to purge the cache. If that doesn't solve the problem, please post a note in the Talk page of the template and an editor will review the changes.
Code | Expected | Obtained | Test |
---|---|---|---|
Studio album | |||
studio | lightsteelblue | lightsteelblue | |
Studio album | lightsteelblue | lightsteelblue | |
Double album | lightsteelblue | lightsteelblue | |
[[Double album]] | lightsteelblue | lightsteelblue | |
Demo album | |||
demo | lightsteelblue | lightsteelblue | |
EP | |||
ep | #F4BF92 | #F4BF92 | |
[[EP]] | #F4BF92 | #F4BF92 | |
single album | |||
single album | #F4BF92 | #F4BF92 | |
[[single album]] | #F4BF92 | #F4BF92 | |
Live album | |||
live | burlywood | burlywood | |
Live album | burlywood | burlywood | |
Greatest hits | |||
greatest | #BFE0BF | #BFE0BF | |
Greatest hits | #BFE0BF | #BFE0BF | |
Remix album | |||
remix | #BFE0BF | #BFE0BF | |
Remix album | #BFE0BF | #BFE0BF | |
Box set | |||
box | #BFE0BF | #BFE0BF | |
Box set | #BFE0BF | #BFE0BF | |
Compilation album | |||
compilation | #BFE0BF | #BFE0BF | |
Compilation album | #BFE0BF | #BFE0BF | |
Cover album | |||
cover | lightsteelblue | lightsteelblue | |
Cover album | lightsteelblue | lightsteelblue | |
Tribute album | |||
tribute | lightsteelblue | lightsteelblue | |
Tribute album | lightsteelblue | lightsteelblue | |
Soundtrack | |||
soundtrack | gainsboro | gainsboro | |
Television theme | |||
television | gainsboro | gainsboro | |
Television theme | gainsboro | gainsboro | |
Film score | |||
film | gainsboro | gainsboro | |
Film score | gainsboro | gainsboro | |
Cast album | |||
cast | gainsboro | gainsboro | |
Cast album | gainsboro | gainsboro | |
Cast recording | gainsboro | gainsboro | |
Video album | |||
video | #99CCFF | #99CCFF | |
dvd | #99CCFF | #99CCFF | |
Other cases | |||
peachpuff | peachpuff | ||
xyz | peachpuff | peachpuff |
TemplateData
TemplateData for Infobox album
Colour selection template for {{Infobox album}} and associated templates.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Type | 1 | Type of recording | String | required |
Testing only | 2 | Custom colour value. Not necessary in almost all cases | Unknown | deprecated |