求真百科歡迎當事人提供第一手真實資料,洗刷冤屈,終結網路霸凌。

Template:YouTube查看源代码查看历史

跳转至: 导航搜索

YouTube上的视频;zh-hk:影片

Template documentation[view] [edit] [history] [purge]

本模板用作產生引用YouTube视频;zh-hk:影片的參考文字。

用法

{{YouTube|视频id|link=no|视频描述|h=小時數|m=分鐘數|s=秒數|language=語言}}
  • 參數說明:
    • 參數1:视频id,即是在“http://www.youtube.com/watch?v=”之后的YouTube id
    • 參數2(可省略):為视频给出了一个可选的描述。
      • 若省略此參數則描述會是包含本模板的頁面名稱。
    • h(可省略):视频要開始播放的小時數。若省略此參數則為0。
    • m(可省略):视频要開始播放的分鐘數。若省略此參數則為0。
    • s(可省略):视频要開始播放的秒數。若省略此參數則為0。(注意:参数show不可用简称s,否则会与秒數冲突而无法正常显示。)
    • language(可省略):视频的語言。
    • link=no(可省略):用于取消YouTube条目链接。

範例

  1. {{Youtube|PfcgWfKOp1g}}
  2. {{YouTube|9bZkp7q19f0|《江南Style》}}
  3. {{YouTube|u=pewdiepie}}
  4. {{YouTube|show=startrek|''Star Trek: The Original Series''}}
  5. {{Youtube|PfcgWfKOp1g|Varias.Macau 85/86|m=3}}
  6. {{Youtube|PfcgWfKOp1g|Varias.Macau 85/86|m=3|s=04}}
  7. {{Youtube|PfcgWfKOp1g|Varias.Macau 85/86|m=3|s=04|language=zh-hk}}

用户频道链接

{{YouTube|user=userchannelname|title}}

  • user 是“YouTube 用户频道名”,像是https://www.youtube.com/user/userchannelname
  • user 参数也可以使用简写 u 指定

{{YouTube|channel=userchannelid|title}}

  • channel 是“YouTube 用户频道id”,像是https://www.youtube.com/channel/userchannelid
  • title 是可选的描述,如不提供则为页面标题名(PAGENAME)

模版数据

This is the TemplateData documentation for this template used by VisualEditor and other tools; see the monthly error report for this template.

TemplateData for YouTube

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

模板参数

参数说明类型状态
YouTube 影片IDid1

影片ID是網址 https://www.youtube.com/watch?v=[影片ID] 之處

默认值
例子
9bZkp7q19f0
自动值
字符串可选
YouTube 使用者名稱useru

YouTube 使用者名稱是在網址 https://www.youtube.com/user/[使用者名稱] 之處

默认值
例子
pewdiepie
自动值
字符串可选
YouTube 頻道IDchannelc

YouTube 頻道ID是在網址 https://www.youtube.com/channel/[頻道ID] 之處

默认值
例子
UC-9-kyTW8ZkZNDHQJ6FgpwQ
自动值
字符串可选
YouTube show nameshow

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

默认值
例子
startrek
自动值
字符串可选
YouTube 播放清單IDplaylistp

YouTube 播放清單ID是在網址 https://www.youtube.com/playlist?list=[播放清單ID] 之處

默认值
例子
PLrEnWoR732-DZV1Jc8bUpVTF_HTPbywpE
自动值
字符串可选
Titletitle12

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
自动值
字符串推荐
Link onlink

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

默认值
例子
no
自动值
字符串可选

參見