Template:Douban people/doc: Difference between revisions
Dabao qian (talk | contribs) No edit summary |
→Usage: update example URL |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 12: | Line 12: | ||
<pre> |
<pre> |
||
{{Douban people|[ID]}} |
{{Douban people|[ID]}} |
||
⚫ | |||
</pre> |
</pre> |
||
For example: <code>https://movie.douban.com/celebrity/1053554/</code> |
|||
For example: |
|||
* <code><nowiki>{{Douban people|1053554}}</nowiki></code> yields: "{{Douban people|1053554}}"<small> (the current Wikipedia article's title will be used as the link's shown text)</small> |
* <code><nowiki>{{Douban people|1053554}}</nowiki></code> yields: "{{Douban people|1053554}}"<small> (the current Wikipedia article's title will be used as the link's shown text)</small> |
||
Or |
|||
<pre> |
|||
⚫ | |||
</pre> |
|||
For example: |
|||
* <code><nowiki>{{Douban people|1053554|Satoshi Kon}}</nowiki></code> yields: "{{Douban people|1053554|Satoshi Kon}}" |
* <code><nowiki>{{Douban people|1053554|Satoshi Kon}}</nowiki></code> yields: "{{Douban people|1053554|Satoshi Kon}}" |
||
Line 25: | Line 21: | ||
<pre> |
<pre> |
||
{{Douban people|[ID]|type=book}} |
{{Douban people|[ID]|type=book}} |
||
⚫ | |||
</pre> |
</pre> |
||
For example: <code>https://book.douban.com/author/4506751/</code> |
|||
For example: |
|||
* <code><nowiki>{{Douban people|4506751|type=book}}</nowiki></code> yields: "{{Douban people|4506751|type=book}}"<small> (the current Wikipedia article's title will be used as the link's shown text)</small> |
* <code><nowiki>{{Douban people|4506751|type=book}}</nowiki></code> yields: "{{Douban people|4506751|type=book}}"<small> (the current Wikipedia article's title will be used as the link's shown text)</small> |
||
Or |
|||
<pre> |
|||
⚫ | |||
</pre> |
|||
For example: |
|||
* <code><nowiki>{{Douban people|4506751|Honoré de Balzac|type=book}}</nowiki></code> yields: "{{Douban people|4506751|Honoré de Balzac|type=book}}" |
* <code><nowiki>{{Douban people|4506751|Honoré de Balzac|type=book}}</nowiki></code> yields: "{{Douban people|4506751|Honoré de Balzac|type=book}}" |
||
Line 38: | Line 30: | ||
<pre> |
<pre> |
||
{{Douban people|[ID]|type=music}} |
{{Douban people|[ID]|type=music}} |
||
⚫ | |||
</pre> |
</pre> |
||
For example: <code>https://music.douban.com/musician/103873/</code> |
|||
For example: |
|||
* <code><nowiki>{{Douban people|103873|type=music}}</nowiki></code> yields: "{{Douban people|103873|type=music}}"<small> (the current Wikipedia article's title will be used as the link's shown text)</small> |
* <code><nowiki>{{Douban people|103873|type=music}}</nowiki></code> yields: "{{Douban people|103873|type=music}}"<small> (the current Wikipedia article's title will be used as the link's shown text)</small> |
||
Or |
|||
<pre> |
|||
⚫ | |||
</pre> |
|||
For example: |
|||
* <code><nowiki>{{Douban people|103873|Joi Chua|type=music}}</nowiki></code> yields: "{{Douban people|103873|Joi Chua|type=music}}" |
* <code><nowiki>{{Douban people|103873|Joi Chua|type=music}}</nowiki></code> yields: "{{Douban people|103873|Joi Chua|type=music}}" |
||
Line 56: | Line 44: | ||
"label": "ID", |
"label": "ID", |
||
"description": "ID, that is the <code>[ID]</code> in the URL <code><nowiki>https://[type/www].douban.com/[dir]/[ID]/</nowiki></code>", |
"description": "ID, that is the <code>[ID]</code> in the URL <code><nowiki>https://[type/www].douban.com/[dir]/[ID]/</nowiki></code>", |
||
"example": " |
"example": "1053554", |
||
"type": "number", |
"type": "number", |
||
"aliases": [ |
"aliases": [ |
||
Line 66: | Line 54: | ||
"label": "Link text", |
"label": "Link text", |
||
"description": "Text that is shown by the link", |
"description": "Text that is shown by the link", |
||
"example": " |
"example": "Satoshi Kon", |
||
"type": "string", |
"type": "string", |
||
"default": "The current Wikipedia article (or page of other type)'s title", |
"default": "The current Wikipedia article (or page of other type)'s title", |
||
"aliases": [ |
"aliases": [ |
||
"2 (or the second anonymous parameter)" |
"2 (or the second anonymous parameter)" |
||
] |
|||
}, |
|||
"description": { |
|||
"label": "Description text", |
|||
"description": "Text that is shown after the link", |
|||
"type": "string", |
|||
"aliases": [ |
|||
"3 (or the third anonymous parameter)" |
|||
] |
] |
||
}, |
}, |
||
"type": { |
"type": { |
||
"label": "Type", |
"label": "Type", |
||
"description": "Type of the Douban webpage (see above)", |
"description": "Type of the Douban person webpage (see above)", |
||
"example": "\"movie\", \" |
"example": "\"movie\", \"book\", \"music\", etc.", |
||
"type": "string", |
"type": "string", |
||
"default": "movie", |
"default": "movie", |
||
Line 87: | Line 83: | ||
"id", |
"id", |
||
"title", |
"title", |
||
"description", |
|||
"type" |
"type" |
||
] |
] |
Latest revision as of 02:38, 26 August 2024
This is a documentation subpage for Template:Douban people. It may contain usage information, categories and other content that is not part of the original template page. |
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
[edit]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/doc at 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 at 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/doc at 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 at 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/doc at 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 at Douban (in Chinese)"
Parameters
[edit]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 |
See also
[edit]