Jump to content

Template:IMDb title/doc: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Deleted
Restored revision 1235033155 by Zyxw (talk)
 
(28 intermediate revisions by 10 users not shown)
Line 1: Line 1:
{{Documentation subpage}}
{{Documentation subpage}}
{{For-multi|a person|Template:IMDb name|a specific episode|Template:IMDb episode|an episode list|Template:IMDb episodes|an event|Template:IMDb event}}
<!-- Categories go at the bottom of this page and interwikis go in Wikidata. -->
{{high-risk|158,000}}
{{High-use}}
{{Lua|Module:EditAtWikidata|Module:String2}}
{{Uses Wikidata|P345}}
{{Uses Wikidata|P345}}
{{Lua|Module:EditAtWikidata}}


This template is used to generate an external link to a web page at [[IMDb]]. It should be used '''exclusively for ''TITLES''''' (movies, TV series, games, etc.) and is intended for use in the [[Wikipedia:External links|external links]] section of an article.
This template is used to generate an external link to a web page at [[IMDb]]. It should be used exclusively for TITLES—movies, TV series, games, etc.—and is intended for use in the [[Wikipedia:External links|external links]] section of an article.

: ''For a person (actor, actress, etc.), use {{tl|IMDb name}}.''
: ''For a specific TV episode or Web series episode, use {{tl|IMDb episode}}.''
: ''For an episode list, use {{tl|IMDb episodes}}.''


== Usage ==
== Usage ==
Unnamed parameters:
Unnamed parameters:
* {{tlcw|{{BASEPAGENAME}} | <var>ID</var> }}
* {{tlx|{{BASEPAGENAME}} | <var>ID</var> }}
* {{tlcw|{{BASEPAGENAME}} | <var>ID</var> | <var>TITLE</var> }}
* {{tlx|{{BASEPAGENAME}} | <var>ID</var> | <var>TITLE</var> }}
* {{tlcw|{{BASEPAGENAME}} | <var>ID</var> | <var>TITLE</var> | <var>DESCRIPTION</var> }}
* {{tlx|{{BASEPAGENAME}} | <var>ID</var> | <var>TITLE</var> | <var>DESCRIPTION</var> }}
* {{tlcw|{{BASEPAGENAME}} | <var>ID</var> | <var>TITLE</var> | <var>DESCRIPTION</var> | section{{=}} <var>SECTION</var> }}


Named parameters:
Named parameters:
* {{tlcw|{{BASEPAGENAME}} | id{{=}} <var>ID</var> }}
* {{tlx|{{BASEPAGENAME}} | id{{=}} <var>ID</var> }}
* {{tlcw|{{BASEPAGENAME}} | id{{=}} <var>ID</var> | title{{=}} <var>TITLE</var> }}
* {{tlx|{{BASEPAGENAME}} | id{{=}} <var>ID</var> | title{{=}} <var>TITLE</var> }}
* {{tlcw|{{BASEPAGENAME}} | id{{=}} <var>ID</var> | title{{=}} <var>TITLE</var> | description{{=}} <var>DESCRIPTION</var>}}
* {{tlx|{{BASEPAGENAME}} | id{{=}} <var>ID</var> | title{{=}} <var>TITLE</var> | description{{=}} <var>DESCRIPTION</var>}}
* {{tlcw|{{BASEPAGENAME}} | id{{=}} <var>ID</var> | title{{=}} <var>TITLE</var> | description{{=}} <var>DESCRIPTION</var> | section{{=}} <var>SECTION</var>}}
* {{tlx|{{BASEPAGENAME}} | id{{=}} <var>ID</var> | quotes{{=}} yes }}
* {{tlcw|{{BASEPAGENAME}} | id{{=}} <var>ID</var> | quotes{{=}} yes }} – for short films


Using [[Wikidata]] property {{Property|345}}:
Using [[Wikidata]] property {{Property|345}}:
* {{tlcw|{{BASEPAGENAME}} }}
* {{tlx|{{BASEPAGENAME}} }}
* {{tlcw|{{BASEPAGENAME}} | title{{=}} <var>TITLE</var> }}
* {{tlx|{{BASEPAGENAME}} | title{{=}} <var>TITLE</var> }}
* {{tlcw|{{BASEPAGENAME}} | title{{=}} <var>TITLE</var> | description{{=}} <var>DESCRIPTION</var>}}
* {{tlx|{{BASEPAGENAME}} | title{{=}} <var>TITLE</var> | description{{=}} <var>DESCRIPTION</var>}}
* {{tlcw|{{BASEPAGENAME}} | title{{=}} <var>TITLE</var> | description{{=}} <var>DESCRIPTION</var> | section{{=}} <var>SECTION</var>}}
* {{tlx|{{BASEPAGENAME}} | quotes{{=}} yes }}
* {{tlcw|{{BASEPAGENAME}} | quotes{{=}} yes }} – for short films


