Revision as of 06:53, 19 April 2006 view sourceLocke Cole (talk | contribs)Extended confirmed users, File movers, Pending changes reviewers, Rollbackers18,900 editsm moved User:Locke Cole/Template:Chronology to Template:Chronology: moving into template space; for use with Template:Infobox Single and Template:Album infobox.← Previous edit | Latest revision as of 19:18, 14 April 2024 view source Jdlrobson (talk | contribs)Extended confirmed users, Template editors2,780 edits Special:LintErrors/night-mode-unaware-background-colorTags: Mobile edit Mobile web edit Advanced mobile edit | ||
(164 intermediate revisions by 56 users not shown) | |||
Line 1: | Line 1: | ||
<includeonly>{{{{{|safesubst:}}}#invoke:Unsubst-infobox||$params=artist,type,prev_title,prev_title2,prev_year,title,title2,year,next_title,next_title2,next_year|$extra=prev_title2,title2,next_title2|$indent=1|$flags=override|$B={{Infobox | |||
<noinclude><table class="infobox" style="width: 20em;"></noinclude>{{#if:{{{Artist|}}} | |||
| child = yes | |||
| | |||
| headerstyle = background: {{Template:Infobox album/color|{{{type|}}}}} | |||
<tr style="text-align: center;"> | |||
| header1 = {{#if:{{{artist|}}}|{{#invoke:String|replace|error_category=Music infoboxes with Module:String errors{{!}}C|{{{artist}}}{{#switch:{{lc:{{{type|}}}}}|single|]|singles|]= singles|video= video}}|singles singles|singles}} chronology}} | |||
<th style="background: {{{Background|#ffff00}}};" colspan="3">{{{Artist}}} {{#if:{{{Type<includeonly>|</includeonly>}}}|{{{Type}}} }}chronology</th> | |||
| data2 = | |||
</tr> | |||
{{(!}} 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:{{{artist|}}}||<hr/>}}{{#if:{{{prev_title|}}}|{{#switch:{{lc:{{{type|}}}}}|single|]|singles|]="{{{prev_title}}}" {{#if:{{{prev_version|}}}|({{{prev_version}}}) }}{{#if:{{{prev_title2|}}}| / "{{{prev_title2|}}}"}}|''{{{prev_title}}}''}}{{#if:{{{prev_year|}}}|<br />({{{prev_year}}})}}}} | |||
<td style="width: 33%;" valign="top"><hr /></td> | |||
{{!}} style="width: 33%; text-align: center; vertical-align: top; padding: .2em .1em" {{!}} {{#if:{{{artist|}}}||<hr/>}}{{#if:{{{title|}}}|{{#switch:{{lc:{{{type|}}}}}|single|]|singles|]={{#if:{{{title2|}}}|"{{#switch:{{{title}}}|{{BASEPAGENAME}}|{{PAGENAMEBASE}}='''{{{title}}}'''|{{{title}}}}}"{{#if:{{{version|}}}| ({{{version}}})}} / "{{#switch:{{{title2}}}|{{BASEPAGENAME}}|{{PAGENAMEBASE}}='''{{{title2}}}'''|{{{title2}}}}}"|"'''{{{title}}}'''"{{#if:{{{version|}}}| ({{{version}}})}}}}|'''''{{{title}}}'''''}}{{#if:{{{year|}}}|<br />({{{year}}})}}}} | |||
<td style="width: 33%;" valign="center"><hr /></td> | |||
{{!}} style="width: 33%; text-align: center; vertical-align: top; padding: .2em 0 .2em .1em" {{!}} {{#if:{{{artist|}}}||<hr/>}}{{#if:{{{next_title|}}}|{{#switch:{{lc:{{{type|}}}}}|single|]|singles|]="{{{next_title}}}" {{#if:{{{next_version|}}}|({{{next_version}}}) }}{{#if:{{{next_title2|}}}| / "{{{next_title2|}}}"}}|''{{{next_title}}}''}}{{#if:{{{next_year|}}}|<br />({{{next_year}}})}}}} | |||
<td style="width: 33%;" valign="top"><hr /></td> | |||
{{!}}- | |||
</tr> | |||
}} | {{!)}} | ||
}}{{#if:{{#ifeq:{{str left|{{{prev_title|}}}|22}}|<div class="plainlist"|1|}}{{#ifeq:{{str left|{{{title|}}}|22}}|<div class="plainlist"|1|}}{{#ifeq:{{str left|{{{next_title|}}}|22}}|<div class="plainlist"|1|}}|]}}{{#if:{{#invoke:String|match|error_category=Music infoboxes with Module:String errors{{!}}C|1={{{prev_title|}}}{{{prev_year|}}}{{{title|}}}{{{year|}}}{{{next_title|}}}{{{next_year|}}}{{{artist|}}}{{{type|}}}{{{prev_title2|}}}{{{title2|}}}{{{next_title2|}}}x|2=</?t|nomatch=}}|]}}{{#invoke:Check for unknown parameters|check|unknown={{main other|]}}|preview=Page using ] with unknown parameter "_VALUE_"|ignoreblank=y| | artist | next_title | next_title2 | next_year | prev_title | prev_title2 | prev_year | title | title2 | type | year | version | prev_version | next_version}}}}</includeonly><noinclude> | |||
<tr style="text-align: center; font-size: smaller;"> | |||
{{Documentation}} | |||
<td style="width: 33%;" valign="top">{{{Last single<includeonly>|</includeonly>}}}</td> | |||
<td style="width: 33%;" valign="center">{{{This single}}}</td> | |||
<td style="width: 33%;" valign="top">{{{Next single<includeonly>|</includeonly>}}}</td> | |||
</tr><noinclude></table> | |||
==Usage== | |||
<pre>{{User:Locke Cole/Template:Chronology | |||
| | |||
| | |||
| | |||
| | |||
| This single = | |||
| | |||
}}</pre> | |||
'''Notes:''' Optional items are in brackets with the default after the equal sign. If you omit ''Artist'' the section caption is not displayed (and instead horizontal lines are used). The ''Type'' field is for use with singles (generally you should pass it as <code>singles</code>). | |||
</noinclude> | </noinclude> |
Latest revision as of 19:18, 14 April 2024
Template documentation[view] [edit] [history] [purge]This template is used on approximately 16,000 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them. |
This template uses Lua: |
Usage
Main page: Template:Infobox album § Template:Extra chronologyExtra chronologies may be added to {{Infobox album}} and {{Infobox song}}, depending on which version of this template is used. Both add the proper header, color, and formatting (depending on the |type=
designation) and are added to the infoboxes in the |misc=
field.
If this template is substituted, it will return a cleaned-up copy of itself (see Misplaced Pages:Substitution trick) with unnecessary parameters removed and deprecated parameters replaced. Parameter indentation will also automatically be fixed.
Infobox album version
{{{artist}}} chronology | ||||
---|---|---|---|---|
| ||||
The album version provides the previous, current, and next albums and the years of their release. The titles appear in italics, with the current title also in bold. Extra formatting does not usually need to be added.
- Code
{{Infobox album ... | misc = {{subst:Extra chronology | artist = | type = | prev_title = | prev_year = | title = | year = | next_title = | next_year = }} }}
- artist
- The name of the artist, with
live album
,EP
, etc., appended to produce either "Artist live album chronology", "Artist EP chronology", etc. If just the artist's name is used, the header will display "Artist chronology". - type
- Specify
studio
,live
,compilation
, etc., as detailed in {{Infobox album/doc/type}} – this triggers the header color and formatting. - prev_title
- Enter the name of the previous album. If it has a WP article, add a link.
- prev_year
- The year the previous album was released.
- title
- Enter the name of the current or article title. This should not be wikilinked, since it should be the subject of the article.
- year
- The year the current album was released.
- next_title
- Enter the name of the next album and link as appropriate.
- next_year
- The year the next album was released.
- Notes
- All parameters are optional except
|title=
and|type=
. Horizontal lines replace the header row if you omit|artist=
.
Infobox song version
{{{artist}}} singles chronology | ||||
---|---|---|---|---|
| ||||
In addition to providing the previous, current, and next singles and the years of their release, the single version allows two song titles to be entered. This is useful for double A-side singles, such as "Ruby Tuesday"/"Let's Spend the Night Together". The titles appear in quotes, with the current title also in bold. Extra formatting does not usually need to be added.
- Code
{{Infobox song ... | misc = {{subst:Extra chronology | artist = | type = single | prev_title = | prev_title2 = | prev_year = | title = | title2 = | year = | next_title = | next_title2 = | next_year = }} }}
- artist
- Enter the name of the artist to produce "Artist singles chronology". (The word "singles" is automatically added for singles chronologies.) Adding
American
,UK
, etc. after "Artist" will display "Artist American singles chronology", "Artist UK singles chronology", etc. - type
- Specify
single
. (In the event that another|type=
is used in Infobox song, specifysong
so that a light blue color will be produced). - prev_title
- Enter the name of the previous single. If it has a WP article, add a link.
- prev_title2
- Leave blank, unless the previous is a double A-side single. Then enter the name of the previous single second or flip side and link as appropriate.
- prev_year
- The year the previous single was released.
- title
- Enter the name of the current or article title. This should not be wikilinked, since it should be the subject of the article.
- title2
- Leave blank, unless it is a double A-side single. Then enter the name of the second or flip side of current or article title.
- year
- The year the current single was released.
- next_title
- Enter the name of the next single. If it has a article, add a link.
- next_title2
- Enter the name of the second or flip side of next single, if it is a double-A. Link as appropriate.
- next_year
- The year the next single was released.
- Notes
- All parameters are optional except
|title=
and|type=
. Horizontal lines replace the header row if you omit|artist=
.
Tracking categories
- Category:Music infoboxes with malformed table placement (0)
- Category:Pages using extra chronology with unknown parameters (0)
TemplateData
This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Extra chronology in articles based on its TemplateData.TemplateData for Extra chronology
For use with {{Infobox album}} or {{Infobox single}} – adds an extra chronology range. If there are deprecated parameters, substitute the template and it will clean itself up.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Type | type | To specify single or a type of album. Valid values are: single, studio, demo, ep, live, greatest, remix, box, compilation, mixtape, soundtrack, film, cast, video, other | String | required |
Artist | artist | The name of the recording artist | String | suggested |
Previous title | prev_title | The title of the artist's previous release. Add a link if an article exists
| String | suggested |
Previous title (2) | prev_title2 | The second title of the artist's previous release, for double A-sides only. Add a link if an article exists
| String | optional |
Previous year | prev_year | The year that the previous work was released
| Date | suggested |
Title | title | The title of the current release. No formatting required. For double A-sides only, if this is the other side add a wikilink if an article exists
| String | required |
Title (2) | title2 | The second title of the current release, for double A-sides only. If this is the other side then add a link if an article exists
| String | optional |
Year | year | The year that the current work was released
| Date | required |
Next title | next_title | The title of the artist's following release. Add a link if an article exists
| String | suggested |
Next title (2) | next_title2 | The second title of the artist's following release, for double A-sides only. Add a link if an article exists
| String | optional |
Next year | next_year | The year the following work was released
| Date | suggested |
Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages.
Add categories to the /doc subpage. Subpages of this template. Categories: