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

From blackwiki
Jump to navigation Jump to search
imported>Vanisaac
m (→‎See also: clean up per WP:CAT#T and WP:AWBREQ add template:Sandbox other)
 
(11 intermediate revisions by 6 users not shown)
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
<!--  
+
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata -->
    PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE
+
{{Uses Wikidata|P345}}
    YOU CAN EDIT THE TEMPLATE DOCUMENTATION BELOW THIS COMMENT
+
{{Lua|Module:EditAtWikidata}}
-->
+
 
This is a template to generate links to [[Internet Movie Database]], '''used exclusively for ''EPISODES'''''.
+
'''{{NAMESPACE}}:{{BASEPAGENAME}}''' displays an external link to a television episode page at the [[IMDb|Internet Movie Database]] (IMDb). It is {{strong|{{em|used exclusively for episodes}}}}. This template is intended for use in the [[Wikipedia:External links|external links]] section of an article.
:To link an episode list, use {{Tl|IMDb episodes}} instead.
+
 
:To link a work (film/movie, TV or Web program/series, video game, etc.), use {{Tl|IMDb title}} instead.
+
: To link an episode list, use {{Tl|IMDb episodes}} instead.
:To link a person (actor, actress, etc.), use {{Tl|IMDb name}} instead.
+
: To link a work (film/movie, TV or Web program/series, video game, etc.), use {{Tl|IMDb title}} instead.
:To link a company, use {{Tl|IMDb company}} instead.
+
: To link a person (actor, actress, etc.), use {{Tl|IMDb name}} instead.
:To link a character, use {{Tl|IMDb character}} instead.
+
: To link a company, use {{Tl|IMDb company}} instead.
 +
 
 +
== Usage ==
 +
Unnamed parameters:
 +
: <code>{{<nowiki/>{{BASEPAGENAME}} | <var>ID</var> }}</code>
 +
: <code>{{<nowiki/>{{BASEPAGENAME}} | <var>ID</var> | <var>EPISODE</var> }}</code>
 +
 
 +
Named parameters:
 +
: <code>{{<nowiki/>{{BASEPAGENAME}} | id= <var>ID</var> }}</code>
 +
: <code>{{<nowiki/>{{BASEPAGENAME}} | id= <var>ID</var> | episode= <var>EPISODE</var> }}</code>
 +
 
 +
Using [[Wikidata]] property {{Property|P345}}:
 +
: <code>{{<nowiki/>{{BASEPAGENAME}}}}</code>
 +
: <code>{{<nowiki/>{{BASEPAGENAME}} | episode= <var>EPISODE</var> }}</code>
  
 
===Options===
 
===Options===
Line 16: Line 29:
 
The required parameter is just the ID number (for backward compatibility, the parameter can be named <code>id</code>) and the template then uses the article title as the [[anchor text]]:
 
The required parameter is just the ID number (for backward compatibility, the parameter can be named <code>id</code>) and the template then uses the article title as the [[anchor text]]:
 
<pre>
 
<pre>
* {{IMDb episode|ID}}
+
* {{IMDb episode | ID }}
 
</pre>
 
</pre>
 
To have the link text be other than the article name, use second parameter (for backward compatibility, it can be named <code>Episode</code>):
 
To have the link text be other than the article name, use second parameter (for backward compatibility, it can be named <code>Episode</code>):
 
<pre>
 
<pre>
* {{IMDb episode|ID|Episode}}
+
* {{IMDb episode | ID | Episode }}
 
</pre>
 
</pre>
  
Note that the options include the "<tt>*</tt>" for a bulleted list since this is most likely to be used in an "External links" section.  
+
Note that the examples include the <code>*</code> for a bulleted list since this is most likely to be used in an "External links" section.
  
 
==Detailed instructions==
 
==Detailed instructions==
# Copy and paste one of the options above into the article
+
# Copy and paste one of the options above into the article.
# Go to http://www.imdb.com, select TV episode in the search drop down menu and search for the episode you want (say, One for the Road; you'll reach <code>http://www.imdb.com/find?s=ep&q=One+for+the+Road&x=13&y=10</code>)
+
# Go to https://www.imdb.com, select TV episode in the search drop down menu and search for the episode you want (say, One for the Road; you'll reach <code>https://www.imdb.com/find?s=ep&q=One+for+the+Road&x=13&y=10</code>).
# Click on the correct One for the Road in the list:  
+
# Click on the correct "One for the Road" in the list:  
## <code>[http://www.imdb.com/title/tt0539826/ "Cheers: One for the Road (#11.25)"] (1993)</code>  
+
## <code>[https://www.imdb.com/title/tt0539826/ "Cheers: One for the Road (#11.25)"] (1993)</code>.
# You then reach the page with [[URL]] looking like <tt>http://www.imdb.com/title/tt0539826/</tt> (or other 7-digit number)
+
# You then reach the page with [[URL]] looking like <code><nowiki>https://www.imdb.com/title/tt0539826/</nowiki></code> (or other 7-digit number)
# Copy '''only''' that number (here, "<code>0539826</code>"), omitting the "<code>tt</code>" but keep all the leading zeros (though IMDb currently seems to be able to add them as needed)
+
# Copy {{strong|only}} that number (here, <samp>0539826</samp>), omitting the <code>tt</code> part, but keep any leading zeros (though IMDb currently seems to be able to add them as needed)
# Replace "<tt>ID</tt>" in the template code with the number
+
# Replace <var>ID</var> in the template code with the number
 
## For the first option above, you'll then have
 
## For the first option above, you'll then have
##: <tt><nowiki>* {{IMDb episode|0539826}}</nowiki></tt> resulting in:
+
##: <code><nowiki>* {{IMDb episode | 0539826 }}</nowiki></code> resulting in:
##* {{IMDb episode|0539826}}
+
##* {{IMDb episode | 0539826 }}
##: Note that the link text is the same as the title of the page the template is used on; outside the page "One for the Road", use the second option:
+
##: Note that the link text is the same as the title of the page the template is used on; outside the page [[One for the Road]], use the second option:
## Replace "<tt>ID</tt>" with the number ''and'' "<tt>Episode</tt>" with "<tt>One for the Road</tt>"
+
## Replace <var>ID</var> with the number {{em|and}} <var>Episode</var> with <code>One for the Road</code>
##: <tt><nowiki>* {{IMDb episode|0539826|One for the Road}}</nowiki></tt> results in:
+
##: <code><nowiki>* {{IMDb episode | 0539826 | One for the Road }}</nowiki></code> results in:
##:* {{IMDb episode|0539826|One for the Road}}
+
##:* {{IMDb episode | 0539826 | One for the Road }}
 +
 
 +
== Examples ==
 +
 
 +
=== ID in Wikidata ===
 +
Usage in the article [[Perchance to Dream (The Twilight Zone)|Perchance to Dream (''The Twilight Zone'')]]:
 +
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}}}}</code>
 +
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | episode= Perchance to Dream }}</code>
 +