== Instructions ==
== Instructions ==
Line 42: Line 35:
# Copy the 7- or 8-digit ID number that appears after <code>tt</code> in the URL. The leading "tt" is not required, but the template will still work if it is included. The leading zeros in the number are recommended for [[#Linksearch|Linksearch]] uniformity.
# Copy the 7- or 8-digit ID number that appears after <code>tt</code> in the URL. The leading "tt" is not required, but the template will still work if it is included. The leading zeros in the number are recommended for [[#Linksearch|Linksearch]] uniformity.
# Add the following to the external links section of the article:
# Add the following to the external links section of the article:
#: <code><nowiki>{{</nowiki>IMDb title | {{Hilite|######}} | ''Film Name'' }}</code>
#: {{tlx|IMDb title|{{Hilite|######}}|''Film Name''}} or {{tlx|IMDb title|id{{=}}{{Hilite|######}}|title{{=}}''Film Name''}}
#: or <code><nowiki>{{</nowiki>IMDb title | id= {{Hilite|######}} | title= ''Film Name'' }}</code>
#: where <code>######</code> is the number you've copied, and <code>''Film Name''</code> is the title of the movie or show.
#: where <code>######</code> is the number you've copied, and <code>''Film Name''</code> is the title of the movie or show.
# (Optional) If you want to add an additional description to distinguish this film/show from another that may be on the same page with the same name, use the following text:
# (Optional) If you want to add an additional description to distinguish this film/show from another that may be on the same page with the same name, use the following text:
#: <code><nowiki>{{</nowiki>IMDb title | ####### | ''Title'' | ''Description'' }}</code>
#: {{tlx|IMDb title|#######|''Title''|''Description''}}
#: where <code>#######</code> is the number you've copied, <code>''Title''</code> is the title of the movie or show, and <code>''Description''</code> is the description of the show, in parentheses.
#: where <code>#######</code> is the number you've copied, <code>''Title''</code> is the title of the movie or show, and <code>''Description''</code> is the description of the show, in parentheses. The description is rendered outside the automatic quote marks or italic formatting.
# (Optional) There is also the <code>section</code> parameter which can be set to <code>awards</code> to link to the Awards section of the site.
# If the IMDb page is about a short film, add {{para|quotes|yes}} to display with quotation marks (per [[MOS:TITLES]] rather than the template's default italics; any value for this parameter will work, e.g. {{para|quotes|y}} or {{para|quotes|true}}. Note: For an episode of a TV series, use {{tlx|IMDb episode}} instead of this template.


== Examples ==
== Examples ==


=== Parameter: id (1) ===
=== Parameter: id (1) ===
# Search on [https://www.imdb.com IMDb.com] for the title [[Alpha Dog]]. This can also be done on the Wikipedia page by previewing <code><nowiki>{{IMDb title}}</nowiki></code> and clicking that link (https://www.imdb.com/find?q=Alpha+Dog&s=tt).
# Search on [https://www.imdb.com IMDb.com] for the title ''[[Alpha Dog]]''. This can also be done on the Wikipedia page by previewing {{tlx|IMDb title}} and clicking that link (https://www.imdb.com/find?q=Alpha+Dog&s=tt).
# On the IMDb search results page, click the link for "Alpha Dog (2006)". That IMDb page URL is:
# On the IMDb search results page, click the link for "Alpha Dog (2006)". That IMDb page URL is:
#: <code>[https://www.imdb.com/title/tt0426883/ https://www.imdb.com/title/tt{{Hilite|0426883}}/]</code> or <code>[http://www.imdb.com/title/tt0426883/ http://www.imdb.com/title/tt{{Hilite|0426883}}/]</code>
#: <code>[https://www.imdb.com/title/tt0426883/ https://www.imdb.com/title/tt{{Hilite|0426883}}/]</code> or <code>[http://www.imdb.com/title/tt0426883/ http://www.imdb.com/title/tt{{Hilite|0426883}}/]</code>
# Copy <code>0426883</code> and add it to the template.
# Copy <code>0426883</code> and add it to the template:
#: <code><nowiki>* {{IMDb title | 0426883 }}</nowiki></code>
#* {{tlx|IMDb title|0426883|_show_result=y}}
#:* {{IMDb title | 0426883 }}
#* {{tlx|IMDb title|id{{=}}0426883}}
#: <code><nowiki>* {{IMDb title | id= 0426883 }}</nowiki></code>
#:* {{IMDb title | id= 0426883 }}


