Template:Douban: Difference between revisions
Dabao qian (talk | contribs) Restored revision 1049414890 by MusikBot II (talk): Do not use mobile site directly |
Restored the update version of this Template with all current douban updated website and sub sites. Tags: Mobile edit Mobile web edit Advanced mobile edit |
||
Line 1: | Line 1: | ||
[https://m.douban.com/{{#if:{{{celebID|}}} |
|||
''[https://<!-- |
|||
|movie/celebrity/{{{celebID|}}}|{{#if:{{{bookID|}}} |
|||
-->{{#switch:{{{3|{{{type|movie}}}}}}<!-- the parameter "type" is "movie" by default --> |
|||
| |
|book/subject/{{{bookID|}}}|{{#if:{{{movieID|}}} |
||
| |
|movie/subject/{{{movieID|}}}|{{#if:{{{musicID|}}} |
||
|music |
|music/subject/{{{musicID|}}} |
||
|home_guide |
|||
|www.douban.com/{{{3|{{{type|}}}}}}/{{{1|{{{id|}}}}}}<!-- default --> |
|||
|{{{default|}}} |
|||
}}/<!-- |
|||
}} |
|||
--> {{#if:{{{2|{{{title|}}}}}}|{{{2|{{{title|}}}}}}|{{PAGENAMEBASE}}}}]''<!-- the parameter "title" is the current Wikipedia page's title by default |
|||
}} |
|||
--> at [[Douban]] {{in lang|zh}}<includeonly>{{#switch:{{{3|{{{type|movie}}}}}}|movie={{EditAtWikidata|pid=P4529|{{{1|{{{id|}}}}}}}}{{#if:{{{1|{{{id|}}}}}}{{#property:P4529}}||{{main other|[[Category:Douban template with no id set]]}}}}|}}</includeonly><noinclude>{{Documentation}}</noinclude> |
|||
}} |
|||
}} {{#if: {{{<includeonly>|</includeonly>}}}|{{{DoubanTittle}}}| {{#if:{{{t|{{{tittle|}}}}}}| {{{t|{{{tittle|}}}}}} |{{PAGENAMEBASE}} |
|||
}} |
|||
}}] @ [[Douban]] {{in lang|zh}} |
|||
<includeonly></includeonly> |
|||
<noinclude>{{Documentation}}</noinclude> |
Revision as of 10:53, 8 April 2024
{{{DoubanTittle}}} @ Douban (in Chinese)
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
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/
"
" (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/
"
" (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/
"
" (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/
"
" (the current Wikipedia article's title will be used as the link's shown text)
For example: https://www.douban.com/location/drama/24741192/
"
" (the current Wikipedia article's title will be used as the link's shown text)
Parameters
To generate a link to a Douban webpage
Parameter | Description | Type | Status | |
---|---|---|---|---|
ID | id 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>
| Number | required |
Link text | title 2 (or the second anonymous parameter) | Text that is shown by the link
| String | optional |
Type | type 3 (or the third anonymous parameter) | Type of the Douban webpage (see above)
| String | optional |
Tracking categories
See also
- {{Douban people}}
- {{IMDb title}}