Template talk:YouTube
Template:YouTube is permanently protected from editing because it is a heavily used or highly visible template. Substantial changes should first be proposed and discussed here on this page. If the proposal is uncontroversial or has been discussed and is supported by consensus, editors may use {{edit template-protected}} to notify an administrator or template editor to make the requested edit. Usually, any contributor may edit the template's documentation to add usage notes or categories.
Any contributor may edit the template's sandbox. Functionality of the template can be checked using test cases. |
This is the talk page for discussing improvements to the YouTube template. |
|
Archives: 1, 2Auto-archiving period: 300 days |
This template does not require a rating on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | |||||||||||||||
|
This template was considered for deletion on 2006 June 16. The result of the discussion was "withdrawn by nominator (Keep)". |
This template was considered for deletion on 2009 March 30. The result of the discussion was "Keep". |
Broken links being generated?
[edit]YouTube appears to be now 404ing /user/CHANNEL_NAME links, which should now just be /CHANNEL_NAME on the YouTube domain. See for example these template invocations that are broken but bare links work fine:
lizthegrey (talk) 17:33, 30 September 2023 (UTC)
- Those links will work via the template's custom URL feature:
{{YouTube|custom=AmiYamato|AmiYamato}} and {{YouTube|custom=@AmiYamato|@AmiYamato}}
:
Archive link
[edit]It may be beneficial to allow the use of archived links for videos that have been deleted. InfiniteNexus (talk) 06:52, 15 January 2024 (UTC)
How to use url
[edit]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
https://youtu.be/
withhttps://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)
- 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 (
Brace/bracket mangling
[edit]This template starts with a [
but then has multiple closing ]
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|}}} }} }}} }} | ] | ] }} | {{{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]]<!-- duplicate parameter --> }} }} {{#invoke:Check for unknown parameters | check | unknown={{main other|[[Category:Pages using YouTube with unknown parameters|_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 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]] <!-- missing parameter --> }} }} }} }} }} }} }} }}
In 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 youtube-watch
have:
[https://www.youtube.com/watch?v={{{1}}}{{#if:{{{5}}}|&t={{{5}}}}} {{#if:{{{2|}}} | <span class="plainlinks">{{{2}}}</span> | Video }} ] {{youtube-cite|video|{{{4}}}}}
... and similarly for youtube-handle
, youtube-user
, youtube-custom
, youtube-show
, and youtube-playlist
.
In youtube-cite
have:
{{#switch:{{{2}}} | hide | | no | on YouTube | full | on [[YouTube {{{1}}} (identifier)|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
[edit]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 {{{1}}}
. (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. {{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]This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
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)