Template:YouTube/doc
此頁面是Template:YouTube的Template文档。 此頁面可能包含了模板的使用說明、分類和其他内容。 |
请不要使用此模板链接到违反版权法的材料。 如果链接这种材料,则必须使用合乎版权的链接替代或者立即删除。 |
此Template文档被引用於17,000+個頁面。 為了避免造成大規模的影響,所有對此Template文档的編輯應先於沙盒、測試樣例或您的沙盒上測試。 測試後無誤的版本可以一次性地加入此Template文档中,但是修改前請務必於討論頁發起討論。 模板引用數量會自動更新。 |
何时使用
Use this to create an external link to YouTube in the ==External links== section.
This is not a citation template. Use {{cite AV media}} to provide bibliographic citations in footnotes. Alternatively, use {{cite news}} if the video is a newscast, or {{cite episode}} if the video is in an episodic format.
如何使用
视频
使用 (one parameter):
{{YouTube|''VIDEOID''}}
{{YouTube|id=''VIDEOID''}}
Usage (two parameters):
{{YouTube|''VIDEOID''|''TITLE''}}
{{YouTube|id=''VIDEOID''|title=''TITLE''}}
Parameter descriptions:
- id (or unnamed parameter 1) is the "YouTube video id" which appears as https://www.youtube.com/watch?v=VIDEOID
- title (or unnamed parameter 2) gives an optional description that may replace the default title (Video)
Examples (1 parameter):
{{YouTube|9bZkp7q19f0}}
{{YouTube|id=9bZkp7q19f0}}
Examples (2 parameters):
{{YouTube|9bZkp7q19f0|"Gangnam Style"}}
{{YouTube|id=9bZkp7q19f0|title="Gangnam Style"}}
用户频道
Usage (one parameter):
{{YouTube|u=''USERNAME''}}
{{YouTube|user=''USERNAME''}}
Usage (two parameters):
{{YouTube|u=''USERNAME''|''TITLE''}}
{{YouTube|u=''USERNAME''|title=''TITLE''}}
{{YouTube|user=''USERNAME''|''TITLE''}}
{{YouTube|user=''USERNAME''|title=''TITLE''}}
Parameter descriptions:
- u or user is the "YouTube user's (channel) name" which appears as https://www.youtube.com/user/USERNAME
- title gives an optional description that may replace the default title (PAGENAME)
- suffix replaces the default " 's " after the channel name. It is only to be used in the rare occasion that the channel name is a compound noun ending in S, and making it possessive does not repeat the S sound. Do not use it for a brand name ending in S, for example Smosh Games, which is a singular entity. See MOS:POSS for more information.
Examples (1 parameter):
{{YouTube|u=pewdiepie}}
{{YouTube|user=pewdiepie}}
Example (2 parameters):
{{YouTube|u=pewdiepie|PewDiePie}}
{{YouTube|user=pewdiepie|PewDiePie}}
Example (3 parameters):
{{YouTube|user=officialBEG|title=Brown Eyed Girls|suffix='}}
频道
Usage (one parameter):
{{YouTube|c=''CHANNELID''}}
{{YouTube|channel=''CHANNELID''}}
Usage (two parameters):
{{YouTube|c=''CHANNELID''|''TITLE''}}
{{YouTube|c=''CHANNELID''|title=''TITLE''}}
{{YouTube|channel=''CHANNELID''|''TITLE''}}
{{YouTube|channel=''CHANNELID''|title=''TITLE''}}
Parameter descriptions:
- c or channel is the "YouTube channel id" which appears as https://www.youtube.com/channel/CHANNELID
- title gives an optional description that may replace the default title (PAGENAME)
Examples (1 parameter):
{{YouTube|c=UC-9-kyTW8ZkZNDHQJ6FgpwQ}}
{{YouTube|channel=UC-9-kyTW8ZkZNDHQJ6FgpwQ}}
Example (2 parameters):
{{YouTube|c=UC-9-kyTW8ZkZNDHQJ6FgpwQ|#Music}}
{{YouTube|channel=UC-9-kyTW8ZkZNDHQJ6FgpwQ|#Music}}
节目
Usage (one parameter):
{{YouTube|s=''SHOWNAME''}}
{{YouTube|show=''SHOWNAME''}}
Usage (two parameters):
{{YouTube|s=''SHOWNAME''|''TITLE''}}
{{YouTube|s=''SHOWNAME''|title=''TITLE''}}
{{YouTube|show=''SHOWNAME''|''TITLE''}}
{{YouTube|show=''SHOWNAME''|title=''TITLE''}}
Parameter descriptions:
- s or show is the "YouTube show name" which appears as https://www.youtube.com/show/SHOWNAME
- title gives an optional description that may replace the default title (PAGENAME)
Examples (1 parameter):
{{YouTube|s=startrek}}
{{YouTube|show=startrek}}
Example (2 parameters):
{{YouTube|s=startrek|''Star Trek: The Original Series''}}
{{YouTube|show=startrek|''Star Trek: The Original Series''}}
播放列表
Usage (one parameter):
{{YouTube|p=''PLAYLISTID''}}
{{YouTube|playlist=''PLAYLISTID''}}
Usage (two parameters):
{{YouTube|p=''PLAYLISTID''|''TITLE''}}
{{YouTube|p=''PLAYLISTID''|title=''TITLE''}}
{{YouTube|playlist=''PLAYLISTID''|''TITLE''}}
{{YouTube|playlist=''PLAYLISTID''|title=''TITLE''}}
Parameter descriptions:
- p or playlist is the "YouTube playlist id" which appears as https://www.youtube.com/playlist?list=PLAYLISTID
- title gives an optional description that may replace the default title (PAGENAME)
Examples (1 parameter):
{{YouTube|p=PLrEnWoR732-DZV1Jc8bUpVTF_HTPbywpE}}
{{YouTube|playlist=PLrEnWoR732-DZV1Jc8bUpVTF_HTPbywpE}}
Example (2 parameters):
{{YouTube|p=PLrEnWoR732-DZV1Jc8bUpVTF_HTPbywpE|Learn Something New}}
{{YouTube|playlist=PLrEnWoR732-DZV1Jc8bUpVTF_HTPbywpE|Learn Something New}}
Suppress wikilink
The link to YouTube can be suppressed with the parameter |link=no
. Example:
{{YouTube|9bZkp7q19f0|"PSY - GANGNAM STYLE(강남스타일) M/V"|link=no}}
模版数据
Use this to create an external link to YouTube in the External links section. This is not a citation template.
参数 | 描述 | 类型 | 状态 | |
---|---|---|---|---|
YouTube video id | id 1 | The video id which appears after https://www.youtube.com/watch?v= in the URL
| 字符串 | 可选 |
YouTube user's (channel) name | user u | The user name which appears after https://www.youtube.com/user/ in the URL
| 字符串 | 可选 |
YouTube channel id | channel c | The channel id which appears after https://www.youtube.com/channel/ in the URL
| 字符串 | 可选 |
YouTube show name | show s | The show name which appears after https://www.youtube.com/show/ in the URL
| 字符串 | 可选 |
YouTube playlist id | playlist p | The playlist id which appears after https://www.youtube.com/playlist?list= in the URL
| 字符串 | 可选 |
Title | title 1 2 | The name of the page being linked to
| 字符串 | 推荐 |
Channel title suffix | suffix | Text immediately after the channel title. It is only to be used in the rare occasion that the channel title is a compound noun ending in S, and making it possessive does not repeat the S sound.
| 字符串 | 可选 |
Link on | link | Set this parameter to no to suppress the link to the YouTube article
| 字符串 | 可选 |
参见
- {{External media}} – to link to external media, including YouTube videos
- {{Cite AV media}} – to cite a video
- {{Cite news}} – to cite a newscast
- {{Cite episode}} – to cite an episode of a show
- {{Cite serial}} – to cite a serial of a show
- {{YouTube navbox}} – navigation box for YouTube related articles
- {{YouTube most subbed}} – navigation box for most subscribed YouTube user articles
- WP:YOUTUBE – YouTube linking guideline
- Wikipedia:WikiProject Internet culture – Wikiproject covering YouTube personalities and videos
- Category:Articles using YouTube with invalid parameters – list of pages using this template incorrectly
- All Wikipedia pages linked to http://*.youtube.com and to https://*.youtube.com