Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

Jump to content

Template:Douban/doc

From Wikipedia, the free encyclopedia

Template:Douban displays an external link to a page for a title (movies, TV series, games, etc.) at the Douban website. It is intended for use in the external links section of an article.

For an external link to a person, use {{Douban people}} instead.

Usage

[edit]

Go to Douban.com (Douban), search and find the page of the work that you are looking for, check out its URL.

1. If it is a movie, then the URL should be like https://movie.douban.com/subject/[ID]/. In a Wikipedia article you may insert the code below

{{Douban|[ID]|[Link text]}}
{{Douban|id=[ID]|title=[Link text]}}

For example: https://movie.douban.com/subject/1292052/

  • {{Douban|1292052|EXAMPLE TEXT}} yields: "EXAMPLE TEXT at Douban (in Chinese)"
  • {{Douban|id=1292052}} yields: "Douban/doc at Douban (in Chinese)" (the current Wikipedia article's title will be used as the link's shown text)

2. If it is a book, then the URL should be like https://book.douban.com/subject/[ID]/. In a Wikipedia article you may insert the code below

{{Douban|[ID]|[Link text]|[Type]}},
{{Douban|id=[ID]|title=[Link text]|type=[Type]}},

[Type] would be "book"
[Link text] could be omitted, if so, the current Wikipedia article's title will be used
For example: https://book.douban.com/subject/1829226/

  • {{Douban|1829226|EXAMPLE TEXT|book}} yields: "EXAMPLE TEXT at Douban (in Chinese)"
  • {{Douban|id=1829226|type=book}} yields: "Douban/doc at Douban (in Chinese)" (the current Wikipedia article's title will be used as the link's shown text)

3. If it is music, then the URL should be like https://music.douban.com/subject/[ID]/. In a Wikipedia article you may insert the code below

{{Douban|[ID]|[Link text]|[Type]}},
{{Douban|id=[ID]|title=[Link text]|type=[Type]}},

[Type] would be "music"
[Link text] could be omitted, if so, the current Wikipedia article's title will be used
For example: https://music.douban.com/subject/1986446/

  • {{Douban|1986446|EXAMPLE TEXT|music}} yields: "EXAMPLE TEXT at Douban (in Chinese)"
  • {{Douban|id=1986446|type=music}} yields: "Douban/doc at Douban (in Chinese)" (the current Wikipedia article's title will be used as the link's shown text)

4. If it is a page of other type:

type: Type of the Douban webpage, or the [DIR] in the URL https://www.douban.com/[DIR]/[id]/
All possible values:

  • Movie, book or music (all of which have URL like https://[TYPE].douban.com/subject/[id]/), use 'movie', 'book' or 'music'
  • Page with URL like https://www.douban.com/[DIR]/[id]/, use [DIR] (\"/\" is allowed)", example: game, subject, location/drama, etc.

For example: https://www.douban.com/game/35352118/

  • {{Douban|35352118|EXAMPLE TEXT|game}} yields: "EXAMPLE TEXT at Douban (in Chinese)"
  • {{Douban|id=35352118|type=game}} yields: "Douban/doc at Douban (in Chinese)" (the current Wikipedia article's title will be used as the link's shown text)

For example: https://www.douban.com/location/drama/24741192/

  • {{Douban|24741192|EXAMPLE TEXT|location/drama}} yields: "EXAMPLE TEXT at Douban (in Chinese)"
  • {{Douban|id=24741192|type=location/drama}} yields: "Douban/doc at Douban (in Chinese)" (the current Wikipedia article's title will be used as the link's shown text)

Parameters

[edit]

To generate a link to a Douban webpage

Template parameters

ParameterDescriptionTypeStatus
IDid 1 (or the first anonymous parameter)

ID, that is the <code>[ID]</code> in the URL <code><nowiki>https://[type/www].douban.com/[dir]/[ID]/</nowiki></code>

Example
1292052
Numberrequired
Link texttitle 2 (or the second anonymous parameter)

Text that is shown by the link

Default
The current Wikipedia article (or page of other type)'s title
Example
The Shawshank Redemption
Stringoptional
Typetype 3 (or the third anonymous parameter)

Type of the Douban webpage (see above)

Default
movie
Example
"movie", "game", "subject", "location/drama", etc.
Stringoptional

Tracking categories

[edit]

See also

[edit]