Template:Youtube: Difference between revisions
Appearance
No edit summary |
No edit summary |
||
| (20 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
[[File:Youtube logo.png|15px]] [{{{link}}} <q>{{{title}}}</q>]{{#if:{{{by|}}}| by {{{ | [[File:Youtube logo.png|15px]] {{#if:{{{hr|}}}{{{min|}}}{{{sec|}}}|[{{{link}}}&t={{#expr: ({{{hr|0}}} * 60 * 60) + ({{{min|0}}} * 60) + {{{sec|0}}} }} |[{{{link}}} }} <q>{{{title}}}</q>]{{#if:{{{hr|}}}{{{min|}}}{{{sec|}}}| @{{#if:{{{hr|}}}|{{{hr}}}:{{#ifexpr: {{{min|0}}} < 10 |0|}}}}{{{min|0}}}:{{#ifexpr: {{{sec|0}}} < 10 |0|}}{{{sec|0}}}}}{{#if:{{{by|}}}| by {{{by}}}}}{{#if:{{{date|}}}| ({{{date}}})}}<noinclude> | ||
<nowiki>{{yt|link= <!--link--> |title= <!--title--> |by= <!-- | ==Template information== | ||
For links to YouTube videos. | |||
===Shortcuts=== | |||
<nowiki>{{yt}}</nowiki> | |||
===Parameters=== | |||
<nowiki>{{youtube | |||
|link= <!--link--> | |||
|title= <!--title--> | |||
|by= <!-- YouTube channel (optional)--> | |||
|date= <!--date uploaded (optional)--> | |||
<!-- timestamp (optional; input numbers only) --> | |||
|hr= | |||
|min= | |||
|sec= | |||
}}</nowiki> | |||
====All parameters==== | |||
<nowiki>{{yt|link= |title= |by= |date= |hour= |min= |sec= }}</nowiki> | |||
====Minimum parameters==== | |||
<nowiki>{{yt|link= |title= }}</nowiki> | |||
====Creator only==== | |||
<nowiki>{{yt|link= |title= |by= }}</nowiki> | |||
====Date only==== | |||
<nowiki>{{yt|link= |title= |date= }}</nowiki> | |||
===Timestamp=== | |||
You can set the link to a particular timestamp using the <code>|hr=</code>, <code>|min=</code>, and <code>|sec=</code> parameters. You don't need to use all of these, only the ones that are necessary. For example: | |||
To set a video to '''1:30''': | |||
<nowiki>{{yt| ... |min=1 |sec=30}}</nowiki> | |||
To set a video to '''5:00''': | |||
<nowiki>{{yt| ... |min=5}}</nowiki> | |||
To set a video to '''3:00:00''': | |||
<nowiki>{{yt| ... |hr=3}}</nowiki> | |||
To set a video to '''1:23:45''': | |||
<nowiki>{{yt| ... |hr=1 |min=23 |sec=45}}</nowiki> | |||
</noinclude> | |||
Latest revision as of 07:04, 14 October 2026
Template information
For links to YouTube videos.
Shortcuts
{{yt}}
Parameters
{{youtube
|link= <!--link-->
|title= <!--title-->
|by= <!-- YouTube channel (optional)-->
|date= <!--date uploaded (optional)-->
<!-- timestamp (optional; input numbers only) -->
|hr=
|min=
|sec=
}}
All parameters
{{yt|link= |title= |by= |date= |hour= |min= |sec= }}
Minimum parameters
{{yt|link= |title= }}
Creator only
{{yt|link= |title= |by= }}
Date only
{{yt|link= |title= |date= }}
Timestamp
You can set the link to a particular timestamp using the |hr=, |min=, and |sec= parameters. You don't need to use all of these, only the ones that are necessary. For example:
To set a video to 1:30:
{{yt| ... |min=1 |sec=30}}
To set a video to 5:00:
{{yt| ... |min=5}}
To set a video to 3:00:00:
{{yt| ... |hr=3}}
To set a video to 1:23:45:
{{yt| ... |hr=1 |min=23 |sec=45}}