Extension talk:YouTube/Archive

Add topic
From mediawiki.org

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?

info[edit]

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

{| width="100%" align="center"
|<div class="thumb tright"><div style="width:252px;">
{| width=250 border=0 cellpadding=3 cellspacing=0
|-
| <youtube width="250" height="200">clJkG9selQY</youtube>
|- align=left
| <small>[[Doomsday Is Tomorrow]] Fan Trailer Premiere!</small>
|}</div> {{clear}} . 
</div>

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

try <youtube align="left" width="250" height="200">clJkG9selQY</youtube> — Preceding unsigned comment added by 75.17.118.22 (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 200.130.18.187 (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 }}

<table>
{{#forargs: | K | V |

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

<td>
<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>
</td>

{{#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> }}

</table>

and the simplest usage is as follows:

{{YoutubeVideos
|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 195.234.75.155 (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)Reply
thank you, it works perfect! :) 195.234.75.155 16:20, 12 May 2014 (UTC)Reply
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:
<noinclude>
<templatedata>
{
	"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"
}
</templatedata>
</noinclude>

{{#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)Reply
Oh... My bad, I used it wrong. But
{{#tag:youtube|
{{#var:YouTube video ID}}
}}

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

Problem[edit]

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)Reply

Doesn't work[edit]

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

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? 68.185.215.47 03:29, 26 May 2017 (UTC)Reply