Jump to content
Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:YouTube link: Difference between revisions

Template page
Build reusable tournament data and rendering system
 
m Replace reader-visible prose double hyphens with a proper em dash entity
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><templatestyles src="Template:YouTube link/styles.css" />{{#if:{{{id|{{{1|}}}}}}|<span class="loka-youtube-link">{{{label|{{PAGENAME}}}}} on [[File:YouTube icon.png|14px|link=https://www.youtube.com/watch?v={{{id|{{{1|}}}}}}|alt=YouTube]]&#32;[https://www.youtube.com/watch?v={{{id|{{{1|}}}}}} YouTube]</span>{{#ifeq:{{lc:{{{explicit|}}}}}|yes|<span class="loka-youtube-link-warning">Please note this video may contain strong language</span>}}}}</includeonly><noinclude>
<includeonly><templatestyles src="Template:YouTube link/styles.css" />{{#if:{{{id|{{{1|}}}}}}|<span class="loka-youtube-link">[https://www.youtube.com/watch?v={{{id|{{{1|}}}}}} &quot;{{{label|{{PAGENAME}}}}}&quot;]&#32;{{#if:{{{official|}}}|from <span class="loka-icon-loka">[[File:Loka icon.png|14px|link=|alt=Loka]]</span>&#32;Loka's [[File:YouTube icon.png|14px|link=|alt=YouTube]]&#32;YouTube|on [[File:YouTube icon.png|14px|link=|alt=YouTube]]&#32;YouTube{{#if:{{{credit|}}}|<span class="loka-youtube-link-credit">&#32;(credit: {{{credit|}}})</span>}}}}</span>{{#ifeq:{{lc:{{{explicit|}}}}}|yes|<span class="loka-youtube-link-warning">Please note this video may contain strong language</span>}}}}</includeonly><noinclude>
== Usage ==
== Usage ==


<pre>{{YouTube link|id=VIDEO_ID|label=Video title}}</pre>
<pre>{{YouTube link|id=VIDEO_ID|label=Video title|credit=Recorder name}}</pre>


The first unnamed parameter can be used instead of <code>id</code>. The label defaults to the page name
The first unnamed parameter can be used instead of <code>id</code>. The linked label defaults to the page name and is always shown in quotes


Set <code>explicit=yes</code> to show the strong-language notice
Set <code>explicit=yes</code> to show the strong-language notice. <code>credit</code> is optional and, when given, shows who recorded/uploaded the video
 
Set <code>official=yes</code> for a video uploaded by the official Loka Minecraft channel &mdash; this shows "from [[File:Loka icon.png|14px|link=|alt=Loka]] Loka's [[File:YouTube icon.png|14px|link=|alt=YouTube]] YouTube" instead of a per-video credit, since the whole channel is already the attribution


[[Category:External link templates]]
[[Category:External link templates]]
</noinclude>
</noinclude>

Latest revision as of 14:21, 23 August 2026

Usage

{{YouTube link|id=VIDEO_ID|label=Video title|credit=Recorder name}}

The first unnamed parameter can be used instead of id. The linked label defaults to the page name and is always shown in quotes

Set explicit=yes to show the strong-language notice. credit is optional and, when given, shows who recorded/uploaded the video

Set official=yes for a video uploaded by the official Loka Minecraft channel — this shows "from Loka Loka's YouTube YouTube" instead of a per-video credit, since the whole channel is already the attribution

Contents