Template:Information: Difference between revisions

From The World of Gotha
Jump to navigation Jump to search
m (Enhance permissions parameter)
m (Move documentation to a subpage)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
{| class="toccolours mbox-inside" style="width:100%;" cellpadding="2"
<includeonly>{| class="toccolours mbox-inside" style="width:100%;" cellpadding="2"
! style="background:#ccf; text-align:right; vertical-align:top; padding-right: 0.4em; width:15%;" | Description
! style="background:#ccf; text-align:right; vertical-align:top; padding-right: 0.4em; width:15%;" | Description
| {{{description|}}}
| {{{description|}}}
Line 10: Line 10:
|- style="vertical-align:top;"
|- style="vertical-align:top;"
! style="background:#ccf; text-align:right; padding-right:0.4em;" | Permission
! style="background:#ccf; text-align:right; padding-right:0.4em;" | Permission
| {{{permission|{{#switch: 1
| {{#if: {{{permission|}}} | {{#switch: {{{permission}}}
  | {{#ifeq: {{{permission|BY-SA}}}|BY-SA|1|0}} = [https://creativecommons.org/licenses/by-sa/4.0/ CC BY-SA 4.0]
  | by-sa
   | {{#ifeq: {{{permission|BY-SA-3}}}|BY-SA-3|1|0}} = [https://creativecommons.org/licenses/by-sa/3.0/ CC BY-SA 3.0]
  | BY-SA = [https://creativecommons.org/licenses/by-sa/4.0/ CC BY-SA 4.0]
   | {{#ifeq: {{{permission|PD}}}|PD|1|0}} = {{wp|Public domain}}
   | by-sa-3
   | {{#ifeq: {{{permission|GNU}}}|GNU|1|0}} = [http://www.gnu.org/copyleft/gpl.html GNU General Public License]
  | BY-SA-3 = [https://creativecommons.org/licenses/by-sa/3.0/ CC BY-SA 3.0]
   }} }}}
  | by-nc
  | BY-NC = [https://creativecommons.org/licenses/by-nc/4.0/ CC BY-NC]
  | by-nc-sa
  | BY-NC-SA = [https://creativecommons.org/licenses/by-nc-sa/4.0/ CC BY-NC-SA]
  | by-nd
  | BY-ND = [https://creativecommons.org/licenses/by-nd/4.0/ CC BY-ND]
   | by-nc-nd
  | BY-NC-ND = [https://creativecommons.org/licenses/by-nc-nd/4.0/ CC BY-NC-ND]
  | pd
  | PD = {{wp|Public domain}}
   | gnu
  | GNU = [http://www.gnu.org/copyleft/gpl.html GNU General Public License]
  | #default = {{{permission}}}
   }} | [https://creativecommons.org/licenses/by-sa/4.0/ CC BY-SA 4.0] }}
|- {{#if: {{{additional|}}} | style="vertical-align:top;" | style="display:none;"}}
|- {{#if: {{{additional|}}} | style="vertical-align:top;" | style="display:none;"}}
! style="background:#ccf; text-align:right; padding-right:0.4em;" | Additional information
! style="background:#ccf; text-align:right; padding-right:0.4em;" | Additional information
| {{{additional|}}}
| {{{additional|}}}
|}
|}</includeonly><noinclude>{{doc}}
<noinclude>'''Template:Information''' is a template for displaying source and licensing information for a file. To use it, place the following code on the page:
[[Category:Templates]]
<pre><nowiki>{{Information
| description =
| source      =
| author      =
| permission  =
| additional  =
}}</nowiki></pre>
 
''Note:'' The permission parameter defaults to CC BY-SA 4.0 but may be changed.
</noinclude>
</noinclude>

Latest revision as of 04:00, 30 October 2024

Template documentation

The {{information}} template records and displays metadata for media files, such as photographs and diagrams. It includes a description of the file, its source, and its copyright status.

Usage

{{Information
| description = 
| source      = 
| author      = 
| permission  = 
| additional  = 
}}

Parameters

Parameter Description Type Status Notes
description Description of the work String Required
source Describe where the file comes from String Optional
author Attribution to the file's creator String Optional
permission License or permission for the file String Required Derivatives of works licensed as share-alike or under GNU must use the same license as the original source file. The table below shows shortcut values to display a link to common licenses.
Defaults to CC BY-SA 4.0
additional Additional information String Optional If a file is used under fair use, the reasoning for fair use may be included here.
Common licenses
Permission
value
Displays Usage permitted by licnese
by-sa
BY-SA
CC BY-SA 4.0 Attribution Share-alike
by-sa-3
BY-SA-3
CC BY-SA 3.0 Attribution Share-alike
by-nc
BY-NC
CC BY-NC 4.0 Attribution Non-commercial
by-nc-sa
BY-NC-SA
CC BY-NC-SA 4.0 Attribution Non-commercial Share-alike
by-nd
BY-ND
CC BY-ND 4.0 Attribution No derivative works
by-nc-nd
BY-NC-ND
CC BY-NC 4.0 Attribution Non-commercial No derivative works
gnu
GNU
GNU General Public License Attribution Share-alike
Fair use Fair use There should be an educational or critical purpose for use under the fair use doctrine. It is not a "way around" copyright.
pd
PD
Public domain Free usage

Example

Example for File:Template info icon.png:

{{Information
| description = Info-icon version 2
| source      = [https://commons.wikimedia.org/wiki/File:Test_Template_Info-Icon_-_Version_(2).svg Wikimedia Commons]
| author = [https://commons.wikimedia.org/wiki/User:Jaybear User:Jaybear]
| permission  = PD
| additional = 
}}
Description Info-icon version 2
Source Wikimedia Commons
Author User:Jaybear
Permission Public domain
Additional information