Jump to content

Template:YouTube/doc: Difference between revisions

From Wiki - Scioly.org
Lumosityfan (talk | contribs)
Added noinclude
Converted spans to color templ
Line 4: Line 4:
== Parameters ==
== Parameters ==
'''One of the following should be used:'''
'''One of the following should be used:'''
:<code><nowiki>c</nowiki></code> - the channel string to link to (ex: <code><nowiki>https://www.youtube.com/channel/</nowiki>'''<span style="color: red;">UCg3fbV5gFNml-HZrBGPo9ow</span>'''</code>)
:<code><nowiki>c</nowiki></code> - the channel string to link to (ex: <code><nowiki>https://www.youtube.com/channel/</nowiki>'''{{color|red|UCg3fbV5gFNml-HZrBGPo9ow}}'''</code>)
:<code><nowiki>p</nowiki></code> - the playlist to link to (ex: <code><nowiki>https://www.youtube.com/playlist?list=</nowiki>'''<span style="color: red;">PLXrlspzNXNXstJSX_HwOExtaR5Z4wTbOt</span>'''</code>)
:<code><nowiki>p</nowiki></code> - the playlist to link to (ex: <code><nowiki>https://www.youtube.com/playlist?list=</nowiki>'''{{color|red|PLXrlspzNXNXstJSX_HwOExtaR5Z4wTbOt}}'''</code>)
:<code><nowiki>s</nowiki></code> - the show to link to (ex: <code><nowiki>https://www.youtube.com/show/</nowiki>'''<span style="color: red;">startrek</span>'''</code>)
:<code><nowiki>s</nowiki></code> - the show to link to (ex: <code><nowiki>https://www.youtube.com/show/</nowiki>'''{{color|red|startrek}}'''</code>)
:<code><nowiki>u</nowiki></code> - the user to link to (ex: <code><nowiki>https://www.youtube.com/user/</nowiki>'''<span style="color: red;">ScienceOlympiadTV</span>'''</code>)
:<code><nowiki>u</nowiki></code> - the user to link to (ex: <code><nowiki>https://www.youtube.com/user/</nowiki>'''{{color|red|ScienceOlympiadTV}}'''</code>)
:<code><nowiki>v</nowiki></code> - the video to link to (ex: <code><nowiki>https://www.youtube.com/watch?v=</nowiki>'''<span style="color: red;">SE8JIgwc0h0</span>'''</code>)
:<code><nowiki>v</nowiki></code> - the video to link to (ex: <code><nowiki>https://www.youtube.com/watch?v=</nowiki>'''{{color|red|SE8JIgwc0h0}}'''</code>)


'''With an optional alias parameter:'''
'''With an optional alias parameter:'''

Revision as of 18:30, 16 May 2020

Template:YouTube/doc - Documentation

The YouTube template creates a link to a YouTube video, playlist, channel, or show.

Parameters

One of the following should be used:

c - the channel string to link to (ex: https://www.youtube.com/channel/UCg3fbV5gFNml-HZrBGPo9ow)
p - the playlist to link to (ex: https://www.youtube.com/playlist?list=PLXrlspzNXNXstJSX_HwOExtaR5Z4wTbOt)
s - the show to link to (ex: https://www.youtube.com/show/startrek)
u - the user to link to (ex: https://www.youtube.com/user/ScienceOlympiadTV)
v - the video to link to (ex: https://www.youtube.com/watch?v=SE8JIgwc0h0)

With an optional alias parameter:

1 - the alias (the text that shows for the clickable link)

Examples

Code Result
{{YouTube|u=ScienceOlympiadTV}}
ScienceOlympiadTV
{{YouTube|c=UCg3fbV5gFNml-HZrBGPo9ow}}
Name
{{YouTube|v=SE8JIgwc0h0}}
Name
{{YouTube|p=PL1t-RzwecjdNpcfzbStAz2ocsuxrxsHZ0|SciOly Tourneys}}
SciOly Tourneys
{{YouTube|c=UCg3fbV5gFNml-HZrBGPo9ow|Boca Raton SO}}
Boca Raton SO