Template talk:YouTube#Broken links need to be flagged

{{Permanently protected}}

{{Talk header}}

{{WikiProject banner shell|

{{WikiProject YouTube}}

}}

{{tfdend|date=2006 June 16|result=withdrawn by nominator (Keep)}}

{{tfdend|date=2009 March 30|result=Keep}}

{{User:MiszaBot/config

| algo=old(300d)

| archive=Template talk:YouTube/Archive %(counter)d

| counter=2

| maxarchivesize=100K

| archiveheader={{Automatic archive navigator}}

| minthreadsleft=5

| minthreadstoarchive=2

}}

How to use url

i want to put url for a music video but that url start with https://youtu.be/, and this template also not supporting that url.is there any alternatives.
--KEmel49 (talk) 19:08, 12 May 2024 (UTC)

:youtu.be links are blacklisted on Wikipedia due to spam. You'll need to convert them to youtube.com links. (If you don't know how to do that, just replace {{code|https://youtu.be/}} with {{code|https://youtube.com/watch?v{{=}}}}.) InfiniteNexus (talk) 19:08, 13 May 2024 (UTC)

::@InfiniteNexus,

::still not working.By the way can you do ii.Here is the link=https://youtu.be/yXY-NxGYxlg?si=jfO6GSW3aK_HZVLx.

::Here is the article-Achen Amar Muktar.

::
--KEmel49 (talk) 04:55, 14 May 2024 (UTC)

:::Sorry, I overlooked what talk page I was on. If you're using this template, you just need the video ID, i.e. the part after the URL (yXY-NxGYxlg). But {{done}}. InfiniteNexus (talk) 23:52, 14 May 2024 (UTC)

Brace/bracket mangling

This template starts with a {{code|[}} but then has multiple closing {{code|]}} in different branches.

This makes it really hard to follow what's going on, as text editors can't simply jump between matching brackets.

It seems like this would be easier to read - and to manage future additions - if it were split up like:

{{youtube-selector | {{replace | {{delink | <nowiki />

{{{title|{{#if:{{{id|}}} | {{{1|}}} | {{{2|}}} }} }}} }}

| ] | &#93; }}

| {{{suffix|{{{s|}}}}}}

| {{{link|full}}}

| {{{time|{{{t|}}}}}}

| c={{{channel|{{{c|}}}}}}

| h={{{handle|{{{h|}}}}}}

| u={{{user|{{{u|}}}}}}

| x={{{custom|}}}

| s={{{show|{{{s|}}}}}}

| p={{{playlist|{{{p|}}}}}}

| i={{{id|{{Trim|{{{1|}}}}}}}}

}}

{{#ifexpr:{{#expr:

{{#if:{{{channel|}}} |1|0}}+

{{#if:{{{c|}}} |1|0}}+

{{#if:{{{custom|}}} |1|0}}+

{{#if:{{{handle|}}} |1|0}}+

{{#if:{{{h|}}} |1|0}}+

{{#if:{{{id|}}} |1|0}}+

{{#if:{{{playlist|}}} |1|0}}+

{{#if:{{{p|}}} |1|0}}+

{{#if:{{{show|}}} |1|0}}+

{{#if:{{{s|}}} |1|0}}+

{{#if:{{{user|}}} |1|0}}+

{{#if:{{{u|}}} |1|0}}+

{{#if:{{{2|}}} |1|0}}+

{{#if:{{{title|}}}

| {{#if:{{{1|{{{2|}}}}}} |1|0}}

|0}}

}} > 1

| {{Namespace detect

| talk= | wikipedia= | help= | template= | module=

| other=Category:Articles using YouTube with invalid parameters

}}

}}

{{#invoke:Check for unknown parameters

| check

| unknown={{main other|_VALUE_{{PAGENAME}}}}

| preview=Page using Template:YouTube with unknown parameter "_VALUE_"

| ignoreblank=y

| 1 | 2 | c | channel | custom | h | handle | id | link | p | playlist

| s | show | suffix | t | time | title | u | user }}

<noinclude>{{documentation}}</noinclude>

In {{code|youtube-selector}} have:

{{#if:{{{c|}}} | {{youtube-channel | {{{c}}} | {{{1|}}} | {{{2}}} | {{{3}}} | {{{4}}} }} |

{{#if:{{{h|}}} | {{youtube-handle | {{{h}}} | {{{1|}}} | {{{2}}} | {{{3}}} | {{{4}}} }} |

{{#if:{{{u|}}} | {{youtube-user | {{{u}}} | {{{1|}}} | {{{2}}} | {{{3}}} | {{{4}}} }} |

{{#if:{{{x|}}} | {{youtube-custom | {{{x}}} | {{{1|}}} | {{{2}}} | {{{3}}} | {{{4}}} }} |

{{#if:{{{s|}}} | {{youtube-show | {{{s}}} | {{{1|}}} | {{{2}}} | {{{3}}} | {{{4}}} }} |

{{#if:{{{p|}}} | {{youtube-playlist | {{{p}}} | {{{1|}}} | {{{2}}} | {{{3}}} | {{{4}}} }} |

{{#if:{{{i|}}} | {{youtube-watch | {{{i}}} | {{{1|}}} | {{{2}}} | {{{3}}} | {{{4}}} }} |

{{error|Error:No page id specified}}

{{Namespace detect

| talk= | wikipedia= | help= | template= | module=

| other=Category:Articles using YouTube with invalid parameters

}}

}} }} }} }} }} }} }}

In {{code|youtube-channel}} have:

[https://www.youtube.com/channel/{{{1}}}

{{#if:{{{2|}}} | <span class="plainlinks">{{{2}}}</span>

| {{PAGENAMEBASE}}

}}

{{{3|'s}}}

channel]

{{youtube-cite|channel|{{{4}}}}}

In {{code|youtube-watch}} have:

[https://www.youtube.com/watch?v={{{1}}}{{#if:{{{5}}}|&t={{{5}}}}}

{{#if:{{{2|}}} | <span class="plainlinks">{{{2}}}

| Video

}}

]

{{youtube-cite|video|{{{4}}}}}

... and similarly for {{code|youtube-handle}}, {{code|youtube-user}}, {{code|youtube-custom}}, {{code|youtube-show}}, and {{code|youtube-playlist}}.

In {{code|youtube-cite}} have:

{{#switch:{{{2}}} | hide |

| no | on YouTube

| full | on YouTube

}}

Martin Kealey (talk) 03:17, 17 July 2024 (UTC)

:(yes I know some white-space will need to be removed from my proposed templates) Martin Kealey (talk) 03:25, 17 July 2024 (UTC)

::The sandbox is available for testing. – Jonesey95 (talk) 13:12, 17 July 2024 (UTC)

Entirely hide the "on Youtube" citation

Backhouse Lecture mostly comprises a table that has a column for links to resources in different media; currently it does not use this template as the words "on Youtube" would constitute excessive clutter.

I would like to request a way to suppress this wording by way of an additional parameter, perhaps {{code| link=hide}}. (This is included in my proposed template set elsewhere in this talk page.) Martin Kealey (talk) 03:29, 17 July 2024 (UTC)

:This isn't a citation template. {{tl|Cite AV media}} should be used for that. Gonnym (talk) 13:56, 17 July 2024 (UTC)

Template-protected edit request on 1 November 2024

{{edit template-protected|Template:YouTube|answered=yes}}

YouTube has a new 2024 logo. 64.114 etc 05:13, 1 November 2024 (UTC)

:There's nothing to be changed in this template as it doesn't use any logo. -- Michael Bednarek (talk) 05:47, 1 November 2024 (UTC)