Template:Douban people: Difference between revisions
Dabao qian (talk | contribs) ←Created page with '{{#switch:{{{type|movie}}} |book=[https://book.douban.com/author/{{#if:{{{1|{{{id|{{#property:P6441}}}}}}}}|{{{1|{{{id|{{#property:P6441}}}}}}}}}}/ {{{2|{{{title|{{PAGENAMEBASE}}}}}}}}{{{3|{{{description|}}}}}}] on Douban {{in lang|zh}}<includeonly>{{EditAtWikidata|pid=P6441|{{{1|{{{id|}}}}}}}}</includeonly> |movie=[https://movie.douban.com/celebrity/{{#if:{{{1|{{{id|{{#property:P5284}}}}}}}}|{{{1|{{{id|{{#property:P5284}}}}}}}}}}/ {{{2|{{{title|{{PAGEN...' |
Dabao qian (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
{{#switch:{{{type|movie}}} |
{{#switch:{{{type|movie}}} |
||
|book=[https://book.douban.com/author/{{#if:{{{1|{{{id|{{#property:P6441}}}}}}}}|{{{1|{{{id|{{#property:P6441}}}}}}}}}}/ {{{2|{{{title|{{PAGENAMEBASE}}}}}}}}{{{3|{{{description|}}}}}}] on [[Douban]] {{in lang|zh}}<includeonly>{{EditAtWikidata|pid=P6441|{{{1|{{{id|}}}}}}}}</includeonly> |
|book=[https://book.douban.com/author/{{#if:{{{1|{{{id|{{#property:P6441}}}}}}}}|{{{1|{{{id|{{#property:P6441}}}}}}}}}}/ {{{2|{{{title|{{PAGENAMEBASE}}}}}}}}{{{3|{{{description|}}}}}}] on [[Douban]] {{in lang|zh}}<includeonly>{{EditAtWikidata|pid=P6441|{{{1|{{{id|}}}}}}}}</includeonly> |
||
|movie=[https://movie.douban.com/celebrity/{{#if:{{{1|{{{id|{{#property:P5284}}}}}}}}|{{{1|{{{id|{{#property:P5284}}}}}}}}}}/ {{{2|{{{title|{{PAGENAMEBASE}}}}}}}}{{{3|{{{description|}}}}}} on [[Douban]] {{in lang|zh}}<includeonly>{{EditAtWikidata|pid=P5284|{{{1|{{{id|}}}}}}}}</includeonly> |
|movie=[https://movie.douban.com/celebrity/{{#if:{{{1|{{{id|{{#property:P5284}}}}}}}}|{{{1|{{{id|{{#property:P5284}}}}}}}}}}/ {{{2|{{{title|{{PAGENAMEBASE}}}}}}}}{{{3|{{{description|}}}}}}] on [[Douban]] {{in lang|zh}}<includeonly>{{EditAtWikidata|pid=P5284|{{{1|{{{id|}}}}}}}}</includeonly> |
||
|music=[https://music.douban.com/musician/{{#if:{{{1|{{{id|{{#property:P6446}}}}}}}}|{{{1|{{{id|{{#property:P6446}}}}}}}}}}/ {{{2|{{{title|{{PAGENAMEBASE}}}}}}}}{{{3|{{{description|}}}}}} on [[Douban]] {{in lang|zh}}<includeonly>{{EditAtWikidata|pid=P6446|{{{1|{{{id|}}}}}}}}</includeonly> |
|music=[https://music.douban.com/musician/{{#if:{{{1|{{{id|{{#property:P6446}}}}}}}}|{{{1|{{{id|{{#property:P6446}}}}}}}}}}/ {{{2|{{{title|{{PAGENAMEBASE}}}}}}}}{{{3|{{{description|}}}}}}] on [[Douban]] {{in lang|zh}}<includeonly>{{EditAtWikidata|pid=P6446|{{{1|{{{id|}}}}}}}}</includeonly> |
||
|#default={{Font|css=color:red; font-size:smaller;|Error: Invalid type parameter.}}}}<noinclude> |
|#default={{Font|css=color:red; font-size:smaller;|Error: Invalid type parameter.}}}}<noinclude> |
||
{{documentation}}</noinclude> |
{{documentation}}</noinclude> |
Revision as of 19:07, 11 April 2024
Douban people on Douban (in Chinese)
Template:Douban people displays an external link to a page for a person at the Douban website. It is intended for use in the external links section of an article.
For external links to movies and TV series, use {{Douban}} instead.
Usage
Go to Douban.com (Douban), search and find the page of the person that you are looking for, check out its URL.
1. If it is a movie celebrity, then the URL should be like https://movie.douban.com/celebrity/[ID]/
. In a Wikipedia article you may insert the code below
{{Douban people|[ID]}} {{Douban people|[ID]|[Link text]}}
For example: https://movie.douban.com/celebrity/1053554/
{{Douban people|1053554}}
yields: "Douban people on Douban (in Chinese)" (the current Wikipedia article's title will be used as the link's shown text){{Douban people|1053554|Satoshi Kon}}
yields: "Satoshi Kon on Douban (in Chinese)"
2. If it is a book author, then the URL should be like https://book.douban.com/author/[ID]/
. In a Wikipedia article you may insert the code below
{{Douban people|[ID]|type=book}} {{Douban people|[ID]|[Link text]|type=book}}
For example: https://book.douban.com/author/4506751/
{{Douban people|4506751|type=book}}
yields: "Douban people on Douban (in Chinese)" (the current Wikipedia article's title will be used as the link's shown text){{Douban people|4506751|Honoré de Balzac|type=book}}
yields: "Honoré de Balzac on Douban (in Chinese)"
3. If it is a musician, then the URL should be like https://music.douban.com/musician/[ID]/
. In a Wikipedia article you may insert the code below
{{Douban people|[ID]|type=music}} {{Douban people|[ID]|[Link text]|type=music}}
For example: https://music.douban.com/musician/103873/
{{Douban people|103873|type=music}}
yields: "Douban people on Douban (in Chinese)" (the current Wikipedia article's title will be used as the link's shown text){{Douban people|103873|Joi Chua|type=music}}
yields: "Joi Chua on Douban (in Chinese)"
Parameters
To generate a link to a Douban person 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 |
Description text | description 3 (or the third anonymous parameter) | Text that is shown after the link | String | optional |
Type | type 4 (or the fourth anonymous parameter) | Type of the Douban person webpage (see above)
| String | optional |