Difference between revisions of "Template:IMDb title/doc"

From blackwiki
Jump to navigation Jump to search
imported>Jimthing
(another tl)
 
(59 intermediate revisions by 35 users not shown)
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
<!--
+
<!-- Categories go at the bottom of this page and interwikis go in Wikidata. -->
    PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE
+
{{high-risk|158,000}}
    YOU CAN EDIT THE TEMPLATE DOCUMENTATION BELOW THIS COMMENT
+
{{Uses Wikidata|P345}}
-->
+
{{Lua|Module:EditAtWikidata}}
This is a template to generate links to [[Internet Movie Database]]. This template '''should be used exclusively for ''TITLES''''', that is, of movies, TV series, games, etc.
 
  
:To link a person (actor, actress, etc.), use {{Tl|IMDb name}} instead.
+
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.
:To link a tv episode, use {{Tl|IMDb episode}} instead.
 
:To link an episode list, use {{Tl|IMDb episodes}} instead.
 
:To link a company, use {{Tl|IMDb company}} instead.
 
:To link a character, use {{Tl|IMDb character}} instead.
 
  
==Usage==
+
: ''For a person (actor, actress, etc.), use {{tl|IMDb name}}.''
{{See also|Wikipedia:External links/Perennial websites}}
+
: ''For a specific TV episode or Web series episode, use {{tl|IMDb episode}}.''
 +
: ''For an episode list, use {{tl|IMDb episodes}}.''
 +
: ''For a company, use {{tl|IMDb company}}.''
  
# Search on [http://www.imdb.com imdb.com] for the title you want. On the Wikipedia page of the film concerned this can often be done conveniently with the link produced by previewing <nowiki>{{IMDb title}}</nowiki>. This may not work if the page title is more than just the film title.
+
== Usage ==
 +
Unnamed parameters:
 +
* {{tlcw|{{BASEPAGENAME}} | <var>ID</var> }}
 +
* {{tlcw|{{BASEPAGENAME}} | <var>ID</var> | <var>TITLE</var> }}
 +
