Progress Continues
We've already had 21717 updates since Dolphin 5.0. Keep up with Dolphin's continuing progress through the Dolphin Blog: February, March, and April 2024 Dolphin Progress Report. |
The Dolphin Emulator Wiki needs your help! Dolphin can play thousands of games, and changes are happening all the time. Help us keep up! Join in and help us make this the best resource for Dolphin. |
Template:VideoGallery/sandbox: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
<includeonly>{{#vardefine:vg_used|yes}}<div></div>{{#vardefine:vg_n|1}}{{#vardefine:vg_i|1}}{{#while:|{{{vid{{#var:vg_n}}|}}}|{{#vardefine:vg_n|{{#expr:{{#var:vg_n}}+1}}}}}}{{#vardefine:vg_n|{{#expr:{{#var:vg_n}}-1}}}}{{#ifexpr:{{#var:vg_n}}>50|{{#vardefine:vg_n|50}}}}{{#ifexpr:{{#var:vg_n}}<4|{{#while:|{{#ifexpr:{{#var:vg_i}}<={{#var:vg_n}}|true}}|{{{{{srv{{#var:vg_i}}|YouTube/sandbox}}}|{{{vid{{#var:vg_i}}|}}}|{{{cap{{#var:vg_i}}|}}}}}{{#vardefine:vg_i|{{#expr:{{#var:vg_i}}+1}}}}}}|{{{{{srv1|YouTube/sandbox}}}|{{{vid1|}}}|{{{cap1|}}}}}{{{{{srv2|YouTube/sandbox}}}|{{{vid2|}}}|{{{cap2|}}}}}{{{{{srv3|YouTube/sandbox}}}|{{{vid3|}}}|{{{cap3|}}}}}<div style="clear:left;"></div>{{#vardefine:vg_i|4}}{{#while:|{{#ifexpr:{{#var:vg_i}}<={{#var:vg_n}}|true}}| | <includeonly>{{#vardefine:vg_used|yes}}<div></div>{{#vardefine:vg_n|1}}{{#vardefine:vg_i|1}}{{#while:|{{{vid{{#var:vg_n}}|}}}|{{#vardefine:vg_n|{{#expr:{{#var:vg_n}}+1}}}}}}{{#vardefine:vg_n|{{#expr:{{#var:vg_n}}-1}}}}{{#ifexpr:{{#var:vg_n}}>50|{{#vardefine:vg_n|50}}}}{{#ifexpr:{{#var:vg_n}}<4|{{#while:|{{#ifexpr:{{#var:vg_i}}<={{#var:vg_n}}|true}}|{{{{{srv{{#var:vg_i}}|YouTube/sandbox}}}|{{{vid{{#var:vg_i}}|}}}|{{{cap{{#var:vg_i}}|}}}}}{{#vardefine:vg_i|{{#expr:{{#var:vg_i}}+1}}}}}}|{{{{{srv1|YouTube/sandbox}}}|{{{vid1|}}}|{{{cap1|}}}}}{{{{{srv2|YouTube/sandbox}}}|{{{vid2|}}}|{{{cap2|}}}}}{{{{{srv3|YouTube/sandbox}}}|{{{vid3|}}}|{{{cap3|}}}}}<div style="clear:left;"></div>{{#vardefine:vg_i|4}}{{#while:|{{#ifexpr:{{#var:vg_i}}<={{#var:vg_n}}|true}}|* {{{{{srv{{#var:vg_i}}|YouTube/sandbox}}}|{{{vid{{#var:vg_i}}|}}}|{{{cap{{#var:vg_i}}|}}}|link}}<br/>{{#vardefine:vg_i|{{#expr:{{#var:vg_i}}+1}}}}}}}}<br style="clear:left"/></includeonly><noinclude>{{documentation}}</noinclude> |
Revision as of 00:14, 17 July 2017
[edit] [ ] Template documentation
This template uses the embed video plugin to create a video gallery. If the page have more than 3 videos, this template will automatically randomly select 3 videos to show as thumbnails and the rest of the videos will be returned as plain text links.
Usage
The video gallery template should be called in the following way:
{{VideoGallery |vid1=<video ID>|cap1=<title> |vid2=<video ID>|cap2=<title> |vid3=<video ID>|cap3=<title> [...] |vidN=<video ID>|capN=<title> }}
where
Video ID
is the ID of the video that you are embedding (like the bold part in this URL: http://www.youtube.com/watch?v=VqNcksMfAjM).Title
(optional) is the caption for the video. If no caption is entered or if the parameter is omitted, the template will return the video URL as title.
Examples
Basic usage
- We have 2 videos and their corresponding IDs and title. So, every video ID and their corresponding title goes in one line:
{{VideoGallery |vid1=sam9lDWDvXE|cap1=Xenoblade JP HD Gameplay 1A (Dolphin Emulator @ 720p) |vid2=vKjjS8SRG9I|cap2=Xenoblade JP HD Gameplay 1B (Dolphin Emulator @ 720p) }}
- The above example produces this:
Behavior with multiple videos
- This time, we have 12 videos, so, the template will show only 3 random thumbnails and the other videos will be displayed as plain text links. Just add every video ID and their corresponding title in a separate line, like before:
{{VideoGallery |vid1=sam9lDWDvXE|cap1=Xenoblade JP HD Gameplay 1A (Dolphin Emulator @ 720p) |vid2=vKjjS8SRG9I|cap2=Xenoblade JP HD Gameplay 1B (Dolphin Emulator @ 720p) |vid3=f_0IbQrezTo|cap3=Xenoblade JP HD Gameplay 2 (Dolphin Emulator @ 720p) |vid4=_an7OMeK2nA|cap4=Xenoblade JP HD Gameplay 3 (Dolphin Emulator @ 720p) |vid5=wjzv0KtDXOA|cap5=Xenoblade JP HD Gameplay 4 (Dolphin Emulator @ 720p) |vid6=tJtCp8rPXWg|cap6=Xenoblade PAL HD Intro (Dolphin Emulator @ 1080p) |vid7=_VLNa9PKT0Y|cap7=Xenoblade PAL HD Gameplay 1 (Dolphin Emulator @ 720p) |vid8=dp3QnvFn_Hc|cap8=Xenoblade PAL HD Gameplay 2 (Dolphin Emulator @ 720p) |vid9=EzSDE3NOq_Y|cap9=Xenoblade PAL HD Gameplay 1 - Near start of game (Dolphin Emulator @ 720p) |vid10=oGcSdu3t8CQ|cap10=Xenoblade PAL HD Gameplay 2 - Continuation of Gameplay 1 (Dolphin Emulator @ 720p) |vid11=5Ywd5T5y91E|cap11=Xenoblade PAL HD - A protective mother (Dolphin Emulator @ 720p) |vid12=3Fvdc_LuWB4|cap12=Xenoblade Intro HD 1080p (Dolphin) }}
- The above example produces this:
- Xenoblade JP HD Gameplay 1A (Dolphin Emulator @ 720p)
- Xenoblade JP HD Gameplay 1B (Dolphin Emulator @ 720p)
- Xenoblade JP HD Gameplay 3 (Dolphin Emulator @ 720p)
- Xenoblade JP HD Gameplay 4 (Dolphin Emulator @ 720p)
- Xenoblade PAL HD Intro (Dolphin Emulator @ 1080p)
- Xenoblade PAL HD Gameplay 1 (Dolphin Emulator @ 720p)
- Xenoblade PAL HD Gameplay 1 - Near start of game (Dolphin Emulator @ 720p)
- Xenoblade PAL HD - A protective mother (Dolphin Emulator @ 720p)
- Xenoblade Intro HD 1080p (Dolphin)
Videos from different services
- This time, we have 2 videos from different services. The default is YouTube, for other services we need to add an additional
|srvN=
parameter (see notes for more details). Then, add every video ID, their corresponding title (and server) in a separate line, like before:
{{VideoGallery |vid1=sam9lDWDvXE|cap1=Xenoblade JP HD Gameplay 1A (Dolphin Emulator @ 720p) |srv2=dailymotion|vid2=x1ji36n_gremlins-gizmo-videogame-hd-on-dolphin-emulator_videogames|Gremlins game }}
- The above example produces this:
Notes
- If the template was called with more than 3 videos, every time that you access or refresh the page, you'll randomly get another 3 video thumbnails.
- The maximum number of videos that can be included with this template is limited to 50 (3 thumbnails + 47 links), if you include more than 50 videos, the template will ignore the additional videos and you'll probably get loop errors in the page.
- By default, this template accepts only videos from YouTube, however, you can include a
|srvN=
tag before|vidN=
entry to link videos from another service (videos from multiple services can be included in the same gallery). Specifying a service that aren't supported will just return a red link. The supported services and the corresponding parameter that should be used in|srvN=
are listed at EmbedVideo: Supported Services.
The above documentation is transcluded from Template:VideoGallery/doc. (edit | history) Editors can experiment in this template's sandbox (edit) and testcases (create) pages. Please add categories and interwikis to the /doc subpage. Subpages of this template. |