Template talk:Infobox album/color

(Redirected from Template talk:Infobox album/color/doc)
Latest comment: 2 years ago by Paine Ellsworth in topic Improving the code

Special case

edit

The [[Album (music)|Album]] is a case that is used very commonly, and I am not sure we can handle, as the middle pipe may break the switch statement. I am sure if we can fix it we will be solving easily half the cases. -- ReyBrujo 14:15, 18 September 2006 (UTC)Reply

Well, seemly I fixed that. I had to add the line [[ALBUM (MUSIC)|ALBUM]]=lightsteelblue in a single line, which makes the template look "broken" while editing it:
{{#switch: {{UC:{{{1|}}}}}
  |EP|EXTENDED PLAY|[[EP]]|[[EXTENDED PLAY]]|SALMON=salmon
  |STUDIO ALBUM|[[STUDIO ALBUM]]|[[ALBUM]]|ALBUM|ORIGINAL STUDIO ALBUM|ORANGE=lightsteelblue
  |
    [[ALBUM (MUSIC)|ALBUM]]=lightsteelblue
  |LIVE ALBUM|[[LIVE ALBUM]]|DARKTURQUOISE=darkturquoise
  |GREATEST HITS|[[GREATEST HITS]]|DARKSEAGREEN=darkseagreen
  |BOX SET|[[BOX SET]]|[[BOXED SET]]=darkseagreen
  |COMPILATION ALBUM|[[COMPILATION ALBUM]]=darkseagreen
  |REMIX ALBUM|[[REMIX]]|[[REMIX ALBUM]]=darkseagreen
  |COVER ALBUM|COVER|[[COVER ALBUM]]|[[COVER VERSION]]|PLUM=plum
  |TRIBUTE ALBUM|TRIBUTE|[[TRIBUTE ALBUM]]=plum
  |SOUNDTRACK|MOVIE SOUNDTRACK|[[SOUNDTRACK]]|GAINSBORO=gainsboro
  |TELEVISION THEME=gainsboro
  |FILM SCORE|[[FILM SCORE]]=gainsboro
  |{{#if:{{{2|}}}|{{{2}}}|gainsboro}}
}}
Please do not change that odd looking line, because it breaks the template :( -- ReyBrujo 14:59, 18 September 2006 (UTC)Reply
Could we maybe do a similar thing for [[Extended play|EP]], because a lot of articles use this pipe-link? --HarryCane 13:44, 21 September 2006 (UTC)Reply
We could. However, the idea is to remove as many "types" as possible, until we have only 10 or so, one for every type. Don't worry, in the few days since the change was implemented, there have been several fixing the non standard types. From 4,400 broken types, there are now around 1,000 less. I hope in less than a month we will have all of them fixed, including [[Extended play|EP]], and then we will be able to start a new discussion about which types should we remove. -- ReyBrujo 13:55, 21 September 2006 (UTC)Reply
Valid point. But for the time being, wouldn't it be wise to allow the background color to be changed manually, for any special cases that arise? Pages like The Early November/I Am the Avalanche simply look messed up right now — I think any spilt record will create a similar issue (calling it "Split", "Split record", or "Split EP"), maybe there should be a seperate color for split records alltogether). --HarryCane 14:33, 22 September 2006 (UTC)Reply
I have fixed it. That is a compatibility problem with {{Extra chronology}} which {{Extra chronology 2}} solves (as the former was protected when the infobox update was made). I will try to merge the changes of {{Extra chronology 2}} into {{Extra chronology}} tomorrow, but we need to be careful, as it is shared with the single infoboxes. For now, if you find yourself in a similar situation, replace the old Extra chronology template with the new one, replacing the background color with the type specified in the infobox, as I did in your example. -- ReyBrujo 18:17, 22 September 2006 (UTC)Reply
Can't bot's cleanup this kind of stuff? And what do we say are Demo's and Mixtape's? - Ashadeofgrey 18:52, 24 September 2006 (UTC)Reply
Yes, most of the [[Extended play|EP]] to EP have no problem, but some (in example, the ones that are right now in the maintenance category) need to be handled manually. -- ReyBrujo 21:32, 24 September 2006 (UTC)Reply

Hey, how can you pull up a list of the pages using a broken type? I've been going around replacing piped 'Album (music)' links, it would be useful to see what's left. --Alcuin 04:37, 4 October 2006 (UTC)Reply

There is no list still. You can go to Category:Non-standard album infoboxes to check all the errors. -- ReyBrujo 05:03, 4 October 2006 (UTC)Reply
Thanks, that's what I was looking for --Alcuin 06:16, 4 October 2006 (UTC)Reply

Why is orange back?

edit

The light steel blue took a little getting used to, but I was quite happy with it. For some reason, the color scheme has been reverted back to orange, which is quite jarring. What was wrong with the new colors? Was there a technical issue that could only be resolved by reverting, or was it reverted out of one user's personal preference? I thought the new color scheme was based on consensus. --Alcuin 22:27, 26 September 2006 (UTC)Reply

Apparently, it was to bring more attention to the color discussion at the WikiProject Album. The lightsteelblue color was accepted due consensus, so it should be back soon. -- ReyBrujo 22:51, 26 September 2006 (UTC)Reply
Well, he got mine. I didn't bother voting before, but I prefer the blue. Where's the place to comment/express opinions on this, anyway? Surely I'm not the first to notice the switch back. --Alcuin 23:03, 26 September 2006 (UTC)Reply
At Wikipedia talk:WikiProject Albums AzaToth 23:16, 26 September 2006 (UTC)Reply
Yee-hah! Banish garish colors! :-) Fantailfan 23:26, 26 September 2006 (UTC)Reply

Live/Cover EP

edit

Could we maybe enhance the Cover album/Live album codes so that they also accept Live EP and Cover EP? --HarryCane 13:23, 9 October 2006 (UTC)Reply

Yea, especially for Live EP. It doesn't make sense to me why it isnt already in there, as the category is specifically called "Live albums and live EPs". -- Reaper X
See here for a discussion. -- ReyBrujo 17:15, 14 October 2006 (UTC)Reply

album (music)|album

edit

There are now few (if any) infoboxes that use this piped link. I'd go ahead and remove it from the template, but I'm afraid of breaking the template. So I'll let someone more skilled do it. Thanks. --Alcuin 18:30, 11 October 2006 (UTC)Reply

Done. Next time try it out yourself. At worst, you can always revert back :-) -- ReyBrujo 18:49, 11 October 2006 (UTC)Reply
Thanks --Alcuin 19:04, 11 October 2006 (UTC)Reply

Automatically linked types?

edit

Am I crazy, or did the types automatically get linked before? Like right now, if I just set type=Album, I get Album in the infobox, but I'm sure it was Album before. Am I crazy? Joltman 12:37, 12 October 2006 (UTC)Reply

{{Infobox Album/link}} should be updated whenever this template is updated. -- ReyBrujo 12:42, 12 October 2006 (UTC)Reply

Questions

edit
  1. Hi, I was wondering how would you know if an album article would be classified as a Cover album? Would You Light up My Life: Inspirational Songs be classified as a cover album?
  2. Would Christmas albums be classified as a Cover album? Lillygirl 5:35, 26 November 2006.
You are more likely to get answers at Wikipedia talk:WikiProject Albums. Jogers (talk) 11:05, 26 November 2006 (UTC)Reply
Ok, thank you. I'll post it there. Lillygirl 14:22, 26 November 2006.

Gospel albums

edit

Since there already are a number of articles on gospel albums (country or otherwise), do you think it's a good idea to create a special album/color denoter for gospel albums? Your thoughts are appreciated. [[Briguy52748 03:44, 28 January 2007 (UTC)]]Reply

Please contact Wikipedia:WikiProject Albums, where you will get a better feedback. -- ReyBrujo 05:39, 28 January 2007 (UTC)Reply
Thought I'd try here first, but Roger that and 10-4. [[Briguy52748 20:42, 28 January 2007 (UTC)]]Reply

Proposed change: add type "demo"

edit

Proposed change, per discussion at Template talk:Infobox Album#Demo type, for future {{editprotected}} if accepted:

  • Add the line: " |demo=lightsteelblue" before the line: " |double album|[[double album]]= lightsteelblue"
  • Move the documentation to an unprotected subarticle /doc
  • Perform the change request at Template talk:Infobox Album/link in tandem.

--PEJL 11:49, 11 August 2007 (UTC)Reply

OK, let's do this. --PEJL 13:45, 13 August 2007 (UTC)Reply

{{editprotected}}

 Y Done Nihiltres(t.l) 02:04, 14 August 2007 (UTC)Reply

Requested change: Add type "video"

edit

{{editprotected}} Requested change, needed to merge Template:Infobox Album and Template:Infobox music DVD as discussed at WT:ALBUM. While no final decision to merge has been made, I'm prototyping how such a change would work, and this is needed for such a prototype. It can be reverted if we later decide not to merge. Requested changes:

  • Add the line |video=#99CCFF before the line |single|[[single]]|singles|[[singles]]=khaki.
  • Perform the change request at Template talk:Infobox Album/link in tandem.

--PEJL 11:02, 2 October 2007 (UTC)Reply

Done. Jogers (talk) 12:38, 2 October 2007 (UTC)Reply

{{editprotected}}

Thanks Jogers. Unfortunately it didn't work quite as intended. See the breakage at Template:Infobox Album/color/doc#Unit test and Template:Infobox Album/testcases#Video parameters. I think the problem is that the hash sign needs to be escaped. Let's try changing # to <nowiki>#</nowiki>. --PEJL 12:55, 2 October 2007 (UTC)Reply
Seems to work now despite what test unit says... Jogers (talk) 13:10, 2 October 2007 (UTC)Reply
Yep, and I've already fixed the test. Thanks! --PEJL 13:11, 2 October 2007 (UTC)Reply

Req: Minor adjustment to avoid false negative in unit tests

edit

{{editprotected}}

The unit tests return a false negative for the "video" color. Thanks to the assistance of User:Csernica at Wikipedia:Village pump (technical)#Ifeq help we can avoid this problem by making a minor adjustment to the color value for "video". Please change #99CCFF to &#32;#99CCFF. (This alone won't make the test pass, we'll need to update the test as well.) --PEJL 21:23, 17 October 2007 (UTC)Reply

That worked, nice! I had been trying to come with a solution to fix that false positive, glad to see others solved it! -- ReyBrujo 01:25, 18 October 2007 (UTC)Reply

Req: Support "DVD" as alias for "video"

edit

Please change |video= to |video|DVD=, per WT:ALBUM#Video infobox. --PEJL 10:57, 18 October 2007 (UTC)Reply

Req: Add DJ mix

edit

{{editprotected}} Missing on this album type list is "DJ mix". Please note that this is not the same as a compilation album or a remix album, which are presently supported in this template. Here are example articles that could benefit from this addition: Funky Skunk, Uproot, et al. (see also this list.) I'm not sure what colour to associate this with, so an editor familiar with this template should ideally add it. Thanks for your consideration. +mt 05:21, 20 January 2009 (UTC)Reply

  Not done for now: You should probably place this request at Template talk:Infobox Album, since editors there will be able to formulate a more specific request, including deciding what color to make it, etc..--Aervanath (talk) 16:28, 21 January 2009 (UTC)Reply
OK, discussion now at Template talk:Infobox Album#DJ mix album type. +mt 19:05, 21 January 2009 (UTC)Reply

Add song color

edit

{{editprotected}} Please add the following color to the template's switch statement after the similar statement for "single".

|song|[[song]]|Song|[[Song]]=<nowiki>#E6E8FA</nowiki>

Note that <nowiki> and </nowiki> should be part of the template (as shown) in order to avoid issues with the "#" character.

Rationale: Other templates used via the |Misc= parameter of {{Infobox album}}, {{Infobox single}}, and {{Infobox song}} use this template to create the proper color for heading rows. This template supports all the type values for {{Infbox album}} (for which it was designed) and it also supports|Type=single. It currently does not support |Type=song and that negatively affects the use of those templates with the {{Infobox song}} template. Adding the line above to the switch statement will fix that, and will help to keep the colors associated with the |Type= parameters all in one place. — John Cardinal (talk) 04:48, 24 November 2009 (UTC)Reply

  Done — Martin (MSGJ · talk) 07:08, 24 November 2009 (UTC)Reply

Req: Remix EP

edit

I'd like to request an addition to the "Remix Album" portion of the colour coding to allow a darkseagreen shade for a "Remix EP". Examples of articles that need Remix EP templates are Remixes (Coldplay album) and It's Time Remixes. RazorEye ⡭ ₪ ·o' ⍦ ࿂ 05:22, 7 February 2013 (UTC)Reply

There's already a remix category and an extended play category. Creating a "remix ep" category is a question that should probably be brought up to more members. This template doesn't get much traffic and the top of the page suggests that non-technical questions about the template should probably be brought up at WikiProject Albums. So, I brought that question up for you on the Wikiproject Albums talk page. I've also marked your edit request as answered, so that further discussion is focused over there. If you'd like any further help, contact me on my user talk page. You might instead want to put a {{help me}} template up on your own user talk, or put the {{editprotected}} template back up on this page and either way someone will be along to help you. :) Banaticus (talk) 01:50, 22 February 2013 (UTC)Reply

