「テンプレート:YouTube channel」の版間の差分

Softyu (トーク | 投稿記録)
Softyu がページ「テンプレート:YouTube channe」を「テンプレート:YouTube channel」に移動しました: 误字
Motodai (トーク | 投稿記録)
テンプレート:YouTube channel」を保護しました ([移動=管理者のみ許可] (無期限))
 
(4人の利用者による、間の10版が非表示)
1行目: 1行目:
<includeonly>{{#invoke:YouTube channe|main}}</includeonly><noinclude>
<includeonly>{{#invoke:YouTube channel|main}}</includeonly><noinclude>
YouTubeのユーザーページ(公式チャンネル)にリンクするテンプレートです、基本的に外部リンク節で使用します。
YouTubeのユーザーページ(公式チャンネル)にリンクするテンプレートです、基本的に外部リンク節で使用します。
* [[Property:YouTubeチャンネル]]
* [[Property:YouTubeチャンネル]]
* [[Property:YouTubeユーザー]]
* [[Property:YouTubeユーザー]]
* [[モジュール:YouTube channe]]
* [[モジュール:YouTube channel]]
== 使い方 ==
== 使い方 ==
2022年10月からは、すべてのYouTubeチャンネルに「ハンドル」(@XXXX 形式)が導入されました([https://www.watch.impress.co.jp/docs/news/1446858.html 参考])。ハンドルを含めたい場合、ハンドル(handle)を指定してください。また、チャンネル名は(name)を指定してください。
* <code>https://www.youtube.com/@stu4858</code> →  <code>stu4858 </code>(先頭部分の"@"は不要)
<pre>
{{YouTube channel
| name = STU48
| handle = stu4858
}}
{{YouTube channel|name=STU48|handle=stu4858}}
</pre>


YouTubeの「channel ID」を与えて使用します。
以前のYouTubeの「channel ID」を使う場合は、"id"を使ってください。与えて使用します。
[https://support.google.com/youtube/answer/6180214?hl=ja チャンネル URL について - YouTube ヘルプ]
[https://support.google.com/youtube/answer/6180214?hl=ja チャンネル URL について - YouTube ヘルプ]


12行目: 24行目:


<pre>
<pre>
{{YouTube channe
{{YouTube channel
| id = UCR0V48DJyWbwEAdxLL5FjxA
| id = UCR0V48DJyWbwEAdxLL5FjxA
| name = 日向坂46 OFFICIAL YouTube CHANNEL
| name = 日向坂46 OFFICIAL YouTube CHANNEL
}}
}}


{{YouTube channe|UCR0V48DJyWbwEAdxLL5FjxA|日向坂46 OFFICIAL YouTube CHANNEL}}
{{YouTube channel|UCR0V48DJyWbwEAdxLL5FjxA|日向坂46 OFFICIAL YouTube CHANNEL}}


{{YouTube channe|UCR0V48DJyWbwEAdxLL5FjxA}}
{{YouTube channel|UCR0V48DJyWbwEAdxLL5FjxA}}
</pre>
</pre>


AKB48公式など以前のユーザー名を使用したURLの場合```user```を使用してください
AKB48公式など以前のユーザー名を使用したURLの場合 '''user'''を使用してください
* <code>https://www.youtube.com/user/AKB48 </code> →  <code>AKB48 </code>
* <code>https://www.youtube.com/user/AKB48 </code> →  <code>AKB48 </code>
<pre>
<pre>
{{YouTube channe
{{YouTube channel
| user = AKB48
| user = AKB48
| name = AKB48  
| name = AKB48  
}}
}}


{{YouTube channe|user=AKB48|name=AKB48 }}
{{YouTube channel|user=AKB48|name=AKB48 }}


{{YouTube channe|user=AKB48}}
{{YouTube channel|user=AKB48}}
</pre>
</pre>
== (参考)Channel ID 取得方法 ==
[[File:YouTubeチャンネルID取得方法.png|thumb|150px|「概要」から「チャンネルIDをコピー」選択する(AKB48公式YouTubeチャンネルから)]]
YouTube のハンドル導入に伴う仕様変更により、URLにChannelIDが表示されなくなりました。そのため、以下の方法で取得する必要があります。
1. 調べたいYouTubeチャンネルの「概要」タブに移動。
2. 統計情報の箇所にある、『共有」の矢印をクリック、出現したポップアップメニューから「チャンネルIDをコピー」を選択する。これでクリップボードにチャンネルIDがコピーされます(そのままペーストすれば、チャンネルIDが書き込まれます)。
== 引数 ==
== 引数 ==
{| class="wikitable"
{| class="wikitable"
39行目: 62行目:
|-
|-
! id
! id
| テキスト (id)|| (なし) ||  YouTube channe ID。 
| テキスト (id)|| (なし) ||  YouTube channel ID (省略可能だが、その場合、handleを指定すること)。 
|-
|-
! user
! user
| テキスト (user)|| (なし) ||  YouTube User ID。youtube.com/user/AKB48 などはこちら
| テキスト (user)|| (なし) ||  YouTube User ID。youtube.com/user/AKB48 などはこちら (省略可能だが、その場合は、handleかidを指定すること)
|-
|-
! name
! name
| テキスト (name)|| YouTube channe名 || 記事本文に表示するリンクの文字列 (省略可能)
| テキスト (name)|| YouTube channel名 || 記事本文に表示するリンクの文字列 (省略可能)
|-
! handle
| テキスト (handle )|| YouTube handle 名 || 2022.10より導入された新しいID [https://support.google.com/youtube/thread/183284252] (省略可能だが、その場合はidを指定すること)
|}
|}


55行目: 81行目:
|  
|  
<pre>
<pre>
{{YouTube channe
{{YouTube channel
| id = UCR0V48DJyWbwEAdxLL5FjxA
| name = 日向坂46 OFFICIAL YouTube CHANNEL
| name = 日向坂46 OFFICIAL YouTube CHANNEL
| handle=46officialyoutubechannel99
}}
}}


{{YouTube channe|UCR0V48DJyWbwEAdxLL5FjxA|日向坂46 OFFICIAL YouTube CHANNEL}}
{{YouTube channel|name=日向坂46 OFFICIAL YouTube CHANNEL|handle=46officialyoutubechannel99}}
 
{{YouTube channe|UCR0V48DJyWbwEAdxLL5FjxA}}


{{YouTube channe|user=AKB48}}
{{YouTube channel|UCR0V48DJyWbwEAdxLL5FjxA}}
</pre>
</pre>


||  
||  
{{YouTube channe
{{YouTube channel
| id = UCR0V48DJyWbwEAdxLL5FjxA
| name = 日向坂46 OFFICIAL YouTube CHANNEL
| name = 日向坂46 OFFICIAL YouTube CHANNEL
| handle=46officialyoutubechannel99
}}
}}


{{YouTube channe|UCR0V48DJyWbwEAdxLL5FjxA|日向坂46 OFFICIAL YouTube CHANNEL}}
{{YouTube channel|name=日向坂46 OFFICIAL YouTube CHANNEL|handle=46officialyoutubechannel99}}


{{YouTube channe|UCR0V48DJyWbwEAdxLL5FjxA}}
{{YouTube channel|UCR0V48DJyWbwEAdxLL5FjxA}}
|}


{{YouTube channe|user=AKB48}}
|}
[[Category:Luaを利用するテンプレート]]
[[Category:Luaを利用するテンプレート]]
[[Category:ソーシャル・ネットワーキング・サービステンプレート]]
[[Category:ソーシャル・ネットワーキング・サービステンプレート]]
90行目: 113行目:
],
],
"label": "チャンネル名",
"label": "チャンネル名",
"description": "YouTube channe id。",
"description": "YouTube channel id。",
"example": "UCR0V48DJyWbwEAdxLL5FjxA",
"example": "UCR0V48DJyWbwEAdxLL5FjxA",
"required": true,
"type": "line"
"type": "line"
},
},
103行目: 125行目:
"type": "line",
"type": "line",
"default": "YouTube チャンネル",
"default": "YouTube チャンネル",
"deprecated": true,
"label": "名前"
"label": "名前"
},
"handle": {
"type": "string",
"description": "ハンドル。2022年10月から導入",
"example": "akb48"
},
},
"nosmw": {
"nosmw": {
"type": "boolean",
"type": "boolean",
"default": "false",
"default": "false"
"deprecated": true
},
},
"user": {
"user": {
119行目: 144行目:
}
}
},
},
"description": "YouTube channe へのリンクを生成するテンプレートです。",
"description": "YouTube channel へのリンクを生成するテンプレートです。",
"paramOrder": [
"paramOrder": [
"id",
"id",
"name",
"name",
"user",
"user",
"handle",
"nosmw"
"nosmw"
],
],