Template:Datasource/doc

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

Describes a datasource

The template automatically sets the following categories:

Usage

{{Datasource |code= |title= |description= |date= |source= |author= |license= }}

Use this template when a media uses a datasource for information (e.g. a database used to create a map) to describe this datasource.

Template parameters

ParameterDescriptionDefaultStatus
codeCodeThe datasource's code name.emptyoptional
titleTitleThe datasource's titleemptyoptional
descriptionDescriptionThe datasource's localized descriptiona no description templaterequired
dateDateThe datasource's last update date, when the media has been created. If the datasource doesn't have a known last updated date, use the media date instead.a no date templaterequired
sourceSourceThe datasource's source. Generally, the URL to the page where the datasource can be browsed. For printed databases, use a bibliographical reference.a no source templaterequired
authorAuthorThe datasource's author.a no author templaterequired
licenseLicenseThe datasource's license. Especially outside the US, the expected license should address sui generis database rights.a no license templaterequired
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

Describes a datasource

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Authorauthor

The datasource's author.

Default
a ''no author'' template
Stringrequired
Codecode

The datasource's code name.

Stringoptional
Datedate

The datasource's last update date, when the media has been created. If the datasource doesn't have a known last updated date, use the media date instead.

Default
a ''no date'' template
Stringrequired
Descriptiondescription

The datasource's localized description

Default
a ''no description'' template
Stringrequired
Licenselicense

The datasource's license. Especially outside the US, the expected license should address sui generis database rights.

Default
a ''no license'' template
Stringrequired
Sourcesource

The datasource's source. Generally, the URL to the page where the datasource can be browsed. For printed databases, use a bibliographical reference.

Default
a ''no source'' template
Stringrequired
Titletitle

The datasource's title

Stringoptional

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: At the bottom of the page

Relies on:

See also

Localization

This template is localized by utilizing custom MediaWiki namespace messages.

Currently translated by local MediaWiki messages. If this template is considered more useful, localization strings will be incorporated to the Wikimedia licenses information extension, to allow other projects use and translatewiki.net translation.