From StrategyWiki, the video game walkthrough and strategy guide wiki
Jump to navigation Jump to search
(adding usage info and pasting Template:Sidebar here, will rework based on it to have more streamlined CSS)
(set default width to 300px and use https links)
 
(28 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<div style="float: {{qif|test={{{float|}}}|then={{{float}}}|else=right}}; margin: 10px; background-color: transparent; padding: 0px; width: 140px; text-align: center">http://www.youtube.com/img/pic_youtubelogo_123x63.gif<center style="text-align: center; font-size: larger; padding: 5px; background-color: #EEEEEE">http://sjl-static14.sjl.youtube.com/vi/0IyArskVoZo/2.jpg
<includeonly>{{#ev:youtube|{{{video}}}|{{{width|300}}}|{{{float|right}}}|<span class="plainlinks">'''[https://www.youtube.com/watch?v={{{video}}}&eurl=https://strategywiki.org/wiki/{{FULLPAGENAMEE}}&feature=player_embedded {{{title}}}]'''</span> {{#if:{{{duration|}}}|<small>({{{duration}}})</small>}}{{#if:{{{description|}}}|<br />{{{description}}}}}||{{{urlargs|}}}}}</includeonly><noinclude>{{-}}
{{Documentation}}


<br/>'''[[Main Page|sample link]]''' <font style="font-size: smaller;"><font style="font-size: smaller;">66:99</font></font></center>
[[Category:Templates]]</noinclude>
<div style="margin: 0px 0px 0px 0px; padding: 5px; border-left: 1px solid #7d87bc; background-color: #EEEEEE; border-right: 1px solid #7d87bc; background-color: #d0d5f1; border-bottom: 1px solid #7d87bc; background-color: #EEEEEE;">Description test test test test test</div>
</div><noinclude>
This is a template for [http://www.youtube.com YouTube] videos.
[[Category:Guide-specific templates|Y]]</noinclude>
 
{{-}}
<div style="float: {{qif|test={{{float|}}}|then={{{float}}}|else=right}}; margin: 0px 10px 10px 10px; border: 1px solid #7d87bc; background-color: #d0d5f1; padding: 3px; width: {{{width}}};">{{qif|test={{{title|}}}|then=<div style="text-align: center; font-size: larger; color:#556; ">
'''{{{title}}}'''
</div>}}{{{contents}}}
</div>
<noinclude>This template is used as follows:
<pre>{{YouTube
|float=left, right, or none (default: right)
|title=name of the video
|length=length (minutes:seconds) of the video
|description=description of the video
}}</pre></noinclude>

Latest revision as of 21:56, 11 December 2022

This page has been transcluded from Template:YouTube/Documentation.


YouTube logo.png

This is a template for YouTube videos.

This template is used as follows:

{{YouTube
|video=ID of the video (not its full URL)
|float=left, right, or center (default: right)
|width=width in pixels without "px" (default:200)
|title=name of the video
|duration=duration in minutes:seconds (optional)
|description=description of the video (optional)
}}

Example

Nonlethal Walkthrough - Lebedev's Airfield (1/4) (9:42)
From Battery Park through Brooklyn Bridge Station.
{{YouTube
|video=wsCNoJagyL8
|float=right
|width=350
|title=Nonlethal Walkthrough - Lebedev's Airfield (1/4)
|duration=9:42
|description=From Battery Park through Brooklyn Bridge Station.
}}

Example 2: use in a sidebar

Sidebar title
YouTube title
Lorem ipsum.
{{Sidebar
|width=300px
|title=Sidebar title
|contents={{YouTube|video=-F_rnd-DKIg|title=YouTube title|float=center}}
Lorem ipsum.}}