Visual albums

edit

As it seems they are going to be common in the future, can the terms "visual" and "visual album" be added together with "video" (|video|dvd|visual|visual album=). Thanks. © Tbhotch (en-2.5). 03:01, 21 August 2016 (UTC)Reply

Have you had prior discussions about aliasing "visual" and "visual album"? (i.e. is WikiProject Albums aware?) In what situations (or pages) will this param be used? — Andy W. (talk ·ctb) 05:56, 21 August 2016 (UTC)Reply
Tbhotch, it was just a quick question. FYI, |visual= or |visual album= is unknown to the sister template Template:Infobox album/link, which would also need to be updated to generate the appropriate link. Re-open this request if you still want the change for more visibility. — Andy W. (talk ·ctb) 15:13, 21 August 2016 (UTC)Reply

Category

edit

Is it possible to make a Category for with missing or invalid type field? Is it necessary to make tracking subpage like in Infobox musical artist? — SimplyFreddie (talk) 13:07, 26 March 2021 (UTC)Reply

EP and compilation colors are failing accessibility guidelines

edit

Both colors are failing WCAG 2.0's AA level compliance with blue links text (#0645AD) per MOS:CONTRAST and this is the case for almost every color use as this row always has linked text. I suggest just to replace both colors to lighter colors variants used in {{Infobox musical artist/color}}.