Typically this is a list item in the external links section (even if there is only one link), so you should add "*" in front.
Typically this is a list item in the external links section (even if there is only one link), so you should add "*" in front.


=== Parameter: title (2) ===
=== Parameter: title (2) ===
<code><nowiki>* {{IMDb title | 0426883 | Alpha Dog }}</nowiki></code>
* {{tlx|IMDb title|0426883|Alpha Dog|_show_result=y}}
:* {{IMDb title | 0426883 | Alpha Dog }}
* {{tlx|IMDb title|id{{=}}0426883|title{{=}}Alpha Dog|_show_result=y}}

<code><nowiki>* {{IMDb title | id= 0426883 | title= Alpha Dog }}</nowiki></code>
:* {{IMDb title | id= 0426883 | title= Alpha Dog }}


=== Parameter: description (3) ===
=== Parameter: description (3) ===
<code><nowiki>* {{IMDb title | 0106117 | Route 66 | (1993 TV series) }}</nowiki></code>
* {{tlx|IMDb title|0106117|Route 66|(1993 TV series)|_show_result=y}}
:* {{IMDb title | 0106117 | Route 66 | (1993 TV series) }}
* {{tlx|IMDb title|id{{=}}0106117|title{{=}}Route 66|description{{=}}(1993 TV series)|_show_result=y}}


=== Parameter: qid ===
<code><nowiki>* {{IMDb title | id= 0106117 | title= Route 66 | description= (1993 TV series) }}</nowiki></code>
Using Wikidata property {{Prop|345}} from Wikidata item {{Q|105801}}:
:* {{IMDb title | id= 0106117 | title= Route 66 | description= (1993 TV series) }}
* {{tlx|IMDb title|qid{{=}}Q105801|title{{=}}Stargate|_show_result=y}}


=== Parameter: section ===
=== No parameters ===
Usage in Wikipedia article [[Stargate (film)|''Stargate'' (film)]]:
<code><nowiki>* {{IMDb title | 0111282 | Stargate | section= awards }}</nowiki></code>
:* {{IMDb title | 0111282 | Stargate | section= awards }}
* {{tlx|IMDb title}} {{IMDb title|qid=Q105801|title=Stargate}}

<code><nowiki>* {{IMDb title | id= 0111282 | title= Stargate | description= (1994 film) | section= awards }}</nowiki></code>
:* {{IMDb title | id= 0111282 | title= Stargate | description= (1994 film) | section= awards }}

=== Parameter: quotes ===
Used for short films, which take quotation marks instead of the default italics.

<code><nowiki>* {{IMDb title |id=42360 |title=Cue Ball Cat |quotes=y}}</nowiki></code>
:* {{IMDb title |id=42360 |title=Cue Ball Cat |quotes=y}}


==TemplateData==
==TemplateData==
Line 96: Line 73:
<templatedata>
<templatedata>
{
{
"description": "This is a template to generate links to Internet Movie Database.",
"description": "This is a template to generate links to Internet Movie Database.",
"params": {
"params": {
"id": {
"id": {
"label": "ID",
"label": "ID",
"aliases" : [ "1" ],
"aliases": [
"1"
"description": "Number of the IMDb title, taken from the numbers at the end of its IMDb URL. This parameter is optional if Wikidata property P345 contains an ID starting with tt, but required if not.",
],
"type": "number",
"description": "Number of the IMDb title, taken from the numbers at the end of its IMDb URL. This parameter is optional if Wikidata property P345 contains an ID starting with tt or the qid paramter is used, but required if not.",
"required": false,
"type": "number",
"default": "Wikidata property P345 or IMDb search URL"
"required": false,
},
"default": "Wikidata property P345 or IMDb search URL"
"title": {
},
"label": "Title",
"title": {
"aliases" : [ "2" ],
"label": "Title",
"description": "Title of the production. Defaults to the Wikipedia article name, without any disambiguation such as (film).",
"aliases": [
"type": "string",
"2"
"required": false,
],
"default": "{{PAGENAMEBASE}}"
"description": "Title of the production. Defaults to the Wikipedia article name, without any disambiguation such as (film).",
},
"type": "string",
"description": {
"required": false,
"label": "Description",
"default": "{{PAGENAMEBASE}}"
"aliases" : [ "3" ],
},
"description": "Description of the production, such as the year made (in parentheses).",
"description": {
"type": "string",
"label": "Description",
"required": false
"aliases": [
},
"3"
"section": {
],
"label": "Section",
"description": "Can 'award' or 'awards' which makes a link to the awards page. Other values are ignored.",
"description": "Description of the production, such as the year made (in parentheses).",
"type": "string",
"type": "string",
"required": false
"required": false
},
}
"qid": {
}
"description": "Retrieves the id stored at a specific WikiData item, this can be used to get an id stored in another item without using the 'id' parameter."
},
"link_hide": {
"description": "If parameter is used and has something other than blank, IMDb will not be wikilinked"
}
}
}
}
</templatedata>
</templatedata>
Line 140: Line 123:
Note that the title code (first parameter) can still be specified as before and this will override the Wikidata default e.g. where this template is used to link to a film whose title does not correspond to the subject of the article (for example, in the case of a single article about a film and its sequels).
Note that the title code (first parameter) can still be specified as before and this will override the Wikidata default e.g. where this template is used to link to a film whose title does not correspond to the subject of the article (for example, in the case of a single article about a film and its sequels).


