Difference between revisions of "Help:Inserting videos"

From War Thunder Wiki
Jump to: navigation, search
m (Insert video gallery)
 
(6 intermediate revisions by 3 users not shown)
Line 1: Line 1:
It is desirable to complement War Thunder Wiki articles with thematic videos to expand their themes.
+
It is desirable to complement War Thunder Wiki articles with thematic videos to expand their themes. At the same time, the wiki does not have the feature to directly upload videos like [[Help:Inserting_pictures|images]]. Therefore, the desired videos must be first uploaded to a video hosting site, such as YouTube.
 
 
Articles on the War Thunder Wiki is desirable to complement thematic videos expanding their theme. At the same time, the wiki does not have the feature to directly upload videos like [[Help:Inserting_pictures|images]]. Therefore, the desired videos must be first uploaded to a video hosting site, such as YouTube.
 
  
 
You can insert an external video into an article in the following ways:
 
You can insert an external video into an article in the following ways:
Line 7: Line 5:
 
== Visual editor ==
 
== Visual editor ==
 
=== Insert video gallery ===
 
=== Insert video gallery ===
[[File:InsertingVideos - Visual InsertTemplate.png|мини|справа]]
+
[[File:InsertingVideos - Visual InsertTemplate.png|thumb|right]]
  
 
To insert a video gallery through a visual editor, go to the "Template" section of the "Insert" menu.
 
To insert a video gallery through a visual editor, go to the "Template" section of the "Insert" menu.
Line 25: Line 23:
 
Then, in the "Field name" box in the "Add more information" section, you need to enter the number "2" and click on the appeared block with the same name. Now in the new input box that appears on the screen, you can add an explanatory note to the video. You can continue adding these text by inserting digits in order (3, 4, 5, etc.) to infinity, with each odd field will be considered a video ID, and each even field will be considered as the description for the preceding number/video. Nevertheless, an infinite number of videos in the article would look somewhat inappropriate, so it is advisable to limit their number to three or four. An example with three inserted videos and their descriptions:
 
Then, in the "Field name" box in the "Add more information" section, you need to enter the number "2" and click on the appeared block with the same name. Now in the new input box that appears on the screen, you can add an explanatory note to the video. You can continue adding these text by inserting digits in order (3, 4, 5, etc.) to infinity, with each odd field will be considered a video ID, and each even field will be considered as the description for the preceding number/video. Nevertheless, an infinite number of videos in the article would look somewhat inappropriate, so it is advisable to limit their number to three or four. An example with three inserted videos and their descriptions:
  
[File:InsertingVideos - Visual YTGalleryDetails.png]]
+
[[File:InsertingVideos - Visual YTGalleryDetails.png]]
  
 
After all the parameters are specified, click the "Insert" button
 
After all the parameters are specified, click the "Insert" button
Line 45: Line 43:
  
 
Glossary:
 
Glossary:
ID - Identifying numbers of the YouTube video. Example: <code><nowiki>https://www.youtube.com/watch?v=</nowiki>'''a8_8L-F44ts'''&t=54s</code>
+
* ID - Identifying numbers of the YouTube video. Example: <code><nowiki>https://www.youtube.com/watch?v=</nowiki>'''a8_8L-F44ts'''&t=54s</code>
Caption - Caption that will be displayed under video.
+
* Caption - Caption that will be displayed under video.
  
 
The number of videos in the gallery is not limited, but it is recommended to insert no more than three.  
 
The number of videos in the gallery is not limited, but it is recommended to insert no more than three.  
  
Usage example:
+
<u>'''Usage example''':</u>
  
Код:
+
Code:
  
<code><nowiki>{{Youtube-gallery|0-J5Vg0SxLc|Victory is ours!|-ndHK-sKUkw|Unforgotten: T-44 'Start up and move out!' in Kubinka|8MoVAKl9uFc|Update 1.47}}</nowiki></code>
+
<code><nowiki>{{Youtube-gallery|0-J5Vg0SxLc|Victory is ours!|-ndHK-sKUkw|Unforgotten: T-44<br>'Start up and move out!' in Kubinka|8MoVAKl9uFc|Update 1.47}}</nowiki></code>
  
 
Result:
 
