Template:Infobox television episode: Difference between revisions
moved italic logic to sub-template and implemented fixes |
Favre1fan93 (talk | contribs) per talk page, removing the producer parameter |
||
(38 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
<includeonly>{{Television episode short description|episode_num={{{episode|}}}|season_num={{{season|}}}|season_num_uk={{{series_no|}}}|series_name={{{series|}}}| |
<includeonly>{{main other|{{Television episode short description|episode_num={{{episode|}}}|season_num={{{season|}}}|season_num_uk={{{series_no|}}}|series_name={{{series|}}}|segment={{{segment|}}}|not_dab={{{not_dab|}}}|limited={{{limited|}}}}}}}<!-- |
||
-->{{Infobox television episode |
-->{{#invoke:Infobox television episode|italic_title}}</includeonly> |
||
{{Infobox |
{{Infobox |
||
| templatestyles = Infobox television episode/styles.css |
|||
| bodyclass = vevent |
| bodyclass = ib-tv-episode vevent |
||
⚫ | |||
| aboveclass = summary |
| aboveclass = summary |
||
| above = <includeonly>{{#invoke:Infobox television episode|above_title}}</includeonly> |
|||
| abovestyle = font-weight: normal; background: #CCCCFF; padding: 0.25em 1em; line-height: normal; |
|||
| above = <includeonly>{{#if: {{{RTitle|}}}{{{rtitle|}}} | '''{{{RTitle|{{{rtitle|}}}}}}''' | "'''{{{title|{{PAGENAMEBASE}}}}}'''" }}</includeonly> |
|||
| headerclass = summary |
| headerclass = summary |
||
⚫ | |||
| headerstyle = background: #CCCCFF; padding: 0.25em 1em; line-height: 1.5em; |
|||
⚫ | |||
| subheaderclass = nowrap |
|||
| subheader = {{#if: {{{series|}}} | |
| subheader = {{#if: {{{series|}}} | ''{{{series}}}'' {{#if: {{{segment|}}} | segment | {{#if: {{#invoke:String2|matchAny|,|/|&|-|–|and|source={{{episode|}}}}} | episodes | episode }} }} }} |
||
| subheaderstyle = font-weight: bold; font-size: 110%; |
|||
| image = {{#invoke:InfoboxImage|InfoboxImage|image={{{image|}}}|size={{{image_size|}}}|sizedefault=frameless|upright={{{image_upright|1 |
| image = {{#invoke:InfoboxImage|InfoboxImage|image={{{image|}}}|size={{{image_size|}}}|sizedefault=frameless|upright={{{image_upright|1}}}|alt={{{image_alt|{{{alt|}}}}}}}} |
||
| caption = {{{caption|}}} |
| caption = {{{caption|}}} |
||
| labelstyle = white-space: nowrap; |
| labelstyle = white-space: nowrap; |
||
| label1 = Episode {{#if: {{{ |
| label1 = Episode {{#if: {{#invoke:String2|matchAny|,|/|&|-|–|and|source={{{episode|}}}}} | {{abbr|nos.|numbers}} | {{abbr|no.|number}} }} |
||
| data1 = {{#if: {{{season|}}} | Season {{{season|}}}<br /> }}{{#if: {{{series_no|}}} | {{nowrap|Series {{{series_no|}}}}}<br /> }}{{#if: {{{episode|}}} | {{#if: {{{ |
| data1 = {{#if: {{{season|}}} | Season {{{season|}}}<br /> }}{{#if: {{{series_no|}}} | {{nowrap|Series {{{series_no|}}}}}<br /> }}{{#if: {{{episode|}}} | {{#if: {{#invoke:String2|matchAny|,|/|&|-|–|and|source={{{episode|}}}}} | Episodes | Episode }} {{{episode|}}} }}{{#ifeq: {{{segment|}}} | yes | (segment) | {{{segment|}}} }} |
||
⚫ | |||
| label2 = Directed by |
| label2 = Directed by |
||
| data2 = {{{director|}}} |
| data2 = {{{director|}}} |
||
| class3 = plainlist |
|||
| label3 = Written by |
| label3 = Written by |
||
| data3 = {{{writer|}}} |
| data3 = {{{writer|}}} |
||
| class4 = plainlist |
|||
| label4 = Story by |
| label4 = Story by |
||
| data4 = {{{story|}}} |
| data4 = {{{story|}}} |
||
| class5 = plainlist |
|||
| label5 = Teleplay by |
| label5 = Teleplay by |
||
| data5 = {{{teleplay|}}} |
| data5 = {{{teleplay|}}} |
||
| label6 = Based on |
| label6 = Based on |
||
| data6 = {{{based_on|}}} |
|||
⚫ | |||
| class7 = plainlist |
|||
| label7 = Narrated by |
| label7 = Narrated by |
||
| data7 = {{{narrator|}}} |
| data7 = {{{narrator|}}} |
||
| class8 = plainlist |
|||
| label8 = Presented by |
| label8 = Presented by |
||
| data8 = {{{presenter|}}} |
| data8 = {{{presenter|}}} |
||
| |
| class9 = plainlist |
||
| |
| label9 = Featured music |
||
⚫ | |||
| label10 = Featured music |
|||
⚫ | |||
| |
| class10 = plainlist |
||
| |
| label10 = Cinematography by |
||
⚫ | |||
| |
| class11 = plainlist |
||
| |
| label11 = Editing by |
||
⚫ | |||
| class12 = plainlist |
|||
| label18 = Production {{#if: {{{multi_episodes|}}} | code(s) | code }} |
|||
| |
| label12 = Production code{{Pluralize from text|{{{production|}}}|plural=s}} |
||
| data12 = {{{production|}}} |
|||
| class13 = plainlist |
|||
| label19 = Original {{#if: {{{release_date|}}} | release | air }} {{#if: {{{multi_episodes|}}} | date(s) | date }} |
|||
| |
| label13 = Original {{#if: {{{release_date|}}} | release | air }} date{{Pluralize from text|{{If empty|{{{release_date|}}}|{{{airdate|}}}}}|plural=s}} |
||
⚫ | |||
| |
| label14 = Running time |
||
| |
| data14 = {{If empty |{{{runtime|}}} |{{{length|}}} }} |
||
| header15 = {{If empty |{{{guests_title|}}} |{{nowrap|Guest appearance{{Pluralize from text|{{{guests|}}}|plural=s}}}}}} |
|||
⚫ | |||
⚫ | |||
| class16 = ib-tv-episode-guests |
|||
⚫ | |||
| |
| data16 = {{{guests|}}} |
||
{{{guests|}}} |
|||
</div> }} |
|||
| |
| header17 = _BLANK_ |
||
| |
| data18 = {{{module|}}} |
||
| class30 = noprint |
| class30 = noprint |
||
Line 84: | Line 85: | ||
| rowclass31 = noprint |
| rowclass31 = noprint |
||
| data31 = {{#if: {{{prev|}}} {{{next |
| data31 = {{#if: {{{prev|}}} {{{next|}}} {{{rprev|}}} {{{rnext|}}} | |
||
{{ |
{{(!}} style="width: 100%; display: inline-table;" |
||
{{!}} style="width: 50%; padding: 0.2em 0.1em 0.2em 0; text-align: center;" {{!}} ← '''Previous'''<br />{{#if: {{{prev|}}} | "{{{prev |
{{!}} style="width: 50%; padding: 0.2em 0.1em 0.2em 0; text-align: center;" {{!}} ← '''Previous'''<br />{{#if: {{{prev|}}} | "{{{prev}}}" | {{#if: {{{rprev|}}} | {{{rprev}}} | — }} }} |
||
{{!}} style="width: 50%; padding: 0.2em 0 0.2em 0.1em; text-align: center;" {{!}} '''Next''' →<br />{{#if: {{{next|}}} | "{{{next |
{{!}} style="width: 50%; padding: 0.2em 0 0.2em 0.1em; text-align: center;" {{!}} '''Next''' →<br />{{#if: {{{next|}}} | "{{{next}}}" | {{#if: {{{rnext|}}} | {{{rnext}}} | — }} }} |
||
{{! |
{{!)}} |
||
}} |
}} |
||
| rowclass32 = noprint |
| rowclass32 = noprint |
||
| data32 = {{#if: {{{season_article|}}} | {{#invoke: |
| data32 = {{#if: {{{season_article|}}} | {{#invoke:String|replace|source={{{season_article}}}|pattern={{#ifeq:{{Str find|{{{season_article}}}|(}}|-1| |
||
<!--No bracket, season/series--> |
|||
{{#ifeq:{{Str find|{{{season_article}}}|series}}|-1| |
|||
^((.*)(season %d+)(.*))$| |
|||
^((.*)(series %d+)(.*))$ |
|||
}}| |
|||
<!--Brackets--> |
|||
^(([^\(]*)(%([^\)]*%))(.*))$ |
|||
}}|replace=[[%1|''%2''%3%4]]|plain=false}} }} |
|||
| belowclass = noprint |
| belowclass = noprint |
||
| below = {{#invoke:Infobox television episode|episode_list}} |
|||
| below = {{#ifeq: {{{episode_list|}}} | {{Replace|{{{episode_list|}}}|]]|}} | {{#invoke:string|replace|{{#invoke:string|replace|{{{episode_list|}}}|^((List of )([^\(]*)(.*)( [^%s]*))$|[[%1|%2''%3''%4%5]]|plain=false}}|^(([^\[][^\(\#]*)(.*))$|[[%1|List of ''%2'' episodes]]|plain=false}} | {{{episode_list|}}}{{Main other|[[Category:Pages using infobox television episode with incorrectly formatted episode list]]}} }} |
|||
}}<!-- |
}}<!--Tracking categories |
||
-->{{#invoke:Check for unknown parameters|check|unknown={{Main other|[[Category:Pages using infobox television episode with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Infobox television episode]] with unknown parameter "_VALUE_"|showblankpositional=1| airdate | alt |
-->{{#invoke:Check for unknown parameters|check|unknown={{Main other|[[Category:Pages using infobox television episode with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Infobox television episode]] with unknown parameter "_VALUE_"|showblankpositional=1| airdate | alt | based_on | caption | director | editor | episode | episode_list | guests | guests_title | image | image_alt | image_size | image_upright | italic_title | length | limited | module | music | narrator | next | not_dab | photographer | presenter | prev | production | release_date | rnext | rprev | rtitle | runtime | season | season_article | segment | series | series_no | story | teleplay | title | writer }}<!-- |
||
-->{{Main other|{{#invoke:Infobox television episode|validate_values}}}}<!-- |
|||
⚫ | |||
--><noinclude> |
|||
{{Documentation}}</noinclude> |
{{Documentation}}</noinclude> |
Latest revision as of 01:27, 16 August 2024
This template is used on approximately 13,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 infobox should italicize the article title automatically. If this is not required, add |italic_title=no to the list of parameters. |
This template adds an automatically generated short description. If the automatic short description is not optimal, replace it by adding {{Short description}} at the top of the article. |
This template uses Lua: |
This template uses TemplateStyles: |
Infobox television episode is used to create an infobox which summarizes the main information of a particular television episode or internet video.
Usage
The infobox may be added by pasting the template as shown below into an article, typically at the top of an article above the lead section. This infobox creates a short description based on the data provided to the infobox. For more information on this, see the documentation at Template:Television episode short description.
"Infobox television episode" | |
---|---|
{{{series}}} episode | |
[[File:{{{image}}}|frameless|alt={{{image_alt}}}|upright=1]] | |
Episode no. | Season {{{season}}} Series {{{series no}}} Episode {{{episode}}} |
Directed by | {{{director}}} |
Written by | {{{writer}}} |
Story by | {{{story}}} |
Teleplay by | {{{teleplay}}} |
Based on | {{{based_on}}} |
Narrated by | {{{narrator}}} |
Presented by | {{{presenter}}} |
Featured music | {{{music}}} |
Cinematography by | {{{photographer}}} |
Editing by | {{{editor}}} |
Production code | {{{production}}} |
Original air date | {{{airdate}}} |
Running time | {{{length}}} |
Guest appearance | |
{{{guests}}} | |
{{Infobox television episode
| series = <!-- without italics or formatting. -->
| image = <!-- bare filename only. Wikilinking, "File:", and pixel size not required. -->
| image_size = <!-- raw number. "px" not required. -->
| image_alt =
| caption =
| season =
| series_no =
| episode =
| director =
| writer =
| story =
| teleplay =
| based_on =
| narrator =
| presenter =
| music =
| photographer =
| editor =
| production =
| airdate = <!-- {{Start date|YYYY|MM|DD}} -->
| length =
| guests =
| prev =
| next =
| season_article =
| episode_list =
}}
Maintenance
If you encounter a usage of the template which you want to quickly restore to the above standard, use {{subst:Infobox television episode/subst}}
.
Parameters
Link people to their article or redirect. For most of the fields below,[a] if there are multiple entries, separate them using bulleted lists (*
). When adding data to fields, do not use small text as this reduces the size of the text to below 85% of the page font size. See Wikipedia:Manual of Style/Accessibility#Text for more information.
Parameter | Explanation |
---|---|
italic_title | A "no" value will disable the automatic italicization of the series name in the parenthesis. This parameter should not be used most of the time. |
title | The title of the episode. Should not be used if the title is the same as the article title as the infobox handles this automatically. The title is automatically put within quotation marks. If the title should not be in quotation marks, use |rtitle= instead.
|
rtitle | The number of the episode or a descriptive title for the article. Used in situations where the episode does not have a title (such as Episode 1094 or Final episode of The Colbert Report) or an article which covers two episodes (such as Whoami and Hello, Elliot). The title is not styled and has no quotation marks. |
series | The name of the TV series this episode is part of, with a link to the series' main article. Series name is automatically italicized. |
not_dab | A parameter that is used when the series name has parenthesis which are part of the title, such as Randall and Hopkirk (Deceased). |
image | An image, if needed. Wikilinking, "File:", and pixel size not required. Remember, virtually all TV screenshots are copyrighted, so they must be low resolution, and be accompanied by a non-free use rationale. There is no blanket allowance for an image per episode. A non-free screenshot should be used only if it meets the Wikipedia:Non-free content criteria, i.e. typically if it is required to illustrate a crucial element of the episode that is the object of explicit, sourced analytical commentary and where that commentary is in genuine need of visual support. |
image_size | Image size in pixels. Should be 250 or less. If not specified, image defaults to frameless (220px). "px" is not required. |
image_upright | Use of this parameter is preferred to using |image_size= , as it allows auto-sizing of images according to user preferences. By default, the infobox image scales to |image_upright=1 (which is 1 × 220px if the default thumbnail size has not been changed at Special:Preferences). For upright posters, a value of |image_upright=1 is recommended.
The size should not be set to a value that would result in an image width greater than 300px. See help below for guidance on determining the value to be used. |
image_alt | Alt text for image per WP:MOSALT. |
caption | A caption explaining the image. |
season | The number of the season this episode is part of. |
series_no | The number of the series this episode is part of. Use either |season= or |series_no= , but not both. Typically, "series" is used for television series produced within the United Kingdom while "season" is used for American television series.
|
episode | The number of the episode within the season. |
segment | The number or letter of the segment. If the segment is not numbered, use |segment=yes .
|
director | The director(s) of this episode. |
writer | The writer(s) of this episode. |
story | The writer(s) of the episode's story. Use this field instead of the normal writer field if television episodes divide writing credits between teleplay and story writers. |
teleplay | The writer(s) of the episode's teleplay. Use this field instead of the normal writer field if television episodes divide writing credits between teleplay and story writers. |
based_on | The original work the episode is based on. Use {{Based on}} to add the title of the source material and the name(s) of the source material writer(s). Use this field in conjunction with teleplay and story where applicable. This field should be used if the episode is based on previously produced or published material, such as books, plays, articles, old screenplays, etc. and should not be used where the source material is ambiguous. This field should not be used for general adaptations, such as The Flash episodes being based on characters from DC Comics, however, do use it if a specific episode of that series is a direct adaptation of a specific comic. |
narrator | The narrator(s) of this episode. |
presenter | The person who fronts (hosts) the show. |
music | The music of this episode. Use {{Work by author}} to add the title of the song and the name(s) of the song performer. Television episodes often include numerous songs; only include the most notable (typically songs playing during key scenes). |
photographer | The director(s) of photography of this episode. |
editor | The editor(s) of this episode. |
production | The production code or number of this episode. |
airdate | The original airing date of the episode; use {{Start date}}. |
release_date | The original release date of the episode. This should be used for episodes released on streaming services such as Netflix; use {{Start date}}. |
length | The original length of the episode, including credits, in minutes. It should indicate runtime (without commercials), or with commercials. |
guests_title | Text for display in guests header (default = Guest appearance(s)). |
guests | Guest star(s) in the episode. Include the name of the character the guest actor portrays using a single space, "as", and another single space: actor as character .
|
module | An optional parameter to add a nested infobox to. |
prev | The title of the previous episode. If an article or redirect exist, link to it. If one does not exist, consider creating a redirect to the episode anchor in the season article. If a redirect isn't created directly link to the season article with an anchor to that episode. If this is the first episode of the TV series, leave blank. The title is automatically put within quotation marks, unless |rprev= is used.
|
rprev | The number of the previous episode or a descriptive title for the article. If an article or redirect exist, link to it. If one does not exist, consider creating a redirect to the episode anchor in the season article. If a redirect isn't created directly link to the season article with an anchor to that episode. If this is the first episode of the TV series, leave blank. The title is styled without quotation marks. |
next | The title of the next episode. If an article or redirect exist, link to it. If one does not exist, consider creating a redirect to the episode anchor in the season article. If a redirect isn't created directly link to the season article with an anchor to that episode. If this is the last episode of the TV series, leave blank. The title is automatically put within quotation marks, unless |rnext= is used.
|
rnext | The number of the next episode or a descriptive title for the article. If an article or redirect exist, link to it. If one does not exist, consider creating a redirect to the episode anchor in the season article. If a redirect isn't created directly link to the season article with an anchor to that episode. If this is the last episode of the TV series, leave blank. The title is styled without quotation marks. |
season_article | Title of the season article, usually in the form of "<showname> season #" article. Use plain text, the template will automatically format and link the article. |
episode_list | Title of the list of episodes article. Should only be used if the automatically generated link is not correct. If the automatically generated link is a red link, please create the correct redirect. A manual link is usually in the form of "List of <showname> episodes" article. Use plain text, the template will automatically format and link the article. |
Deprecated parameters
The |awards=
parameter was removed in July 2021 (discussion).
The |producer=
parameter was removed in August 2024 (discussion).
Controlling line-breaking in embedded bulletless lists
Template {{nbsp}}
may be used with {{wbr}}
and {{nowrap}}
to control line-breaking in bulletless lists embedded in the infobox (e.g. cast and other credits lists), to prevent wrapped long entries from being confused with multiple entries. See Template:Wbr/doc#Controlling line-breaking in infoboxes for details.
Calculating "image_upright"
The |image_upright=
parameter, and |image2_upright=
and |logo_upright=
where applicable, are provided so as to facilitate the use of scalable images in this infobox, in accordance with the instructions at WP:IMAGESIZE, which advises against the use of "px" (for example: thumb|300px
), as this forces a fixed image width.
Scalable images respect the user's base preference, which may have been selected for that user's particular devices. Module:InfoboxImage, which is used in this infobox, accommodates the use of scaling. However, setting the appropriate scale is slightly more complex than setting a raw "px" value. This guide provides a quick conversion table to make the process of setting a scale easier. It is based on a default thumbnail setting of 220px.
170px
→upright=0.75
180px
→upright=0.8
190px
→upright=0.85
200px
→upright=0.9
210px
→upright=0.95
220px
→upright=1
230px
→upright=1.05
240px
→upright=1.1
250px
→upright=1.15
260px
→upright=1.2
270px
→upright=1.23
280px
→upright=1.25
290px
→upright=1.3
300px
→upright=1.35
TemplateData
TemplateData documentation used by VisualEditor and other tools
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
See a monthly parameter usage report for Template:Infobox television episode in articles based on its TemplateData.
TemplateData for Infobox television episode Infobox used on articles about television episodes or internet videos.
|
Example
"Subway" | |
---|---|
Homicide: Life on the Street episode | |
Episode no. | Season 6 Episode 7 |
Directed by | Gary Fleder |
Written by | James Yoshimura |
Cinematography by | Alex Zakrzewski |
Production code | 604 |
Original air date | December 5, 1997 |
Guest appearances | |
| |
{{Infobox television episode
| title = Subway
| series = [[Homicide: Life on the Street]]
| image = NYCSub 7 Vernon Jackson 3.jpg
| image_alt = A man wearing a white shirt and blank pants kneels and speaks to a man in a blue shirt who is pinned between a subway train car and a platform. Emergency equipment lies in front of them, while the obscured figures of firefighters and emergency personnel stand behind them.
| caption = [[Frank Pembleton]] talks to John Lange, a man pinned between a subway train and platform.
| season = 6
| episode = 7
| director = [[Gary Fleder]]
| writer = [[James Yoshimura]]
| photographer = [[Alex Zakrzewski]]
| production = 604
| airdate = {{Start date|1997|12|05}}
| guests =
* [[Vincent D'Onofrio]] as John Lange
* [[Shari Elliker]] as witness
* Bruce MacVittie as Larry Biedron
* Laura MacDonald as Sarah Flannigan
* Lisa Matthews as witness
* Wendee Pratt as Joy Tolson
| prev = [[Saigon Rose]]
| next = [[All Is Bright (Homicide: Life on the Street)|All Is Bright]]
| season_article = Homicide: Life on the Street season 6
| episode_list = List of Homicide: Life on the Street episodes
}}
Microformat
- Classes used
The HTML classes of this microformat include:
- attendee
- contact
- description
- dtend
- dtstart
- location
- organiser
- summary
- url
- vevent
nor collapse nested elements which use them.
Tracking categories
- Category:Pages using infobox television episode with incorrectly formatted values (42)
- Category:Pages using infobox television episode with non-matching title (6)
- Category:Pages using infobox television episode with nonstandard dates (44)
- Category:Pages using infobox television episode with unknown parameters (0)
- Category:Pages using infobox television episode with unlinked values (1,083)
- Category:Pages using infobox television episode with unnecessary list markup (4,672)
- Category:Pages using infobox television episode with unnecessary manual displaytitle (7)
- Category:Pages using infobox television episode with unnecessary title parameter (0)
- Category:Pages using infobox television episode with image-related values without an image (3)
- Category:Pages using infobox television with flag icon (0)
- Category:Pages using infobox television episode with the based on parameter (188)
- Category:Television episode articles with short description with no series name (0)
- Category:Television episode articles with short description with no season number (1,379)
- Category:Television episode articles with short description with no episode number (14)
See also
Notes
- ^ The following fields use the plainlist class:
|director=
,|writer=
,|story=
,|teleplay=
,|narrator=
,|presenter=
,|music=
,|photographer=
,|editor=
,|production=
,|release_date=
, and|airdate=
.