Difference between revisions of "Template:External music video/doc"

From blackwiki
Jump to navigation Jump to search
imported>Jc86035
(upd)
imported>Ojorojo
(updated with new parameter, etc.)
Line 4: Line 4:
 
  | text = This template is used to create links to videos available on external web sites. Make sure you only link to web sites that are legally licensing the videos. Most music videos found on YouTube and Google Video are not compatible with [[Wikipedia:Copyrights#Linking to copyrighted works|Wikipedia's linking policies]].
 
  | text = This template is used to create links to videos available on external web sites. Make sure you only link to web sites that are legally licensing the videos. Most music videos found on YouTube and Google Video are not compatible with [[Wikipedia:Copyrights#Linking to copyrighted works|Wikipedia's linking policies]].
 
}}
 
}}
Most music videos cannot be uploaded to Wikipedia because of copyright restrictions, however, it is permissible to link to videos if they are hosted on a site that has licensed them for online viewing. You can use this template to add a music video link to an infobox created by {{tl|Infobox single}} and {{tl|Infobox song}}.
+
Most music videos cannot be uploaded to Wikipedia because of copyright restrictions.  However, it is permissible to link to videos if they are hosted on a site that has licensed them for online viewing. Use this template to add a music video link to an infobox created by {{tl|Infobox song}}.
 
 
If this template is substituted, it will return a cleaned-up copy of itself with unnecessary parameters removed and deprecated parameters replaced. Parameter indentation will also automatically be fixed.
 
  
 
==Usage==
 
==Usage==
This template is used with the {{para|misc}} parameter of an infobox template. It should not be used on its own. The first unnamed parameter should be the link to the video on the external site. You may include additional text after the link if desired.
+
This template is used with the {{para|misc}} parameter of the infobox template. It should not be used on its own. If this template is substituted, it will return a cleaned-up copy of itself with unnecessary parameters removed and deprecated parameters replaced. Parameter indentation will also automatically be fixed.
  
To insert this template into the infobox, add it into the "Misc" section like this:
+
=== Code ===
<pre>{{Infobox single
+
{{infobox|data1={{parameter names example|header=Music video|type=song|1=}}}}
 +
<pre style="overflow:auto;">{{Infobox song
 
...
 
...
| misc = {{subst:External music video|1=<!-- link to external video with description -->}}
+
| misc         = {{subst:External music video
}}</pre>
+
| type        =
 +
| header      =
 +
| 1           =  
 +
}}
 +
</pre>
  
For YouTube links, use {{tl|YouTube}}.
+
; type : Enter the same type specified in the {{tl|Infobox song}} parameter {{para|type}}. If not used or set to {{para|type|single}}, a header with a khaki background color is created. Set to {{para|type|song}} to generate a light blue background.
 
+
; header : Enter the text for the header. If not used, the default is <code>Music video</code>.  For no header, enter {{para|header|no}}. For multiple music video links, set the first to {{para|header|Music videos}} and the succeeding links to {{para|header|no}}, so only one header for all will be created (see Example 2).
You may use one or both of the following optional parameters.
+
; 1 : Enter the video link, plus the song title in quote marks, followed by the name of the video site (see Example 1).  For YouTube links, use {{tl|YouTube}}, instead of <code>[http:{{nbsp}}...]</code> (see Example 2).
; type : This parameter controls the color of the section header. If not specified, the template creates a section header with the same background color as used by the {{tlf|Infobox single}} template. To use this template with {{tlf|Infobox song}}, add {{para|type|song}} as shown in the second example.
 
; header : This parameter controls the text used in the section header. If not specified, the template creates a section header with the text "Music video".
 
  
 
==Examples==
 
==Examples==
<pre>
+
<pre style="overflow:auto;">{{Infobox song
{{Infobox single
 
 
...
 
...
| misc = {{subst:External music video|1="[http://www.cmt.com/videos/johnny-cash/26385/hurt.jhtml Hurt]" at CMT.com}}
+
| misc         = {{subst:External music video
 +
| type        = song
 +
| header      = Music video
 +
| 1           = [http://www.cmt.com/videos/johnny-cash/26385/hurt.jhtml "Hurt"] at CMT.com
 
}}
 
}}
 +
</pre>
  
{{Infobox single
+
<pre style="overflow:auto;">{{Infobox song
 
...
 
...
| misc = {{subst:External music video|1="[http://www.cmt.com/videos/johnny-cash/26385/hurt.jhtml Hurt]" at CMT.com |header=Video}}
+
| misc         = {{subst:External music video
}}
+
| type        = single
 +
| header      = Music videos
 +
| 1           = {{YouTube|qzU9OrZlKb8|"Till the World Ends"}}
 +
}}{{subst:External music video
 +
| type = single
 +
| header = no
 +
| 1 = {{YouTube|M3Lqg-46mDo|"Till the World Ends" (dance version)}}
 +
}}
 +
</pre>
  
{{Infobox song
 
...
 
| misc = {{subst:External music video|1="[http://www.cmt.com/videos/johnny-cash/26385/hurt.jhtml Hurt]" at CMT.com |type=song}}
 
}}
 
</pre>
 
  
 
<includeonly><!--
 
<includeonly><!--

Revision as of 15:05, 15 July 2017

Most music videos cannot be uploaded to Wikipedia because of copyright restrictions. However, it is permissible to link to videos if they are hosted on a site that has licensed them for online viewing. Use this template to add a music video link to an infobox created by {{Infobox song}}.

Usage

This template is used with the |misc= parameter of the infobox template. It should not be used on its own. If this template is substituted, it will return a cleaned-up copy of itself with unnecessary parameters removed and deprecated parameters replaced. Parameter indentation will also automatically be fixed.

Code

Template:Parameter names example
{{Infobox song
...
| misc         = {{subst:External music video
 | type        = 
 | header      = 
 | 1           = 
}}
type 
Enter the same type specified in the {{Infobox song}} parameter |type=. If not used or set to |type=single, a header with a khaki background color is created. Set to |type=song to generate a light blue background.
header 
Enter the text for the header. If not used, the default is Music video. For no header, enter |header=no. For multiple music video links, set the first to |header=Music videos and the succeeding links to |header=no, so only one header for all will be created (see Example 2).
Enter the video link, plus the song title in quote marks, followed by the name of the video site (see Example 1). For YouTube links, use {{YouTube}}, instead of [http: ...] (see Example 2).

Examples

{{Infobox song
...
| misc         = {{subst:External music video
 | type        = song
 | header      = Music video
 | 1           = [http://www.cmt.com/videos/johnny-cash/26385/hurt.jhtml "Hurt"] at CMT.com
}}
{{Infobox song
...
| misc         = {{subst:External music video
 | type        = single
 | header      = Music videos
 | 1           = {{YouTube|qzU9OrZlKb8|"Till the World Ends"}}
}}{{subst:External music video
 | type = single
 | header = no
 | 1 = {{YouTube|M3Lqg-46mDo|"Till the World Ends" (dance version)}}
 }}