Template:YouTube: Difference between revisions

Template page
w:c:strategywiki>Prod
m (fix)
w:c:strategywiki>Prod
(clean up code, single description)
Line 1: Line 1:
<includeonly><div style="float: {{{float|right}}}; margin: 5px; background-color: #EEEEEE; padding: 0px; padding-top: 5px; padding-bottom: 5px; width: 200px; text-align: center; border: 1px solid #7d87bc"><span class="plainlinks">[http://www.youtube.com/watch?v={{{video}}}&eurl=http://strategywiki.org/wiki/{{FULLPAGENAMEE}}&feature=player_embedded  http://media.strategywiki.org/images/9/9c/YouTube_logo.png]</span><center style="text-align: center; font-size: larger; padding: 5px; background-color: #EEEEEE">{{#evp:youtube|{{{video}}}|{{{description|}}}|right|180}}
<div style="float:{{{float|right}}};margin:5px;background-color:#EEEEEE;padding:0px;padding-top:5px;padding-bottom: 5px;width:200px;text-align:center;border:1px solid #7d87bc"><span class="plainlinks">[http://www.youtube.com/watch?v={{{video}}}&eurl=http://strategywiki.org/wiki/{{FULLPAGENAMEE}}&feature=player_embedded  http://media.strategywiki.org/images/9/9c/YouTube_logo.png]</span><center style="padding:5px;">{{#evp:youtube|{{{video}}}|{{{description|}}}|right|180}}</center><center style="font-size:larger;padding:5px;background-color:#EEEEEE"><span class="plainlinks">'''[http://www.youtube.com/watch?v={{{video}}}&eurl=http://strategywiki.org/wiki/{{FULLPAGENAMEE}}&feature=player_embedded {{{title}}}]'''</span> {{#if:{{{duration|}}}|<br/><font style="font-size: 0.8em">{{{duration}}}</font>}}</center></div><noinclude>{{-}}
 
<br/><span class="plainlinks">'''[http://www.youtube.com/watch?v={{{video}}}&eurl=http://strategywiki.org/wiki/{{FULLPAGENAMEE}}&feature=player_embedded {{{title}}}]'''</span> {{#if:{{{duration|}}}|<br/><font style="font-size: smaller;"><font style="font-size: smaller;">{{{duration}}}</font></font>}}</center>
{{#if:{{{description|}}}|<div style="margin: 0px 0px 0px 0px; padding: 5px; background-color: #EEEEEE; text-align: center;>{{{description}}}</div>}}
</div></includeonly><noinclude>
{{Documentation}}
{{Documentation}}


[[Category:Templates|Y]]</noinclude>
[[Category:Templates|Y]]</noinclude>

Revision as of 20:28, 6 July 2011

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


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

http://media.strategywiki.org/images/9/9c/YouTube_logo.png
{{#evp:youtube|wsCNoJagyL8|From Battery Park through Brooklyn Bridge Station.|right|180}}
Nonlethal Walkthrough - Lebedev's Airfield (1/4)
9:42
{{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

Page Template:Sidebar/styles.css has no content.

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