Extended play by artist (old: #ffa07a) Extended play by artist (new: #f4bf92)
Compilation album by artist (old: #8fbc8f) Compilation album by artist (new: #bfe0bf)

Solidest (talk) 15:52, 18 June 2022 (UTC)Reply

To editor Solidest:   done? and curious about the other dark bg's as well as why these two changes fail the test on the /doc page? P.I. Ellsworth , ed. put'r there 16:31, 18 June 2022 (UTC)Reply
Please change color for single album (use the same color as EP), greatest hits album, remix album, box set, and mixtape (use the same color as compilation album) too. PepeBonus (talk) 06:57, 19 June 2022 (UTC)Reply
@Paine Ellsworth Please help to update "single album", "greatest hits", "box set", and "remix album" to the following code (due to read mode limitations, please go to into edit mode and copy-paste the coding as the "& #32;" syntax is rendering in read mode, sorry for the inconvenience) :
<includeonly>{{#switch: {{lc:{{{1|}}}}}
  |extended play|ep|[[extended play]]|[[ep]]=&amp;#32;#f4bf92
  |studio album|[[studio album]]|[[album]]|album|studio|tribute|tribute album|[[tribute album]]|cover album|[[cover album]]|cover||double album|[[double album]]=lightsteelblue
  |single album|[[single album]]=&amp;#32;#f4bf92
  |demo=lightsteelblue
  |live album|[[album#live|live album]]|[[live album]]|live=burlywood
  |greatest hits|[[greatest hits]]|gh|greatest=&amp;#32;#bfe0bf
  |box set|[[box set]]|box|[[boxed set]]=&amp;#32;#bfe0bf
  |compilation album|[[compilation album]]|comp|compilation=&amp;#32;#bfe0bf
  |remix album|remix|[[remix]]|[[remix album]]|mixtape|[[mixtape]]=&amp;#32;#bfe0bf
  |movie soundtrack|[[soundtrack]]|[[soundtrack album]]|soundtrack=gainsboro
  |television theme|television|theme=gainsboro
  |film score|[[film score]]|film=gainsboro
  |cast recording|[[cast recording]]|cast album|[[cast album]]|cast=gainsboro
  |video|vhs|vid|dvd=&amp;#32;#99CCFF
  |single|[[single (music)|single]]|singles|[[single (music)|singles]]=khaki
  |song|[[song]]=&amp;#32;#E6E8FA
  |other=peachpuff
  |{{#if:{{{2|}}}|{{{2}}}|peachpuff}}
}}</includeonly><noinclude>
{{Documentation}}</noinclude>
Rationale is as mentioned by Solidest above, where lightsalmon (#ffa07a) and darkseagreen (#8fbc8f) both fails MOS:CONTRAST in which only "extended play" and "compilation album" coding were updated. Thanks! Paper9oll (🔔📝) 04:58, 20 June 2022 (UTC)Reply
To editor Paper9oll: the above code was checked in "preview" and without the &#32; the number sign renders as "1.", so that needs further testing. You say that the &#32; syntax is rendering in read mode. What does that mean? and can you show an example? P.I. Ellsworth , ed. put'r there 15:00, 20 June 2022 (UTC)Reply
@Paine Ellsworth Ah I know why it works for you, because you type "& amp;#32;" (ignore the spacing) while I type "&#32 ;" (ignore the spacing). The &#32; is actually within the code when you make the changes per this diff (do you happen to see that or is it my browser problem, I don't know), the above code I simply copy-paste from the live version and replaced "lightsalmon" with "&#32;#f4bf92" and darkseagreen with "&#32;#bfe0bf" other than that nothing was changed. Paper9oll (🔔📝) 15:21, 20 June 2022 (UTC)Reply
Now I see what you mean. It looks like the next edit request takes care of those color contrast changes. P.I. Ellsworth , ed. put'r there 15:30, 20 June 2022 (UTC)Reply

Improving the code

edit

I've reworked the code with few improvements:

  • it includes the changes from the request above (replacing non-accessible color variants for ep/compilation and so on)
  • replaced wikilinked values with the use of {{delink}}
  • excluded unusual variants, such as "gh", "movie soundtrack", "vid", etc. I've checked the number of uses of every aka from this template and {{Infobox album/link}} (must be synchronised, but were not) via the search, and removed poorly used or unused values. This will result about 30-50 articles to be added to Category:Music infoboxes with unknown value for type that I'm going to fix manually.
  • also formatted the code to the prettier view and removed duplicated colors thereby.

So the whole template can be replaced with the following code:

{{Infobox album/color}} code:

<includeonly>{{#switch: {{lc:{{delink|{{{1|}}}}}}}<!--

-->|studio album|studio|album
   |tribute|tribute album
   |cover album|cover
   |double album
   |demo                                          = lightsteelblue<!--

-->|extended play|ep
   |single album                                  = &#32;#F4BF92<!--

-->|live album|live                               = burlywood<!--

-->|compilation album|compilation
   |greatest hits|greatest
   |box set|box
   |remix album|remix
   |mixtape                                       = &#32;#BFE0BF<!--

-->|soundtrack album|soundtrack
   |television theme|television
   |film score|film
   |cast recording|cast album|cast                = gainsboro<!--

-->|video|dvd                                     = &#32;#99CCFF<!--

-->|single|singles                                = khaki<!--

-->|song                                          = &#32;#E6E8FA<!--

-->|other                                         = peachpuff<!--

-->|{{#if:{{{2|}}}|{{{2}}}|peachpuff}}
}}</includeonly><noinclude>
{{Documentation}}</noinclude>

The paired code for {{Infobox album/link}}:

{{#switch: {{lc:{{delink|{{{1|}}}}}}}<!--

-->|studio album|studio|album
   |tribute|tribute album
   |cover album|cover
   |double album                                  = [[Album|Studio album]]
   |demo                                          = [[Demo (music)|Demo album]]<!--

-->|extended play|ep                              = [[Extended play|EP]]
   |single album                                  = [[Single album]]<!--

-->|live album|live                               = [[Album#Live|Live album]]<!--

-->|compilation album|compilation                 = [[Compilation album]]
   |greatest hits|greatest                        = [[Greatest hits album]]
   |box set|box                                   = [[Box set]]
   |remix album|remix                             = [[Remix album]]
   |mixtape                                       = [[Mixtape]]<!--

-->|soundtrack album|soundtrack                   = [[Soundtrack album]]
   |television theme|television                   = [[Soundtrack|Television theme]]
   |film score|film                               = [[Film score]]
   |cast recording|cast album|cast                = [[Cast recording]]<!--

-->|video|dvd                                     = [[Music video|Video]]<!--

-->|other                                         = [[Timeline of audio formats|Recording]]<!--

-->|#default={{{1|}}}{{main other |[[Category:Music infoboxes with unknown value for type|A]]|}}
}}<noinclude>
{{Documentation}}</noinclude>

There shouldn't be any problems, as I've tested and used such code in a linked template of the same functionality on the Russian Wikipedia. Solidest (talk) 20:39, 18 June 2022 (UTC)Reply

@Paine Ellsworth, I've just replaced the capitalisation of the hex codes for one view (so that it also conforms to the {{Infobox song/color}} format), and you've already inserted the previous version. So another change is needed here :) Solidest (talk) 15:39, 20 June 2022 (UTC)Reply
Or maybe we should make them lowercase instead? I'm not sure about the policy on writing templates about this. Solidest (talk) 15:40, 20 June 2022 (UTC)Reply
We'll wait for awhile, so as not to overload the servers with too many changes. This template is used on 184K pages. So you have time to figure out just what is needed. (I've never seen a hexcode usage where case made a difference – both uc and lc work equally well.) P.I. Ellsworth , ed. put'r there 15:43, 20 June 2022 (UTC)Reply
@Paine Ellsworth, I guess uppercase is correct per Help:Using colours, {{Infobox color}}, Web colors#Hex triplet (although a lowercase also occurs in documentation – {{Infobox#Subboxes}}). Solidest (talk) 16:40, 20 June 2022 (UTC)Reply
@Paine Ellsworth, so what's about the final change of the hex-codes case? so that the tests worked correctly. Based on the manuals, it's recommended to 1) use a single formatting within the code, and then 2) not change the previous formatting style within the whole code. So it was correct to add uppercase initially. Solidest (talk) 12:04, 12 July 2022 (UTC)Reply
  Done. P.I. Ellsworth , ed. put'r there 18:12, 13 July 2022 (UTC)Reply
  • And for historical purposes, removed poorly used variants from both /color and /link: boxed set, comp, cover version, gh, lp, movie soundtrack, original studio album, theme, tv, vhs, vid. Solidest (talk) 16:46, 20 June 2022 (UTC)Reply