Result:
{{Youtube-gallery|0-J5Vg0SxLc|Victory is ours!|-ndHK-sKUkw|Unforgotten: T-44 'Start up and move out!' in Kubinka|8MoVAKl9uFc|Update 1.47}}
+
{{Youtube-gallery|0-J5Vg0SxLc|Victory is ours!|-ndHK-sKUkw|Unforgotten: T-44<br>'Start up and move out!' in Kubinka|8MoVAKl9uFc|Update 1.47}}
  
 
Read more about the template: [[Template:Youtube-gallery|Youtube-gallery]].
 
Read more about the template: [[Template:Youtube-gallery|Youtube-gallery]].
Line 63: Line 61:
 
=== Insert single video ===
 
=== Insert single video ===
 
{{Youtube
 
{{Youtube
  |url = nX1b_OQ93Qs
+
  |url = mzFOHUsXu-E
  |caption = Т-34-85Э
+
  |caption = G.55 Silurante
 
  |align = right
 
  |align = right
 
  |size = 300
 
  |size = 300
 
}}
 
}}
  
Вставить одиночное видео через редактор вики-текста можно с помощью следующего кода (пример получаемого результата справа):
+
You can insert a single video through the wiki text editor using the following code (example of the result to the right):
  
 
<pre>{{Youtube
 
<pre>{{Youtube
  |url = nX1b_OQ93Qs
+
  |url = mzFOHUsXu-E
  |caption = Т-34-85Э
+
  |caption = G.55 Silurante
 
  |align = right
 
  |align = right
 
  |size = 300
 
  |size = 300
 
}}</pre>
 
}}</pre>
  
Параметры:
+
Glossary:
* url — ссылка или id видео (обязательный)
+
* url - link or video ID (required)
* caption — подпись
+
* caption - Caption under video
* align — выравнивание по центру, слева или справа (по умолчанию left)
+
* align - center, left, or right (left by default)
* size — размер видео в пикселях (по умолчанию 300)
+
* size - video size in pixels (default is 300)
  
Строки с необязательными параметрами можно удалить.
+
Lines with optional parameters can be deleted.
  
Подробнее про шаблон: [[Шаблон:Youtube|Youtube]].
+
Read more about the template: [[Template:Youtube|Youtube]].
  
 
=== Insert video with #ev ===
 
