模 板 :YouTube
请不 如果链接这种 |
此模 为了避免 测试 |
用法
链接至 视频
{{YouTube|视频id|link=no|视频描述|h=
参 数 说明:参 数 1:视频id,即 是 在 http://www.youtube.com/watch?v=
或 https://music.youtube.com/watch?v=
之 后 的 YouTube id,须符合 d:Property:P1651#P2302的 格式 约束规定:64位 整数 的 Base64编码,即 符合 以下 的 正 则表达式:[-_0-9A-Za-z]{11}(即 11个字符 的 半角 的 连字暨减号 、下横 线、阿 拉 伯 数字 、不 区分 大小 写 的 英文 字母 )例 如:https://www.youtube.com/watch?v=7bvukR-332A ,那 么视频id便 是 7bvukR-332A
。
参 数 2(可 省略 ):为视频给出 了 一个可选的描述。若 省略 此参数 则描述 会 是 包含 本 模 板 的 页面名称 。
- h(
可 省略 ):视频要 开始播放的 小 时数。若 省略 此参数 则为0。 - m(
可 省略 ):视频要 开始播放的 分 钟数。若 省略 此参数 则为0。 - s(
可 省略 ):视频要 开始播放的 秒 数 。若 省略 此参数 则为0。(注意 :参 数 show不 可用 简称s,否 则会与 秒 数 冲突而无法 正常 显示。) - language(
可 省略 ):视频的 语言。 - link=no(
可 省略 ):用 于取消 YouTube条目 链接。
示 例
{{Youtube|PfcgWfKOp1g}}
效果 :YouTube上 的 视频
{{YouTube|9bZkp7q19f0|《
江南 Style》}}{{YouTube|c=UCidwPAdN3UO59sMOZX2cn6Q}}
{{YouTube|show=startrek|''Star Trek: The Original Series''}}
{{Youtube|PfcgWfKOp1g|Varias.Macau 85/86|m=3}}
效果 :YouTube上 的 Varias.Macau 85/86,始 于3分 00秒
{{Youtube|PfcgWfKOp1g|Varias.Macau 85/86|m=3|s=04}}
效果 :YouTube上 的 Varias.Macau 85/86,始 于3分 04秒
{{Youtube|PfcgWfKOp1g|Varias.Macau 85/86|m=3|s=04|language=zh-hk}}
效果 :YouTube上 的 Varias.Macau 85/86,始 于3分 04秒 (繁 体 中 文 )
链接至 用 户频道
{{YouTube|user=userchannelname|title}}
参 数 user:填 入 “YouTube用 户频道 名 ”,像 是 https://www.youtube.com/user/userchannelname
可 以使用 简写 u指定 ,即 {{YouTube|u=userchannelname|title}}
{{YouTube|channel=userchannelid|title}}
参 数 channel:填 入 “YouTube用 户频道 id”,像 是 https://www.youtube.com/channel/userchannelid
,该参数 须符合 d:Property:P2397#P2302的 格式 约束规定:须符合 以下 的 正 则表达式:UC[-_0-9A-Za-z]{21}[AQgw]可 以使用 简写 c指定 ,即 {{YouTube|c=userchannelid|title}}
{{YouTube|custom=yourcustomname|title}}
参 数 custom:填 入 “YouTube自 定 义网址 name”,像 是 https://www.youtube.com/c/yourcustomname
。
{{YouTube|handle=userhandlecode|title}}
参 数 handle:填 入 “YouTube 帐户代 码”,像 是 https://www.youtube.com/@userhandlecode
可 以使用 简写 @指定 ,即 {{YouTube|@=userhandlecode|title}}
链接至 视频清 单
{{YouTube|playlist=playlistid|title}}
参 数 playlist:填 入 “YouTube播放清 单id”,像 是 https://www.youtube.com/playlist?list=playlistid
,该参数 须符合 d:Property:P4300#P2302的 格式 约束规定:须符合 以下 的 正 则表达式:EL[0-9A-Za-z_-]{10}[048AEIMQUYcgkosw]||PL[0-9A-Za-z_-]{16}|(?:UU|UC|PL|LL|EL)[0-9A-Za-z_-]{21}[AQgw]|PL[0-9A-Za-z_-]{32}|(?:OLAK5uy_|RDCLAK5uy_)[0-9A-Za-z_-]{32}[048AEIMQUYcgkosw]可 以使用 简写 p指定 ,即 {{YouTube|p=playlistid|title}}
。参 数 title是 可 选的描述,如不提供 则为当 前条 目 标题名称 (PAGENAME)。
模 版 数 据
描述 | 类型 | |||
---|---|---|---|---|
YouTube 视频ID | id 1 | 视频ID
| ||
YouTube | user u | YouTube
| ||
YouTube 频道ID | channel c | YouTube 频道ID
| ||
YouTube | custom | YouTube
| ||
YouTube 帐号 | handle @ | YouTube 帐号
| ||
YouTube 节目 | show | YouTube 节目
| ||
YouTube 播放 | playlist p | YouTube 播放
| ||
Title | title 1 2 | The name of the page being linked to
| 推荐 | |
Link on | link | Set this parameter to no to suppress the link to the YouTube article
|