Template:Infobox song: Difference between revisions
MusikAnimal (talk | contribs) No edit summary |
MusikAnimal (talk | contribs) No edit summary |
||
(148 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<templatestyles src="Template:Infobox song/styles.css" /><templatestyles src="Template:Infobox/styles.css" /><noinclude>{{#cargo_declare:_table=songs | |||
|name = String(mandatory=1) | |||
|type = List (,) of String (mandatory=1;allowed values=song,single,promo,cover,instrumental) | |||
|artist = Page (mandatory=1;allowed values=The Smashing Pumpkins,Billy Corgan,James Iha,Jimmy Chamberlin Complex,Zwan,Various artists) | |||
|original_artist = String | |||
|main_album = Page | |||
|song_release_date = Date | |||
|writer = List (,) of Page | |||
|video = Boolean | |||
|spotify = String(size=40) | |||
|discogs = Integer | |||
|musicbrainz = String | |||
|cover = File | |||
}}</noinclude>{{#invoke:Infobox song|infobox| | |||
| bodyclass = vevent | | bodyclass = vevent | ||
| aboveclass = summary | | aboveclass = summary | ||
| abovestyle = background-color: {{Infobox song/color|{{{type|{{{Type|}}}}}} }}; | | abovestyle = background-color: {{Infobox song/color|{{{type|{{{Type|}}}}}} }}; | ||
| image = {{#invoke:InfoboxImage|InfoboxImage|image={{{image|{{{cover|{{{Cover|}}}}}}}}}|size={{{cover_size|{{{cover size|{{{Cover size|}}}}}}}}}|upright={{{cover_upright|}}}|sizedefault=frameless|alt={{{alt|{{{Alt|}}}}}}|border={{{border|{{{Border|}}}}}}}} | | image = {{#invoke:InfoboxImage|InfoboxImage|image={{{image|{{{cover|{{{Cover|}}}}}}}}}|size={{{cover_size|{{{cover size|{{{Cover size|}}}}}}}}}|upright={{{cover_upright|}}}|sizedefault=frameless|alt={{{alt|{{{Alt|}}}}}}|border={{{border|{{{Border|}}}}}}}} | ||
Line 12: | Line 24: | ||
| rowclass1 = description | | rowclass1 = description | ||
| header1 = {{Infobox song/link|{{{type|{{{Type|}}}}}} }} {{#if:{{{artist|}}}{{{Artist|}}}{{{ | | header1 = {{Infobox song/link|{{{type|{{{Type|}}}}}} }} {{#if:{{{artist|}}}{{{Artist|}}}|by {{#ifexist:{{delink|{{{artist|{{{Artist|}}}}}}}}|[[{{delink|{{{artist|{{{Artist|}}}}}}}}]]|{{{artist|{{{Artist|}}}}}}}} | ||
{{#if:{{{original_artist|}}}|<br/><small>''Original by {{{original_artist}}}''</small>}}|{{#ifeq:{{{type|}}}|cover|[[Category:Cover songs missing original_artist field in infobox]]}}}}{{#if:{{{side_project|}}}|<br/><small>''[[:Category:Side projects|Side project]] of [[{{delink|{{{side_project}}}}}]]''</small>}} | |||
| rowclass2 = description | | rowclass2 = description | ||
| header2 = {{#if:{{{album|}}}{{{Album|}}}{{{ | | header2 = <div class="song-links"><!-- | ||
-->{{#if:{{album image|{{{album|}}}}}|<span><div>[[File:{{#if:{{{album_photo|}}}|{{{album_photo|Smashing Pumpkins - Mellon Collie And The Infinite Sadness.jpg}}}|{{album image|{{{album}}}}}}}|40px|link={{delink|{{{album}}}}}]]</div>[[{{delink|{{{album}}}}}|Album]]</span>}}<!-- | |||
-->{{#ifeq:{{yesno-yes|{{{lyrics|}}}}}|yes|<span><div class="mw-no-invert">[[File:Breezeicons-actions-22-view-media-lyrics.svg|40px|link=#Lyrics|alt=Lyrics]]</div>[[#Lyrics|Lyrics]]</span>|[[Category:Instrumental songs]]}}<!-- | |||
-->{{#if:{{{notabs|}}}||{{#ifexist:Tab:{{PAGENAME}}|<span><div class="mw-no-invert">[[File:Guitar (23727) - The Noun Project.svg|40px|link=Tab:{{PAGENAME}}]]</div>[[Tab:{{PAGENAME}}|Tabs]]</span>|<span class="plainlinks"><div>[[File:Guitar (23727) - The Noun Project.svg|40px|link=https://www.ultimate-guitar.com/search.php?search_type=title&value={{urlencode:{{delink|{{{artist|The Smashing Pumpkins}}}}}|QUERY}}%20{{urlencode:{{{name|{{PAGENAME}}}}}|QUERY}}]]</div>[https://www.ultimate-guitar.com/search.php?search_type=title&value={{urlencode:{{delink|{{{artist|The Smashing Pumpkins}}}}}|QUERY}}%20{{urlencode:{{{name|{{PAGENAME}}}}}|QUERY}} Tabs]</span>}}}}<!-- | |||
-->{{#if:{{{video|}}}|<span><div>[[File:Video Camera - The Noun Project.svg|40x40px|link=#Music video]]</div>[[#Music video|Video]]</span>}}<!-- | |||
-->{{#if:{{{spotify|}}}|<span class="plainlinks"><div>[[File:Spotify logo without text.svg|40px|link=https://open.spotify.com/track/{{{spotify}}}]]</div>[https://open.spotify.com/track/{{{spotify}}} Spotify]</span>}} | |||
</div> | |||
| label3 = Language | | label3 = Language | ||
| data3 = {{{language|{{{Language|}}}}}} | | data3 = {{{language|{{{Language|}}}}}} | ||
Line 22: | Line 40: | ||
| data4 = {{{English_title|{{{english_title|}}}}}} | | data4 = {{{English_title|{{{english_title|}}}}}} | ||
| label5 = <span class="nowrap"> | | label5 = <span class="nowrap">A-side</span> | ||
| data5 = {{#if:{{{A-side|{{{a-side|}}}}}}|{{#if:{{#invoke:String|match|error_category=Music infoboxes with Module:String errors{{!}}C|1={{{A-side|{{{a-side}}}}}}|2="|nomatch=}}|{{{A-side|{{{a-side}}}}}}|"{{{A-side|{{{a-side}}}}}}"}}}} | | data5 = {{#if:{{{A-side|{{{a-side|}}}}}}|{{#if:{{#invoke:String|match|error_category=Music infoboxes with Module:String errors{{!}}C|1={{{A-side|{{{a-side}}}}}}|2="|nomatch=}}|{{{A-side|{{{a-side}}}}}}|"{{{A-side|{{{a-side}}}}}}"}}}} | ||
| class5 = plainlist | | class5 = plainlist | ||
| label6 = <span class="nowrap"> | | label6 = <span class="nowrap">B-side</span> | ||
| data6 = {{#if:{{{B-side|{{{b-side|}}}}}}|{{#if:{{#invoke:String|match|error_category=Music infoboxes with Module:String errors{{!}}C|1={{{B-side|{{{b-side}}}}}}|2="|nomatch=}}|{{{B-side|{{{b-side}}}}}}|"{{{B-side|{{{b-side}}}}}}"}}}} | | data6 = {{#if:{{{B-side|{{{b-side|}}}}}}|{{#if:{{#invoke:String|match|error_category=Music infoboxes with Module:String errors{{!}}C|1={{{B-side|{{{b-side}}}}}}|2="|nomatch=}}|{{{B-side|{{{b-side}}}}}}|"{{{B-side|{{{b-side}}}}}}"}}}} | ||
| class6 = plainlist | | class6 = plainlist | ||
Line 37: | Line 55: | ||
| label10 = Released | | label10 = Released | ||
| class10 = plainlist | | class10 = plainlist | ||
| data10 = {{{released|{{#invoke:Infobox song|validateOrFetchReleaseDate|{{{artist|}}}|{{{name|{{PAGENAME}}}}}}}}}} | |||
| label11 = Format | | label11 = Format | ||
Line 44: | Line 62: | ||
| class11 = hlist | | class11 = hlist | ||
| label12 = | | label12 = {{#if:{{{recorded|}}}|Recorded<includeonly>[[Category:Infobox song using recorded parameter]]</includeonly>|[[Studio sessions]]}} | ||
| class12 = plainlist | | class12 = plainlist | ||
| label13 = Studio | | label13 = Studio | ||
| class13 = plainlist | | class13 = plainlist | ||
Line 68: | Line 84: | ||
| label40 = <span class="nowrap">Songwriter(s)</span> | | label40 = <span class="nowrap">Songwriter(s)</span> | ||
| class40 = hlist | | class40 = hlist | ||
Line 80: | Line 95: | ||
| label43 = <span class="nowrap">Producer(s)</span> | | label43 = <span class="nowrap">Producer(s)</span> | ||
| class43 = hlist | | class43 = hlist | ||
Line 99: | Line 113: | ||
| data63 = {{{tracks|{{{Tracks|}}}}}} | | data63 = {{{tracks|{{{Tracks|}}}}}} | ||
| | | belowclass = nomobile | ||
}}{{main other|{{#if:{{{Type|}}}{{{Writer|}}}{{{Tracks|}}}{{{Recorded|}}}{{{Length|}}}{{{prev|}}}{{{next|}}}{{{prev_no|}}}{{{track_no|}}}{{{next_no|}}}{{{Chronology|}}}{{{Name|}}}{{{Cover|}}}{{{cover size|}}}{{{Cover size|}}}{{{Alt|}}}{{{Border|}}}{{{Caption|}}}{{{Artist|}}}{{{ | }}{{main other|{{#if:{{{Type|}}}{{{Writer|}}}{{{Tracks|}}}{{{Recorded|}}}{{{Length|}}}{{{prev|}}}{{{next|}}}{{{prev_no|}}}{{{track_no|}}}{{{next_no|}}}{{{Chronology|}}}{{{Name|}}}{{{Cover|}}}{{{cover size|}}}{{{Cover size|}}}{{{Alt|}}}{{{Border|}}}{{{Caption|}}}{{{Artist|}}}{{{side_project|}}}{{{Album|}}}{{{from Album|}}}{{{Language|}}}{{{a-side|}}}{{{b-side|}}}{{{Written|}}}{{{Published|}}}{{{Released|}}}{{{Format|}}}{{{Studio|}}}{{{Venue|}}}{{{Genre|}}}{{{Label|}}}{{{Composer|}}}{{{Lyricist|}}}{{{Producer|}}}{{{prev_single|}}}{{{next_single|}}}{{{Misc|}}}{{{Last single|}}}{{{last_single|}}}{{{This single|}}}{{{this_single|}}}{{{Next single|}}}|[[Category:Pages using infobox song with deprecated parameters]]}}{{#invoke:Check for unknown parameters|check|unknown=[[Category:Pages using infobox song with unknown parameters|_VALUE_{{PAGENAME}}]]|preview=Page using [[Template:Infobox song]] with unknown parameter "_VALUE_"|ignoreblank=y|type|Type|EP|writer|Writer|title2|tracks|Tracks|recorded|Recorded|length|Length|prev_track|prev|next_track|next|prev_no|track_no|next_no|chronology|Chronology|name|Name|title|image|cover|Cover|cover_size|cover size|Cover size|cover_upright|alt|Alt|border|Border|caption|Caption|artist|Artist|nonstandard_artist|side_project|original_artist|album|Album|from_album|from Album|album_photo|notabs|spotify|video|language|Language|English_title|english_title|A-side|a-side|B-side|b-side|written|Written|published|Published|released|Released|format|Format|studio|Studio|venue|Venue|genre|Genre|label|Label|composer|Composer|lyricist|Lyricist|producer|Producer|prev_title|next_title|prev_single|next_single|__µ|prev_title2|prev_year|next_year|year|next_title2|misc|lyrics|Misc|discogs|musicbrainz|is_ep|released_cargo}} | ||
}}<noinclude> | }}<noinclude> | ||
<!-- please place language and category links on the /doc page and not here --> | <!-- please place language and category links on the /doc page and not here --> | ||
{{documentation}} | {{documentation}} | ||
</noinclude> | </noinclude> |
Latest revision as of 02:51, 10 August 2024
This template defines the table "songs". View table.
"Template:Infobox song" | |
---|---|
Song | |
This template uses Lua: |
Articles about songs should include an infobox that provides an overview or summary of the song.
Code
The first template code below includes the most commonly used infobox parameters. If there is no information in the article to support the field, leave it blank. Remove the <!--
and -->
to use the {{Start date}} and {{Duration}} subtemplates.
The second includes the full set of parameters; most articles will not need many of the fields and they may be left blank or removed. Please note that adding fields other than those listed, such as |arranger=
or |recording engineer=
, will not be displayed.
Most commonly used parameters
{{subst:Infobox song | name = | cover = <!--just the file name--> | type = | artist = | album = | B-side = | released = <!--{{Start date|YYYY|MM|DD}}--> | format = | recorded = | studio = | genre = | length = | label = | writer = <!--for both music and lyrics--> | producer = | prev_title = <!--for a singles chronology--> | prev_year = | next_title = | next_year = }}
TemplateData
An infobox for songs
Parameter | Description | Type | Status | |
---|---|---|---|---|
Name | name Name title | The name or title of the song.
| String | required |
Cover | cover Cover image | An appropriate image, such as a sheet music or single picture sleeve cover.
| String | suggested |
Cover_size | cover_size Cover size cover size | no description | String | optional |
Alt | alt Alt | Alternative text for the cover image, to describe it to visually impaired readers. | String | optional |
Border | border Border | Set to yes to put a 1 pixel border around the image. | String | optional |
Caption | caption Caption | Caption for the image; this will overwrite automatically generated <"Song" cover> when a file is added to the "caption" field
| String | optional |
Type ("song", "single", "promo", "cover", "composition") | type Type | Specify "song", "single", "promo", "Instrumental", "Composition", etc. This generates the header and color. | String | suggested |
Artist | artist Artist | The name of the artist. | String | suggested |
Album | album Album from_album from Album | The name of the album on which the song originally appeared. | String | suggested |
EP | EP | The name of the EP on which the song originally appeared. Only use album or EP; both will not be displayed. | String | optional |
A-side | A-side a-side | For singles: the name of A-side of the current or title single. | String | optional |
B-side | B-side b-side | For singles: the name of the B-side of the current or title single. Only one of the fields 'A-side' or 'B-side' should be used. | String | optional |
Written | written Written | The date the song was written; this is usually used for songs created before music publishing or recording | Date | optional |
Published | published Published | The date the song was published; this is usually used for songs created before the rise of music recording | Date | optional |
Released | released Released | Date or year of earliest commercial release. | String | suggested |
Format | format Format | For recorded music: the way that the song was released, e.g., 7-inch single, LP record, EP, CD, cassette, digital download (note the piped download link), etc. | String | optional |
Recorded | recorded Recorded | The date(s) the song was recorded. | String | suggested |
Studio | studio Studio | If the song was recorded in a recording studio, enter the name and location. | String | suggested |
Venue | venue Venue | For live recordings, include the name of the venue (concert hall, stadium, etc.) and location. | String | optional |
Genre | genre Genre | The genre(s) that best describes the song. This must not be original research, and should be stated and referenced in the article. | String | optional |
Length | length Length | The length of the song in minutes and seconds, such as 3:45 | Number | suggested |
Label | label Label | The record company label which originally released the recording. Releases in other territories, different formats, reissues, etc., should be included in the body of the article, not in this field. | String | optional |
Songwriter(s) | writer Writer songwriter Songwriter | Comma-separated list of persons credited with writing the song
| String | required |
Composer | composer Composer | The name of the person(s) who composed the song's music, if different than the lyricist. If not differentiated in the article, use the "songwriter/writer" field instead. | String | optional |
Lyricist | lyricist Lyricist | The person(s) who wrote the lyrics, if different than the song's composer. If not differentiated in the article, use the "songwiter/writer" field instead. | String | optional |
Producer(s) | producer Producer | Comma-separated list of persons credited with the production
| String | suggested |
Chronology | chronology Chronology | For singles: Header for the chronology section.
| String | optional |
Title | title | The name of the current or subject single. | String | optional |
Title2 | title2 | For a double A-side single: the name of the second or flip-side of the current single in the artist's chronology. | String | optional |
Year | year | To change the automatically generated year: the year of the single in the artist's chronology. | Number | optional |
Tracks | tracks Tracks | To add a full-album track listing. | String | optional |
Misc | misc Misc | To add extra subtemplates, such as {{Extra chronology}}, {{Extra track listing}}, {{Extra album cover}}, {{Audio sample}}, etc. | String | optional |
ISWC | ISWC | no description | String | deprecated |
Comment | comment Comment | no description | String | deprecated |
Lyrics | lyrics | Set to "yes" if there are lyrics. There should be a section on the page called "Lyrics"
| Boolean | required |
notabs | notabs | no description | Unknown | optional |
Has video? | video | Enter "yes" if there's an associated video in a section on the page called "Music video". Leave blank or enter "no" if there is no video. | Boolean | suggested |
Spotify ID | spotify | Enter the song ID on Spotify, and this will generate a link to it | String | suggested |
Discogs master ID | discogs | no description | Number | optional |
MusicBrainz release-group ID | musicbrainz | no description | String | optional |
Side project of | side_project | The name of the band member, etc.
| Page name | optional |
Original artist | original_artist | The artist who originally wrote or takes credit for this song | String | optional |
Nonstandard artist | nonstandard_artist | Set this for songs we want to document on the wiki, but aren't necessarily in scope. Setting this will not categorize the song by the artist, among other things.
| Boolean | optional |
Is EP | is_ep | Set this to 1 if the song release charted on an albums chart, or is otherwise treated as an EP and not just a single. | Boolean | optional |
Tracking categories
- Category:Pages using infobox song with deprecated parameters (173)
- Category:Pages using infobox song with unknown parameters (0)
- Category:Infobox song with A-side or B-side quote formatting fix needed (0)
- Category:Songs with unknown writers (58)
- Category:Song articles with both composer and songwriter (0)
- Category:Song articles with both lyricist and songwriter (0)
- Category:Song articles with lyricist but not composer (0)
- Category:Music infoboxes with unknown value for type (0)
- Category:Music infoboxes with malformed table placement (0)
- Category:Music infoboxes with Module:String errors (0)
- Category:Duration without hAudio microformat (1)
See also
The above documentation is transcluded from Template:Infobox song/doc. (edit | history) Editors can experiment in this template's sandbox (edit | diff) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |