模板:YouTube

本頁使用了標題或全文手工轉換
出自删除百科
(重新導向自Template:Youtube)

YouTube上的影片

文件圖示 模板文件[檢視] [編輯] [歷史] [清除快取]

指令碼錯誤:沒有「High-use」這個模組。 本模板用作==外部連結==章節連結YouTube影片的外部連結。此模板並非參考來源模板,您可以使用{{cite AV media}}參照影音媒體。對於連續劇或連載式的媒體,使用{{cite episode}}或{{cite serial}}。要參照唱片封套上的說明文字(liner notes)及其他配有影音媒體的平面媒體,請使用{{cite AV media notes}}。

用法

{{YouTube|影片id|link=no|影片描述|h=小時數|m=分鐘數|s=秒數|language=語言}}
  • 參數說明:
    • 參數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個字元的半形的連字暨減號、下橫線、阿拉伯數字、不區分大小寫的英文字母)
    • 參數2(可省略):為影片給出了一個可選的描述。
      • 若省略此參數則描述會是包含本模板的頁面名稱。
    • h(可省略):影片要開始播放的小時數。若省略此參數則為0。
    • m(可省略):影片要開始播放的分鐘數。若省略此參數則為0。
    • s(可省略):影片要開始播放的秒數。若省略此參數則為0。(注意:參數show不可用簡稱s,否則會與秒數衝突而無法正常顯示。)
    • language(可省略):影片的語言。
    • link=no(可省略):用於取消YouTube條目連結。

範例

  1. {{Youtube|PfcgWfKOp1g}}
  2. {{YouTube|9bZkp7q19f0|《江南Style》}}
  3. {{YouTube|c=UCidwPAdN3UO59sMOZX2cn6Q}}
  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}}

模版資料

這是該模板的模板資料,用於視覺化編輯器及其它工具。

YouTube模板資料

<templatedata> { "description": "本模板用以在外部連結段落建立連結至YouTube網站的超連結。非參考來源模板。", "params": { "id": { "label": "YouTube 影片ID", "description": "影片ID是網址 https://www.youtube.com/watch?v=[影片ID] 之處", "aliases": [ "1" ], "example": "9bZkp7q19f0", "type": "string" }, "user": { "label": "YouTube 使用者名稱", "description": "YouTube 使用者名稱是在網址 https://www.youtube.com/user/[使用者名稱] 之處", "aliases": [ "u" ], "example": "pewdiepie", "type": "string" }, "channel": { "label": "YouTube 頻道ID", "description": "YouTube 頻道ID是在網址 https://www.youtube.com/channel/[頻道ID] 之處", "aliases": [ "c" ], "example": "UC-9-kyTW8ZkZNDHQJ6FgpwQ", "type": "string" },

		"custom": {

"label": "YouTube 自訂ID", "description": "YouTube 頻道ID是在網址 https://www.youtube.com/c/[自訂網址name] 之處", "example": "YouTubeCreators", "type": "string" }, "show": { "label": "YouTube show name", "description": "The show name which appears after https://www.youtube.com/show/ in the URL", "example": "startrek", "type": "string" }, "playlist": { "label": "YouTube 播放清單ID", "description": "YouTube 播放清單ID是在網址 https://www.youtube.com/playlist?list=[播放清單ID] 之處", "aliases": [ "p" ], "example": "PLrEnWoR732-DZV1Jc8bUpVTF_HTPbywpE", "type": "string" }, "title": { "label": "Title", "description": "The name of the page being linked to", "suggested": true, "aliases": [ "1", "2" ], "example": "Gangnam Style", "default": "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", "type": "string" }, "link": { "label": "Link on", "description": "Set this parameter to no to suppress the link to the YouTube article", "example": "no", "type": "string" } } } </templatedata>

相關