* {{tlcw|{{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:
 +
* {{tlcw|{{BASEPAGENAME}} | id{{=}} <var>ID</var> }}
 +
* {{tlcw|{{BASEPAGENAME}} | id{{=}} <var>ID</var> | title{{=}} <var>TITLE</var> }}
 +
* {{tlcw|{{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>}}
 +
* {{tlcw|{{BASEPAGENAME}} | id{{=}} <var>ID</var> | quotes{{=}} yes }} – for short films
 +
 
 +
Using [[Wikidata]] property {{Property|345}}:
 +
* {{tlcw|{{BASEPAGENAME}} }}
 +
* {{tlcw|{{BASEPAGENAME}} | title{{=}} <var>TITLE</var> }}
 +
* {{tlcw|{{BASEPAGENAME}} | title{{=}} <var>TITLE</var> | description{{=}} <var>DESCRIPTION</var>}}
 +
* {{tlcw|{{BASEPAGENAME}} | title{{=}} <var>TITLE</var> | description{{=}} <var>DESCRIPTION</var> | section{{=}} <var>SECTION</var>}}
 +
* {{tlcw|{{BASEPAGENAME}} | quotes{{=}} yes }} – for short films
 +
 
 +
== Instructions ==
 +
{{See also|Wikipedia:External links/Perennial websites#IMDb}}
 +
 
 +
# Search on [https://www.imdb.com 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 <code><nowiki>{{IMDb title}}</nowiki></code> (this may not work if the page title is more than just the film title).
 
# 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.
 
# 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.
# The page [[Uniform resource locator|URL]] should look like <nowiki>http://www.imdb.com/title/tt#######</nowiki>, where "#######" indicates a number.
+
# The page [[Uniform resource locator|URL]] should look like this:
# Copy ONLY that number (be sure to remove the "tt"<ref>The leading zeros are not needed but recommended, for Linksearch uniformity is useful.</ref>)
+
#: <code><nowiki>https://www.imdb.com/title/tt</nowiki>{{Hilite|######}}/</code> or <code><nowiki>http://www.imdb.com/title/tt</nowiki>{{Hilite|######}}/</code>
# Add to the external links section the text:
+
#: where <code>######</code> indicates a number.
:<nowiki>{{IMDb title|#######|Title}}</nowiki>
+
# 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.
:where "#######" is the number you've copied, and "Title" is the title of the movie or show.
+
# Add the following to the external links section of the article:
#<li value="5"> (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 | {{Hilite|######}} | ''Film Name'' }}</code>
:<nowiki>{{IMDb title|#######|Title|Description}}</nowiki>
+
#: or <code><nowiki>{{</nowiki>IMDb title | id= {{Hilite|######}} | title= ''Film Name'' }}</code>
: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.
+
#: 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:
 +
#: <code><nowiki>{{</nowiki>IMDb title | ####### | ''Title'' | ''Description'' }}</code>
 +
#: 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.
 +
# (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.
  
There is also the section parameter which can be set to awards to link to the Awards section of the site.
+
== Examples ==
  
==Example==
+
=== Parameter: id (1) ===
#On the page [[Alpha Dog]], preview <nowiki>{{IMDb title}}</nowiki> and search using the link [http://www.imdb.com/find?q=Alpha+Dog/;tt=on ''Alpha Dog''] produced. You'll get to this page: http://www.imdb.com/title/tt0426883/
+
# 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).
#Copy "0426883" and then add this number as parameter:
+
# On the IMDb search results page, click the link for "Alpha Dog (2006)". That IMDb page URL is:
::<nowiki>{{IMDb title|0426883}}</nowiki>
+
#: <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>
The result on the page Alpha Dog is:
+
# Copy <code>0426883</code> and add it to the template.
::{{IMDb title|0426883|Alpha Dog}}.
+
#: <code><nowiki>* {{IMDb title | 0426883 }}</nowiki></code>
 +
#:* {{IMDb title | 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.
  
==2nd example==
+
=== Parameter: title (2) ===
#Searching for the 1993 remake of the TV series "Route 66", you'll get to this page: http://www.imdb.com/title/tt0106117/
+
<code><nowiki>* {{IMDb title | 0426883 | Alpha Dog }}</nowiki></code>
#Copy "0106117" and then write:
+
:* {{IMDb title | 0426883 | Alpha Dog }}
:<nowiki>{{IMDb title|0106117|Route 66|(1993)}}</nowiki>
+
 
The result is {{IMDb title|0106117|Route 66|(1993)}}
+
<code><nowiki>* {{IMDb title | id= 0426883 | title= Alpha Dog }}</nowiki></code>
 +
:* {{IMDb title | id= 0426883 | title= Alpha Dog }}
 +
 
 +
=== Parameter: description (3) ===
 +
<code><nowiki>* {{IMDb title | 0106117 | Route 66 | (1993 TV series) }}</nowiki></code>
 +
:* {{IMDb title | 0106117 | Route 66 | (1993 TV series) }}
 +
 
 +
<code><nowiki>* {{IMDb title | id= 0106117 | title= Route 66 | description= (1993 TV series) }}</nowiki></code>
 +
:* {{IMDb title | id= 0106117 | title= Route 66 | description= (1993 TV series) }}
 +
 
 +
=== Parameter: section ===
 +
<code><nowiki>* {{IMDb title | 0111282 | Stargate | section= awards }}</nowiki></code>
 +
:* {{IMDb title | 0111282 | Stargate | section= awards }}
 +
 
 +
<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 header}}
 +
<templatedata>
 +
{
 +
        "description": "This is a template to generate links to Internet Movie Database.",
 +
        "params": {
 +
                "id": {
 +
                        "label": "ID",
 +
                        "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",
 +
                        "required": false,
 +
                        "default": "Wikidata property P345 or IMDb search URL"
 +
                },
 +
                "title": {
 +
                        "label": "Title",
 +
                        "aliases" : [ "2" ],
 +
                        "description": "Title of the production. Defaults to the Wikipedia article name, without any disambiguation such as (film).",
 +
                        "type": "string",
 +
                        "required": false,
 +
                        "default": "{{PAGENAMEBASE}}"
 +
                },
 +
                "description": {
 +
                        "label": "Description",
 +
                        "aliases" : [ "3" ],
 +
                        "description": "Description of the production, such as the year made (in parentheses).",
 +
                        "type": "string",
 +
                        "required": false
 +
                },
 +
                "section": {
 +
                        "label": "Section",
 +
                        "description": "Can 'award' or 'awards' which makes a link to the awards page. Other values are ignored.",
 +
                        "type": "string",
 +
                        "required": false
 +
                }
 +
        }
 +
}
 +
</templatedata>
 +
 
 +
== Wikidata ==
 +
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:Q7572422|Wikidata item (Q7572422)]], which in turn includes an [[wikidata:Property:P345|IMDb identifier]]. If {{tl|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).
  
==Linksearch==
+
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>.
For a given link target (or first part of that) the pages from where there are links are found by a link like:
 
  
http://en.wikipedia.org/w/index.php?title=Special:Linksearch&target=http%3A%2F%2Fwww.imdb.com%2Ftitle%2Ftt0426
+
== Linksearch ==
 +
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:
  
==See also==
+
* https://en.wikipedia.org/w/index.php?title=Special:Linksearch&target=http%3A%2F%2Fwww.imdb.com%2Ftitle%2Ftt0426  (for http links)
*[[Wikipedia:IMDB]]
+
* https://en.wikipedia.org/w/index.php?title=Special:Linksearch&target=https%3A%2F%2Fwww.imdb.com%2Ftitle%2Ftt0426  (for https links)
  
==Note==
+
== Tracking categories ==
{{Reflist}}
+
* {{clc|IMDb template with no id set}}
 +
* {{clc|IMDb template with invalid id set}}
  
<includeonly>
+
== See also ==
 +
* [[Wikipedia:IMDb]]
  
<!-- PLEASE ADD CATEGORIES BELOW THIS LINE, THANKS. -->
+
Similar television title template:
 +
* {{tl|BBC Programmes}}
 +
* {{tl|TheTVDB}}
 +
* {{tl|Screenonline TV title}} - which focuses on British television series
 +
 
 +
Similar film title templates:
 +
* {{tl|AllMovie title}}
 +
* {{tl|TCMDb title}}
 +
* {{tl|AFI film}}
 +
* {{tl|BFI}}
 +
* {{tl|Screenonline title}}
 +
* {{tl|Rotten Tomatoes}}
 +
* {{tl|Metacritic film}}
 +
* {{tl|Mojo title}}
 +
 
 +
<includeonly>{{Sandbox other||
 +
<!-- Categories go here and interwikis go in Wikidata. -->
 
{{DEFAULTSORT:Imdb title}}
 
{{DEFAULTSORT:Imdb title}}
 
[[Category:Film external link templates]]
 
[[Category:Film external link templates]]
 
[[Category:Television external link templates]]
 
[[Category:Television external link templates]]
 
+
[[Category:Templates using data from Wikidata]]
<!-- PLEASE ADD INTERWIKIS BELOW THIS LINE, THANKS. -->
+
[[Category:Templates that add a tracking category]]
 
+
[[Category:External link templates using Wikidata]]
[[ar:قالب:Imdb title]]
+
}}</includeonly>
[[bg:Шаблон:Imdb title]]
 
[[br:Patrom:IMDb Titl]]
 
[[ca:Plantilla:Imdb títol]]
 
[[da:Skabelon:Imdb titel]]
 
[[de:Vorlage:IMDb Titel]]
 
[[el:Πρότυπο:Imdb]]
 
[[eo:Ŝablono:IMDb titolo]]
 
[[es:Plantilla:Imdb título]]
 
[[fa:الگو:Imdb title]]
 
[[fi:Malline:IMDb]]
 
[[fr:Modèle:Imdb title]]
 
[[he:תבנית:Imdb title]]
 
[[hi:साँचा:Imdb title]]
 
[[id:Templat:imdb judul]]
 
[[it:Template:Imdb]]
 
[[ja:Template:Imdb title]]
 
[[ko:틀:Imdb 제목]]
 
[[nl:Sjabloon:Link IMDb titel]]
 
[[no:Mal:Imdb tittel]]
 
[[pt:Predefinição:Imdb título]]
 
[[ro:Format:Titlu IMDb]]
 
[[ru:Шаблон:Imdb title]]
 
[[simple:Template:Imdb title]]
 
[[sk:Šablóna:Imdb film]]
 
[[sv:Mall:IMDb-titel]]
 
[[th:Template:Imdb title]]
 
[[uk:Шаблон:Imdb title]]
 
[[vi:Tiêu bản:Imdb title]]
 
[[wuu:Template:Imdb title]]
 
[[zh:Template:Imdb title]]
 
</includeonly>
 

Latest revision as of 12:35, 1 February 2021

Template:Uses Wikidata

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.

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

Usage

Unnamed parameters:

Named parameters:

Using Wikidata property Template:Property:

Instructions

  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######/ or http://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.
  7. (Optional) There is also the section parameter which can be set to awards to link to the Awards section of the site.
  8. If the IMDb page is about a short film, add |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. |quotes=y or |quotes=true. Note: For an episode of a TV series, use {{IMDb episode}} instead of this template.

Examples

Parameter: id (1)

  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.
    * {{IMDb title | 0426883 }}
    * {{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.

Parameter: title (2)

* {{IMDb title | 0426883 | Alpha Dog }}

* {{IMDb title | id= 0426883 | title= Alpha Dog }}

Parameter: description (3)

* {{IMDb title | 0106117 | Route 66 | (1993 TV series) }}

* {{IMDb title | id= 0106117 | title= Route 66 | description= (1993 TV series) }}

Parameter: section

* {{IMDb title | 0111282 | Stargate | section= awards }}

* {{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.

* {{IMDb title |id=42360 |title=Cue Ball Cat |quotes=y}}

TemplateData

This is the TemplateData documentation for this template used by VisualEditor and other tools; see the monthly parameter usage report for this template.

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, 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
Sectionsection

Can 'award' or 'awards' which makes a link to the awards page. Other values are ignored.

Stringoptional

Wikidata

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}}.

Linksearch

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

See also

Similar television title template:

Similar film title templates: