Jump to content

Template:Youtube: Difference between revisions

From Flerf Wiki
Washcarso (talk | contribs)
No edit summary
Washcarso (talk | contribs)
No edit summary
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[File:Youtube logo.png|15px]]&nbsp;{{#if:{{{hr|}}}{{{min|}}}{{{sec|}}}|[{{{link}}}&amp;t={{#expr: ({{{hr|0}}} * 60 * 60) + ({{{min|0}}} * 60) + {{{sec|0}}} }} |[{{{link}}} }} <q>{{{title}}}</q>]{{#if:{{{hr|}}}{{{min|}}}{{{sec|}}}|&nbsp;@{{#if:{{{hr|}}}|{{{hr}}}:{{#ifexpr:{{{min}}} < 9|0}}}}{{{min|0}}}:{{{sec|00}}}}}{{#if:{{{by|}}}|&nbsp;by {{{by}}}}}{{#if:{{{date|}}}|&nbsp;({{{date}}})}}<noinclude>
[[File:Youtube logo.png|15px]]&nbsp;{{#if:{{{hr|}}}{{{min|}}}{{{sec|}}}|[{{{link}}}&amp;t={{#expr: ({{{hr|0}}} * 60 * 60) + ({{{min|0}}} * 60) + {{{sec|0}}} }} |[{{{link}}} }} <q>{{{title}}}</q>]{{#if:{{{hr|}}}{{{min|}}}{{{sec|}}}|&nbsp;@{{#if:{{{hr|}}}|{{{hr}}}:{{#ifexpr: {{{min|0}}} < 10 |0|}}}}{{{min|0}}}:{{#ifexpr: {{{sec|0}}} < 10 |0|}}{{{sec|0}}}}}{{#if:{{{by|}}}|&nbsp;by {{{by}}}}}{{#if:{{{date|}}}|&nbsp;({{{date}}})}}<noinclude>


==Template information==
==Template information==
For links to YouTube videos.
For links to YouTube videos.


  <nowiki>{{yt
===Shortcuts===
  <nowiki>{{yt}}</nowiki>
 
===Parameters===
<nowiki>{{youtube
|link= <!--link-->  
|link= <!--link-->  
|title= <!--title-->  
|title= <!--title-->  
Line 15: Line 19:
}}</nowiki>
}}</nowiki>


===All parameters===
====All parameters====
  <nowiki>{{yt|link= |title= |by= |date= |hour= |min= |sec= }}</nowiki>
  <nowiki>{{yt|link= |title= |by= |date= |hour= |min= |sec= }}</nowiki>


===Minimum parameters===
====Minimum parameters====
  <nowiki>{{yt|link= |title= }}</nowiki>
  <nowiki>{{yt|link= |title= }}</nowiki>


===Creator only===  
====Creator only====  
  <nowiki>{{yt|link= |title= |by= }}</nowiki>
  <nowiki>{{yt|link= |title= |by= }}</nowiki>


===Date only===
====Date only====
  <nowiki>{{yt|link= |title= |date= }}</nowiki></noinclude>
  <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

 [{{{link}}} {{{title}}}]

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}}