The second parameter for the film title override is still available to handle differences between article titles and film titles (e.g. due to [[Wikipedia:Disambiguation|disambiguation]] wording in the title). The first parameter may be left blank to default from Wikidata - for example <nowiki>{{IMDb title||Film title}}</nowiki>.
The second parameter for the film title override is still available to handle differences between article titles and film titles (e.g. due to [[Wikipedia:Disambiguation|disambiguation]] wording in the title). The first parameter may be left blank to default from Wikidata for example <nowiki>{{IMDb title||Film title}}</nowiki>.

== Sections ==
The template will automatically change when the template is used on lists of awards, characters, or soundtracks. The url is made more specific to reflect the articles scope. This is done by identifying the articles type through Wikidata.


== Linksearch ==
== Linksearch ==
Line 149: Line 135:


== Tracking categories ==
== Tracking categories ==
<section begin=Tracking/>
* {{clc|IMDb template with no id set}}
* {{clc|IMDb template with invalid id set}}
* {{Category link with count|IMDb template with invalid id set}}
* {{Category link with count|Pages using IMDb title with no id set}}
* {{Category link with count|Pages using IMDb title instead of IMDb episode}}
* {{Category link with count|Pages using IMDb title instead of IMDb episodes}}
* {{Category link with count|Pages using IMDb title with unknown parameters}}
* {{Category link with count|IMDb title ID different from Wikidata}}
* {{Category link with count|IMDb title ID not in Wikidata}}<section end=Tracking/>


== See also ==
== See also ==
Line 156: Line 148:


Similar television title template:
Similar television title template:
* {{tl|BBC Programmes}}
* {{tl|BBC programme}}
* {{tl|TheTVDB}}
* {{tl|TheTVDB}}
* {{tl|Screenonline TV title}} - which focuses on British television series
* {{tl|Screenonline TV title}} which focuses on British television series


Similar film title templates:
Similar film title templates:
Line 164: Line 156:
* {{tl|TCMDb title}}
* {{tl|TCMDb title}}
* {{tl|AFI film}}
* {{tl|AFI film}}
* {{tl|BFI}}
* {{tl|Screenonline title}}
* {{tl|Screenonline title}}
* {{tl|Rotten Tomatoes}}
* {{tl|Rotten Tomatoes}}
Line 171: Line 162:


<includeonly>{{Sandbox other||
<includeonly>{{Sandbox other||
<!-- Categories go here and interwikis go in Wikidata. -->
{{DEFAULTSORT:Imdb title}}
[[Category:Film external link templates]]
[[Category:Film external link templates]]
[[Category:Television external link templates]]
[[Category:Television external link templates]]
Line 178: Line 167:
[[Category:Templates that add a tracking category]]
[[Category:Templates that add a tracking category]]
[[Category:External link templates using Wikidata]]
[[Category:External link templates using Wikidata]]
[[Category:IMDb templates]]

}}</includeonly>
}}</includeonly>

Latest revision as of 23:17, 5 August 2024

This template is used to generate an external link to a web page at IMDb. It should be used exclusively for TITLES—movies, TV series, games, etc.—and is intended for use in the external links section of an article.

Usage

[edit]

Unnamed parameters:

Named parameters:

Using Wikidata property IMDb ID (P345):

Instructions

