This page is a translated version of the page Extension:YouTube and the translation is 52% complete.
Other languages:
English • ‎Esperanto • ‎ייִדיש • ‎中文 • ‎日本語 • ‎한국어
OOjs UI icon advanced.svg
发布状态: 稳定版
实现 标签 , 媒体
描述 允许嵌入YouTube和Google视频电影,Archive.org音频和视频,WeGame和Gametrailers视频,Tangler论坛和GoGreenTube视频。
作者 Przemek Piotrowski
最新版本 1.9.3 (2018-10-13)
MediaWiki 1.34+
许可协议 GNU通用公眾授權條款2.0 or later
例子 Any ShoutWiki site
Vagrant角色 youtube


最初由Wikia 制作,但Wikia现在不再使用此视频扩展。


  • 下载文件,并将其放置在您extensions/文件夹中的YouTube目录内。
  • 将下列代码放置在您的LocalSettings.php的底部:
    wfLoadExtension( 'YouTube' );
  •   完成 – 在您的wiki上导航至Special:Version,以验证扩展已成功安装。




其中foo是来自网址的视频ID。 即如果视频的URL是,那么嵌入代码将是: <youtube>VyBSS48E4xI</youtube>


See ShoutWiki's help page on using the YouTube extension for more information, such as using alternate, non-YouTube providers to embed content.


Google视频 <gvideo>
Archive.org视频 <aovideo>
WeGame <wegame>
Tangler论坛 <tangler>
Gametrailers <gtrailer>
Nicovideo <nicovideo>
GoGreenTube <ggtube>



<youtube width="200" height="120">CCz1kmfqL7g</youtube>


  • 宽度由width = "xxx"控制,其中xxx是像素数。 默认值为640像素。
  • 高度以相同的方式控制,height = "xxx"。 默认值为385像素。

请参阅Wikia关于此扩展的旧帮助页面。 它解释了更多细节。 Here is a link to the last version of it before it was blanked and redirected to the new video embed tool page on Wikia.


See the Wikia help page on April 11, 2018 before it was redirected to the new video embed tool on Wikia.

That Wikia help page is not on, so it is copied below in case Wikia deletes the old page altogether. Wikia licenses their material under CC BY-SA. See Wikia licensing page.

旧Wikia帮助页面 -

This page documents how to use the YouTube video extension, an older video extension. Videos added using the YouTube tag are automatically converted to file pages so as to help reduce page load time and improve video data tracking. A few exceptions exist and are listed below.


Using the YouTube extension

To add a video using the YouTube extension, you need the ID code for the video. The string of letters and numbers after "v=" in the URL is the ID code. So for the URL: the ID code would be CCz1kmfqL7g.

YouTube videos are embedded using two tags, with the ID code for the video you want to show between them:

<youtube>ID code</youtube>

"ID code" is the code from the YouTube URL. So in this example, you would use:


You can change the width and height of the video box

  • Width is controlled with width="xxx", where xxx is the number of pixels. The default is 640 pixels.
  • Height is controlled in the same way with height="xxx". 默认值为385像素。

So the example from above could be:

<youtube width="200" height="120">CCz1kmfqL7g</youtube>


Once the page with the YouTube tag is saved the tag will be converted to a file page, pulling the name from the YouTube video name. Only the width is converted, except if the height is designed for use in an audio player. Attribution on the file page is attributed to the user who added the YouTube tag.

This happens in all circumstances except when the video play bar is smaller than 30 pixels in height. This will render a usable audio player on mobile devices and some desktop browsers (excluding Google Chrome).