Template:From YouTube

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

YouTube – View/save archived versions on archive.org and archive.today

Documentationview · edit · history · purge ]
This documentation is transcluded from Template:From YouTube/doc.

Warning This is not a license template. Use {{YouTube CC-BY}} for that.
This template is used on files (File:) imported from YouTube, and links to the source file (on YouTube).

The template automatically sets the following categories: Media from YouTube

Usage

{{From YouTube |1= |2= |t= }}

Template parameters

ParameterDescriptionDefaultStatus
1IDYouTube video IDemptyrequired
2link textText of the link to YouTubeYouTubeoptional
ttimestampTimestamp within the video, in any format accepted by YouTube (for example “65”, “65s” or “1m5s” for 1 minute 5 seconds)emptyoptional
archivedarchivedWhether to link to archive pages about the video. Set to “no” if there are—and, for some reason, there should not be—any archives of the YouTube video page.emptyoptional
langlanguageRequested language of the template. Useful in other templates to provide consistent language.{{int:lang}}optional
Template data
<templatedata>JSON</templatedata> ./. {{TemplateBox}}
TemplateData

TemplateData is a way to store information about template parameters (the description of those and of the whole template) for both humans and machines. It is used by VisualEditor and possibly other tools like Upload Wizard.


Existing template documentation
At Wikimedia Commons, it is recommended to use {{TemplateBox}} with either useTemplateData=1 or useTemplateData=only on the /doc subpage and transcluding it with {{Documentation}} into the template. <nowiki>-tags can be wrapped around the arguments, if required, to avoid templates being expanded.

Newly created template documentation and imports
Another option, especially for imported templates, or for users with JSON experience, is placing raw <templatedata>-tags into the Wikitext of the template, as described in various Wikipediae.

Discussion
There is an ongoing discussion about that matter. Feel invited to comment if you are experienced in either way, your time permits and if you like to share your opinion or to make a suggestion.


Wikipedia's help about TemplateDataCommons-specific information

This template is used on files (File:) imported from YouTube, and links to the source file (on YouTube). (Warning: this is not a license template. Use {{YouTube CC-BY}} for that.)

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
ID1

YouTube video ID

Linerequired
link text2

Text of the link to YouTube

Default
YouTube
Lineoptional
archivedarchived

Whether to link to archive pages about the video. Set to “no” if there are—and, for some reason, there should not be—any archives of the YouTube video page.

Lineoptional
languagelang

Requested language of the template. Useful in other templates to provide consistent language.

Default
{{int:lang}}
Lineoptional
timestampt

Timestamp within the video, in any format accepted by YouTube (for example “65”, “65s” or “1m5s” for 1 minute 5 seconds)

Lineoptional

Additional information

The template is intended to be used in the following namespaces: the File namespace

The template is intended to be used by the following user groups: all users

Placement: In the "Source" parameter of the {{Information}} template (or the respective parameter of similar templates) or just below this template

Example

{{From YouTube|iKv47OPR5ug|Main stream: Soča|t=60s}}

renders as:

YouTube: Main stream: Soča (Time: 60s) – View/save archived versions on archive.org and archive.today

See also

Localization

Deutsch  English  français  galego  magyar  polski  македонски  русский  тоҷикӣ  日本語 

This template makes use of {{Autotranslate}} and the translate extension.