[edit]
  1. Search on IMDb.com for the title you want. On the Wikipedia page of the film concerned this can often be done with the link produced by previewing {{IMDb title}} (this may not work if the page title is more than just the film title).
  2. Click on the correct link to go to the movie's page (or whatever you're looking for). Be sure you're getting on the correct title page.
  3. The page URL should look like this:
    https://www.imdb.com/title/tt######/
    where ###### indicates a number.
  4. Copy the 7- or 8-digit ID number that appears after tt in the URL. The leading "tt" is not required, but the template will still work if it is included. The leading zeros in the number are recommended for Linksearch uniformity.
  5. Add the following to the external links section of the article:
    {{IMDb title|######|Film Name}} or {{IMDb title|id=######|title=Film Name}}
    where ###### is the number you've copied, and Film Name is the title of the movie or show.
  6. (Optional) If you want to add an additional description to distinguish this film/show from another that may be on the same page with the same name, use the following text:
    {{IMDb title|#######|Title|Description}}
    where ####### is the number you've copied, Title is the title of the movie or show, and Description is the description of the show, in parentheses. The description is rendered outside the automatic quote marks or italic formatting.

Examples

[edit]

Parameter: id (1)

[edit]
  1. Search on IMDb.com for the title Alpha Dog. This can also be done on the Wikipedia page by previewing {{IMDb title}} and clicking that link (https://www.imdb.com/find?q=Alpha+Dog&s=tt).
  2. On the IMDb search results page, click the link for "Alpha Dog (2006)". That IMDb page URL is:
    https://www.imdb.com/title/tt0426883/ or http://www.imdb.com/title/tt0426883/
  3. Copy 0426883 and add it to the template:

Typically this is a list item in the external links section (even if there is only one link), so you should add "*" in front.

Parameter: title (2)

[edit]

Parameter: description (3)

[edit]

Parameter: qid

[edit]

Using Wikidata property IMDb ID (P345) from Wikidata item Stargate (Q105801):

No parameters

[edit]

Usage in Wikipedia article Stargate (film):

TemplateData

[edit]
This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:IMDb title in articles based on its TemplateData.

TemplateData for IMDb title

This is a template to generate links to Internet Movie Database.

Template parameters

ParameterDescriptionTypeStatus
IDid 1

Number of the IMDb title, taken from the numbers at the end of its IMDb URL. This parameter is optional if Wikidata property P345 contains an ID starting with tt or the qid paramter is used, but required if not.

Default
Wikidata property P345 or IMDb search URL
Numberoptional
Titletitle 2

Title of the production. Defaults to the Wikipedia article name, without any disambiguation such as (film).

Default
{{PAGENAMEBASE}}
Stringoptional
Descriptiondescription 3

Description of the production, such as the year made (in parentheses).

Stringoptional
qidqid

Retrieves the id stored at a specific WikiData item, this can be used to get an id stored in another item without using the 'id' parameter.

Unknownoptional
link_hidelink_hide

If parameter is used and has something other than blank, IMDb will not be wikilinked

Unknownoptional

Wikidata

[edit]

The Wikidata project provides a central collection of information and parameters for articles for the various Wikimedia Foundation projects. This includes the IMDB title codes for films. For example, the film Space Milkshake has a corresponding Wikidata item (Q7572422), which in turn includes an IMDb identifier. If {{IMDb title}} is invoked in an article without the "id" parameter, and if Wikidata has an IMDb identifier specified for that article's corresponding item, the IMDb link with its title code will be included automatically.

For new film articles, the IMDb identifier property (and the film title item itself) may need to be added at Wikidata first, so that the default IMDb link can be available for use on Wikipedia and other Wikimedia projects.

This Wikidata capability was implemented on the English Wikipedia as of April 2013.

Note that the title code (first parameter) can still be specified as before and this will override the Wikidata default e.g. where this template is used to link to a film whose title does not correspond to the subject of the article (for example, in the case of a single article about a film and its sequels).

The second parameter for the film title override is still available to handle differences between article titles and film titles (e.g. due to disambiguation wording in the title). The first parameter may be left blank to default from Wikidata – for example {{IMDb title||Film title}}.

Sections

[edit]

The template will automatically change when the template is used on lists of awards, characters, or soundtracks. The url is made more specific to reflect the articles scope. This is done by identifying the articles type through Wikidata.

Linksearch

[edit]

For a given link target (or first part of that) the pages from where there are links are found by a link such as this:

Tracking categories

[edit]

See also

[edit]

Similar television title template:

Similar film title templates: