Template:Youtube: Difference between revisions

From Inkipedia, the Splatoon wiki
(Properly illustrating what to do and what not to do, also adding error message for when video ID and channel name are given but no video title is given)
m (& lets remain professional.)
Line 1: Line 1:
<includeonly>[https://youtu.be/{{{1|{{{videoID|7upgaUAcjbc you forgor the video ID 💀}}}}}} {{YT}} {{#if: {{{3|{{{channel|}}}}}}|<nowiki>[</nowiki>{{{3|{{{channel|}}}}}}<nowiki>]</nowiki> {{{2|{{{title|Unknown video title (pls fix)}}}}}}|{{{2|{{{title|UNKNOWN VIDEO TITLE + CHANNEL, PLS FIX >:(}}}}}}}}]</includeonly><noinclude>
<includeonly>[https://youtu.be/{{{1|{{{videoID|Video ID needed}}}}}} {{YT}} {{#if: {{{3|{{{channel|}}}}}}|<nowiki>[</nowiki>{{{3|{{{channel|}}}}}}<nowiki>]</nowiki> {{{2|{{{title|Unknown video title}}}}}}|{{{2|{{{title|Unknown video title + Channel}}}}}}}}]</includeonly><noinclude>


This is a template for youtube links and such (might save some time and energy when formatting them to link on the wiki and such)
This is a template for youtube links and such (might save some time and energy when formatting them to link on the wiki and such)
Line 50: Line 50:
|}
|}


[[Category:Templates]]
[[Category:Favicon templates]]
</noinclude>
</noinclude>

Revision as of 19:43, 2 May 2023


This is a template for youtube links and such (might save some time and energy when formatting them to link on the wiki and such)

Syntax

1 videoID The ID of the video (thing after the 'watch?v=' in the URL). REQUIRED (fallback + error message exists if left undefined).
2 title The video title. REQUIRED (error message if left undefined)
3 channel Name of the channel that posted the video. OPTIONAL

Examples

Proper usage of this template

Input Output
{{Youtube|mGghG4hY48A|EXCLUSIVE: New Mudmouth Boss in Salmon Run - Splatoon 3 Gameplay|GameExplain}} YouTube [GameExplain] EXCLUSIVE: New Mudmouth Boss in Salmon Run - Splatoon 3 Gameplay
{{Youtube|videoID=mGghG4hY48A|title=EXCLUSIVE: New Mudmouth Boss in Salmon Run - Splatoon 3 Gameplay|channel=GameExplain}} YouTube [GameExplain] EXCLUSIVE: New Mudmouth Boss in Salmon Run - Splatoon 3 Gameplay
{{Youtube|mGghG4hY48A|EXCLUSIVE: New Mudmouth Boss in Salmon Run - Splatoon 3 Gameplay}} YouTube EXCLUSIVE: New Mudmouth Boss in Salmon Run - Splatoon 3 Gameplay

What not to do (and what the error messages look like)

Input Output
{{Youtube}} (note: please do not use this template without parameters) ID needed YouTube Unknown video title + Channel
{{Youtube|title=ayy lmao|channel=eecks dee}} (note: please do not use the template like this either) ID needed YouTube [eecks dee] ayy lmao
{{Youtube|mGghG4hY48A}} (note: please also enter the video title and/or channel, this will show error message). YouTube Unknown video title + Channel
{{Youtube|mGghG4hY48A|channel=GameExplain}} (note: try to avoid stating only the channel name) YouTube [GameExplain] Unknown video title