Output:
 +
:* {{{{BASEPAGENAME}} | 0734612 | Perchance to Dream }} [[File:OOjs UI icon edit-ltr-progressive.svg |frameless |text-top |10px |alt=Edit this at Wikidata |link=https://www.wikidata.org/wiki/Q2859200#P345 |Edit this at Wikidata]]
 +
 
 +
=== No ID in template or Wikidata ===
 +
Usage:
 +
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki></code>
 +
Output:
 +
:* {{ {{BASEPAGENAME}} }}
  
 
==See also==
 
==See also==
*[[Wikipedia:IMDB]]
+
* {{tlx|IMDb title|quotes{{=}}yes}} for short films that are not actually episodes of series
 +
* [[Wikipedia:IMDB]]
 +
* {{t|TV.com episode}}
  
<includeonly>
+
<includeonly>{{Sandbox other||
 
+
<!--Categories below this line; interwikis at Wikidata-->
<!-- PLEASE ADD CATEGORIES BELOW THIS LINE, THANKS. -->
 
 
{{DEFAULTSORT:Imdb episode}}
 
{{DEFAULTSORT:Imdb episode}}
 
[[Category:Television external link templates]]
 
[[Category:Television external link templates]]
 
+
[[Category:External link templates using Wikidata]]
<!-- PLEASE ADD INTERWIKIS BELOW THIS LINE, THANKS. -->
+
}}</includeonly>
</includeonly>
 

Latest revision as of 17:24, 25 April 2020

Template:Uses Wikidata

Template:IMDb episode displays an external link to a television episode page at the Internet Movie Database (IMDb). It is used exclusively for episodes. This template is intended for use in the external links section of an article.

To link an episode list, use {{IMDb episodes}} instead.
To link a work (film/movie, TV or Web program/series, video game, etc.), use {{IMDb title}} instead.
To link a person (actor, actress, etc.), use {{IMDb name}} instead.
To link a company, use {{IMDb company}} instead.

Usage

Unnamed parameters:

{{IMDb episode | ID }}
{{IMDb episode | ID | EPISODE }}

Named parameters:

{{IMDb episode | id= ID }}
{{IMDb episode | id= ID | episode= EPISODE }}

Using Wikidata property Template:Property:

{{IMDb episode}}
{{IMDb episode | episode= EPISODE }}

Options

The required parameter is just the ID number (for backward compatibility, the parameter can be named id) and the template then uses the article title as the anchor text:

* {{IMDb episode | ID }}

To have the link text be other than the article name, use second parameter (for backward compatibility, it can be named Episode):

* {{IMDb episode | ID | Episode }}

Note that the examples include the * for a bulleted list since this is most likely to be used in an "External links" section.

Detailed instructions

  1. Copy and paste one of the options above into the article.
  2. Go to https://www.imdb.com, select TV episode in the search drop down menu and search for the episode you want (say, One for the Road; you'll reach https://www.imdb.com/find?s=ep&q=One+for+the+Road&x=13&y=10).
  3. Click on the correct "One for the Road" in the list:
    1. "Cheers: One for the Road (#11.25)" (1993).
  4. You then reach the page with URL looking like https://www.imdb.com/title/tt0539826/ (or other 7-digit number)
  5. Copy only that number (here, 0539826), omitting the tt part, but keep any leading zeros (though IMDb currently seems to be able to add them as needed)
  6. Replace ID in the template code with the number
    1. For the first option above, you'll then have
      * {{IMDb episode | 0539826 }} resulting in:
      Note that the link text is the same as the title of the page the template is used on; outside the page One for the Road, use the second option:
    2. Replace ID with the number and Episode with One for the Road
      * {{IMDb episode | 0539826 | One for the Road }} results in:

Examples

ID in Wikidata

Usage in the article Perchance to Dream (The Twilight Zone):

* {{IMDb episode}}
* {{IMDb episode | episode= Perchance to Dream }}

Output:

No ID in template or Wikidata

Usage:

* {{IMDb episode}}

Output:

See also