=== Insert video with #ev ===
Базовое средство для вставки видео содержащееся в расширении [https://www.mediawiki.org/wiki/Extension:EmbedVideo EmbedVideo] и способное работать с большим количеством видео-хостингов. Пример вставки видео через #ev:
+
The basic tool for inserting video contained in the [https://www.mediawiki.org/wiki/Extension:EmbedVideo EmbedVideo extension] and able to work with a large number of video hosting sites. Example of inserting a video in #ev:
  
<code><nowiki>{{#ev:сервис|ID или URL|ширина|выравнивание|подпись}}</nowiki></code>
+
<code><nowiki>{{#ev:Site|ID or URL|Width|Alignment|Caption}}</nowiki></code>
  
Параметры:
+
Glossary:
* сервис название сервиса, на котором размещено видео (см. таблицу под спойлером ниже)
+
* Site the name of the service that hosts the video (see the table under the spoiler below)
* ID или URL — адрес конкретного видео
+
* ID or URL — the address of a specific video
* ширина ширина видео в пикселях (по умолчанию — 640)
+
* Width width of the video in pixels (640 by default)
* выравнивание выровнять видео по левому краю, по центру, по правому краю. Используются параметры left, center и right.
+
* Alignment align the video to the left, center, or to the right with their respective parameters
* подпись подпись под видео
+
* Caption Caption under video
  
{{sp-begin|Перечень поддерживаемых сервисов}}
+
{{sp-begin|List of supported services}}
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
! Сайт
+
! Site
! colspan="2"|Название сервиса
+
! colspan="2"|Site name
! Пример ID
+
! Sample ID
! Пример URL
+
! Sample URL
 
|-
 
|-
 
! [https://archive.org/details/movies Archive.org Videos]
 
! [https://archive.org/details/movies Archive.org Videos]
Line 270: Line 268:
 
{{sp-end}}
 
{{sp-end}}
  
Не рекомендуется вставлять видео с YouTube с помощью #ev.
+
We do not recommend embedding YouTube videos using #ev.
 +
 
 +
Once the code for the video is complete, add the code {{Break}} afterwards, then the text will not flow around the video.
  
Если после кода вызова видео добавить код <code><nowiki>{{Разрыв}}</nowiki></code>, то текст не будет обтекать видео.
+
[[Category:Help]]

Latest revision as of 09:54, 21 January 2019

It is desirable to complement War Thunder Wiki articles with thematic videos to expand their themes. At the same time, the wiki does not have the feature to directly upload videos like images. Therefore, the desired videos must be first uploaded to a video hosting site, such as YouTube.

You can insert an external video into an article in the following ways:

Visual editor

Insert video gallery

InsertingVideos - Visual InsertTemplate.png

To insert a video gallery through a visual editor, go to the "Template" section of the "Insert" menu.

InsertingVideos - Visual AddYTGallery.png

In the dialog box that appears, select the template Youtube-gallery and click the "Add template" button.

InsertingVideos - Visual YTGalleryField.png

In the next window, the "Field name" box, enter the number 1, then click on the appeared block with the name "1" with the caption "Unknown field." After these actions, another input box will appear on the screen, where you should enter the ID of the video from YouTube into it. You can get it from the video URL as follows:

https://www.youtube.com/watch?v=a8_8L-F44ts&t=54s

The bold text will be the ID of the video.

Then, in the "Field name" box in the "Add more information" section, you need to enter the number "2" and click on the appeared block with the same name. Now in the new input box that appears on the screen, you can add an explanatory note to the video. You can continue adding these text by inserting digits in order (3, 4, 5, etc.) to infinity, with each odd field will be considered a video ID, and each even field will be considered as the description for the preceding number/video. Nevertheless, an infinite number of videos in the article would look somewhat inappropriate, so it is advisable to limit their number to three or four. An example with three inserted videos and their descriptions:

InsertingVideos - Visual YTGalleryDetails.png

After all the parameters are specified, click the "Insert" button

Insert single video

To insert a single video through the Visual Editor, you need to go to the “Templates” section just like in the previous example, but this time choose the Youtube template.

InsertingVideos - Visual AddYoutube.png

In the required "url" field, you need to insert the ID of the video from YouTube, the receipt of which was shown in the last example. For the template, the additional parameters "align," "size," and "caption" are also available in the "add more information" section, the setting of which can be adjusted from the field box shown afterwards.

After all the parameters are specified, click the "Insert" button.

Wiki text editor

Insert video gallery

Using the wiki text editor, you can insert a video gallery using the following code:

{{Youtube-gallery|<ID1>|<Caption1>|<ID2>|<Caption2>|<ID3>|<Caption3>|...}}

Glossary:

  • ID - Identifying numbers of the YouTube video. Example: https://www.youtube.com/watch?v=a8_8L-F44ts&t=54s
  • Caption - Caption that will be displayed under video.

The number of videos in the gallery is not limited, but it is recommended to insert no more than three.

Usage example:

Code:

{{Youtube-gallery|0-J5Vg0SxLc|Victory is ours!|-ndHK-sKUkw|Unforgotten: T-44<br>'Start up and move out!' in Kubinka|8MoVAKl9uFc|Update 1.47}}

Result:

Read more about the template: Youtube-gallery.

Insert single video

G.55 Silurante

You can insert a single video through the wiki text editor using the following code (example of the result to the right):

{{Youtube
 |url = mzFOHUsXu-E
 |caption = G.55 Silurante
 |align = right
 |size = 300
}}

Glossary:

  • url - link or video ID (required)
  • caption - Caption under video
  • align - center, left, or right (left by default)
  • size - video size in pixels (default is 300)

Lines with optional parameters can be deleted.

Read more about the template: Youtube.

Insert video with #ev

The basic tool for inserting video contained in the EmbedVideo extension and able to work with a large number of video hosting sites. Example of inserting a video in #ev:

{{#ev:Site|ID or URL|Width|Alignment|Caption}}

Glossary:

  • Site — the name of the service that hosts the video (see the table under the spoiler below)
  • ID or URL — the address of a specific video
  • Width — width of the video in pixels (640 by default)
  • Alignment — align the video to the left, center, or to the right with their respective parameters
  • Caption — Caption under video

We do not recommend embedding YouTube videos using #ev.

Once the code for the video is complete, add the code
afterwards, then the text will not flow around the video.