跳转到内容

Template:YouTube/doc

本页使用了标题或全文手工转换
维基百科,自由的百科全书

这是本页的一个历史版本,由Vozhuo留言 | 贡献2016年7月7日 (四) 03:27 TemplateData:​ // Edit via Wikiplus)编辑。这可能和当前版本存在着巨大的差异。

何时使用

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):

  1. {{YouTube|9bZkp7q19f0}}
    YouTube上的视频
  2. {{YouTube|id=9bZkp7q19f0}}
    YouTube上的视频

Examples (2 parameters):

  1. {{YouTube|9bZkp7q19f0|"Gangnam Style"}}
    YouTube上的"Gangnam Style"
  2. {{YouTube|id=9bZkp7q19f0|title="Gangnam Style"}}
    YouTube上的"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):

  1. {{YouTube|u=pewdiepie}}
    YouTube上的PAGENAME頻道
  2. {{YouTube|user=pewdiepie}}
    YouTube上的PAGENAME頻道

Example (2 parameters):

  1. {{YouTube|u=pewdiepie|PewDiePie}}
    YouTube上的PewDiePie頻道
  2. {{YouTube|user=pewdiepie|PewDiePie}}
    YouTube上的PewDiePie頻道

Example (3 parameters):

  1. {{YouTube|user=officialBEG|title=Brown Eyed Girls|suffix='}}
    YouTube上的Brown Eyed Girls頻道

频道

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):

  1. {{YouTube|c=UC-9-kyTW8ZkZNDHQJ6FgpwQ}}
    YouTube上的PAGENAME頻道
  2. {{YouTube|channel=UC-9-kyTW8ZkZNDHQJ6FgpwQ}}
    YouTube上的PAGENAME頻道

Example (2 parameters):

  1. {{YouTube|c=UC-9-kyTW8ZkZNDHQJ6FgpwQ|#Music}}
    YouTube上的#Music頻道
  2. {{YouTube|channel=UC-9-kyTW8ZkZNDHQJ6FgpwQ|#Music}}
    YouTube上的#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):

  1. {{YouTube|s=startrek}}
    PAGENAME&t=0h0m0s YouTube上的视频
  2. {{YouTube|show=startrek}}
    YouTube上的PAGENAME劇集

Example (2 parameters):

  1. {{YouTube|s=startrek|''Star Trek: The Original Series''}}
    Star Trek: The Original Series&t=0h0m0s YouTube上的视频
  2. {{YouTube|show=startrek|''Star Trek: The Original Series''}}
    YouTube上的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):

  1. {{YouTube|p=PLrEnWoR732-DZV1Jc8bUpVTF_HTPbywpE}}
    YouTube上的PAGENAME播放列表
  2. {{YouTube|playlist=PLrEnWoR732-DZV1Jc8bUpVTF_HTPbywpE}}
    YouTube上的PAGENAME播放列表

Example (2 parameters):

  1. {{YouTube|p=PLrEnWoR732-DZV1Jc8bUpVTF_HTPbywpE|Learn Something New}}
    YouTube上的Learn Something New播放列表
  2. {{YouTube|playlist=PLrEnWoR732-DZV1Jc8bUpVTF_HTPbywpE|Learn Something New}}
    YouTube上的Learn Something New播放列表

The link to YouTube can be suppressed with the parameter |link=no. Example:

模版数据

以下是该模板的模板数据,适用于可视化编辑器等工具。

YouTube模板数据

Use this to create an external link to YouTube in the External links section. This is not a citation template.

模板参数

参数描述类型状态
YouTube video idid 1

The video id which appears after https://www.youtube.com/watch?v= in the URL

示例值
9bZkp7q19f0
字符串可选
YouTube user's (channel) nameuser u

The user name which appears after https://www.youtube.com/user/ in the URL

示例值
pewdiepie
字符串可选
YouTube channel idchannel c

The channel id which appears after https://www.youtube.com/channel/ in the URL

示例值
UC-9-kyTW8ZkZNDHQJ6FgpwQ
字符串可选
YouTube show nameshow s

The show name which appears after https://www.youtube.com/show/ in the URL

示例值
startrek
字符串可选
YouTube playlist idplaylist p

The playlist id which appears after https://www.youtube.com/playlist?list= in the URL

示例值
PLrEnWoR732-DZV1Jc8bUpVTF_HTPbywpE
字符串可选
Titletitle 1 2

The name of the page being linked to

默认值
If it is a video, Video, if it is a show, the article's page name in italics, otherwise, the article's page name unformatted
示例值
Gangnam Style
字符串推荐
Channel title suffixsuffix

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.

默认值
's
示例值
'
字符串可选
Link onlink

Set this parameter to no to suppress the link to the YouTube article

示例值
no
字符串可选

参见