Extension talk:YouTube

From MediaWiki.org
Jump to navigation Jump to search

How to add Time Stamp?[edit]

It can be really usefull

How to add a new YT icon to the WYSIWYG Editor Extension?[edit]

Hello! How to add a new YT icon to the WYSIWYG Editor Extension (bundle6) ? Wakthrough'ed please! :)

Please Add video from VK.COM[edit]

Hello! How to add VK.COM video for this Extension?


How can I get information about <youtube width="250" height="200">clJkG9selQY</youtube> tag used in http://bionic.wikia.com/index.php?title=Main_Page&action=edit , that shows

<youtube width="250" height="200">clJkG9selQY</youtube>
Doomsday Is Tomorrow Fan Trailer Premiere!

-- 10:33, 2 April 2007 (UTC)

try <youtube align="left" width="250" height="200">clJkG9selQY</youtube> — Preceding unsigned comment added by (talkcontribs)

Blank Page - MW 1.22[edit]

Doesn't working. Something else to do? Server accessing youtube direct (no proxy). — Preceding unsigned comment added by (talkcontribs)

Does this extension support dynamic variables?[edit]

I was trying to implement a custom video gallery using templates. However, I can't implement it the way I want, because I'm getting "bad video ID" if <youtube> is used with dynamic variables.

{{#vardefine:max_columns | 2 }}
{{#vardefine:column | 0 }}

{{#forargs: | K | V |

{{#ifeq: {{#expr: {{#var:column}} mod {{#var:max_columns}} }} | 0 | <tr> }}

<div style="background-color: silver; font-style: italic; font-weight: bolder; text-align: center;">{{#var: V}}</div>
<div style="text-align: center;"><youtube>{{#var: K}}</youtube></div>

{{#ifeq: {{#expr: {{#var:column}} mod {{#var:max_columns}} }} | {{#expr: {{#var:max_columns}} - 1}} | </tr> }}

{{#vardefine:column | {{#expr: {{#var:column}} + 1 }} }}


{{#ifeq: {{#expr: {{#var:column}} mod {{#var:max_columns}} }} | {{#expr: {{#var:max_columns}} - 1}} | </tr> }}


and the simplest usage is as follows:

|4s6ZBPtGiHo=Invaders Must Die (Live)

And I'm getting "bad video ID" within this code: <youtube>{{#var: K}}</youtube>. Could anyone please explain if I'm wrong or what I'm doing wrong? Thanks in advance. — Preceding unsigned comment added by (talkcontribs)

Templates are always a bit tricky. Try using {{#tag:youtube|{{#var: K}}}} or somesuch (see Manual:Tag extensions#How do I render wikitext in my extension? for more details). --Jack Phoenix (Contact) 15:15, 12 May 2014 (UTC)
thank you, it works perfect! :) 16:20, 12 May 2014 (UTC)
Am I need some additional Extension/Configuration to use this "Magic Words" (new in MediaWiki, I can use this term incorrectly, sorry)? I want to write simple Template for quick video inserting, write this code for template:

{{#youtube|{{#var: 1}}}}

to use first Template argument, or:
	"params": {
		"YouTube video ID": {
			"description": "ID видео на Youtube, можно извлечь из адреса",
			"example": "Для страницы \"https://www.youtube.com/watch?v=3UoBgUdy5r8&t=1s\" ID будет \"3UoBgUdy5r8\"",
			"type": "string",
			"required": true
	"description": "Встраивает на страничку YouTube видео",
	"format": "inline"

{{#youtube|{{#var: YouTube video ID}}}}

to use exact argument.
But result renders just like nowiki {{#youtube|{{#var: YouTube video ID}}}}
--Virgil7 (talk) 23:06, 24 December 2018 (UTC)
Oh... My bad, I used it wrong. But
{{#var:YouTube video ID}}

gets the same results --Virgil7 (talk) 12:54, 25 December 2018 (UTC)
Last one is working with {{Youtube|3UoBgUdy5r8}} usage. --Virgil7 (talk) 13:06, 25 December 2018 (UTC)


I'm using YouTube 1.9.0 and if I use this with wikiEditor extension mediawiki 1.25.0 is not working. After I changed LocalSetting.php wfLoadExtension('YouTube'); to require_once "$IP/extensions/YouTube/YouTube.php"; it worked.

YouTube 1.9 Errors[edit]

YouTube 1.9 behaves unexpected on MW1.26/PHP5.4 wfLoadExtension('YouTube'); gives an error:

Fatal error: Uncaught exception 'Exception' with message '.../extensions/YouTube/extension.json does not exist!' 
in .../includes/registration/ExtensionRegistry.php on line 106 Exception: .../extensions/YouTube/extension.json does not exist! 
in .../includes/registration/ExtensionRegistry.php on line 106

require_once "$IP/extensions/YouTube/YouTube.php"; works ok - Bemoeial (talk) 09:26, 10 May 2016 (UTC)

Doesn't work[edit]

<youtube>VyBSS48E4xI</youtube> I tried to put code but was messed up. can somebody help me?-- 16:11, 25 May 2016 (UTC)

How to do lazyload for embedded YouTube videos?[edit]

How does one make it so these videos load after the rest of the page loads? 03:29, 26 May 2017 (UTC)