Difference between revisions of "Template:FromOtherWiki"
(Created page with "<includeonly><table class="dablink" style="font-size:small; margin:0.5em;"><tr> <td style="padding-right:2px;">20px|Other Wiki|link=</td> <td...") |
(Changed category) |
||
(5 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<includeonly><table class="dablink" style="font-size:small; margin:0.5em;"><tr> | <includeonly><table class="dablink" style="font-size:small; margin:0.5em;"><tr> | ||
<td style="padding-right:2px;">[[File:OtherWiki-gray-large.svg|20px|Other Wiki|link=]]</td> | <td style="padding-right:2px;">[[File:OtherWiki-gray-large.svg|20px|Other Wiki|link=]]</td> | ||
− | <td> | + | <td>This {{#vardefineecho:noticetype|{{#ifeq:{{{sect|}}}|sect|section|{{namespace detect|main=article|template=template|other=page}}}}}} was originally from {{#switch:{{{interwiki|{{{1|}}}}} |
− | | | + | |zhwp=Chinese Wikipedia |
− | | | + | |enwp=English Wikipedia |
− | | | + | |jawp=Japanese Wikipedia |
|metawikimedia=MetaWiki | |metawikimedia=MetaWiki | ||
− | |=<strong class="error">No wiki name or abbreviation is provided.</strong>|#default= | + | |=<strong class="error">No wiki name or abbreviation is provided.</strong>|#default=another wiki project ({{{interwiki|{{{1|}}}}}}) }} {{#if:{{{pagename|}}}|page[[{{{interwiki}}}:{{{pagename|{{FULLPAGENAME}}}}}{{#if:{{{sectlink|}}}|#{{{sectlink}}}}}|{{{pagename|{{FULLPAGENAME}}}}}]]}}{{#if:{{{oldid|}}}|[[{{{interwiki}}}:Special:Permalink/{{{oldid}}}|ID {{{oldid}}}]]}}, {{#switch:{{lc:{{{copyright|{{#switch:{{{interwiki|{{{1|}}}}}}|zhwp|enwp|jawp|metawikimedia=cc}}}}}}} <!-- |
− | -->|cc= | + | --> |cc=under [https://creativecommons.org/licenses/{{#vardefineecho:lsubtype|{{{lsubtype|{{#switch:{{{interwiki|{{{1|}}}}}}|zhwp|enwp|jawp|metawikimedia=by-sa}}}}}}}/{{#vardefineecho:lver|{{{lver|{{#switch:{{{interwiki|{{{1|}}}}}}|zhwp|enwp|jawp|metawikimedia=3.0|#default={{#ifeq:{{{lsubtype}}}|zero|1.0|}}}}}}}}}/deed.zh CC{{#ifeq:{{lc:{{{lsubtype|{{#switch:{{{interwiki|{{{1|}}}}}}|zhwp|enwp|jawp|metawikimedia=by-sa}}}}}}}|zero|0 1.0| {{uc:{{#if:{{#var:lsubtype}}|{{#var:lsubtype}}|<strong class="error">No CC type provided.</strong>}}}} {{#if:{{#var:lver}}|{{#var:lver}}|<strong class="error">No CC version provided.</strong>}}}}];<!-- |
− | -->|pd= | + | -->|pd=as it was released into the public domain <!-- |
− | // | + | //Add more license templates here |
-->|agreement=under an agreement which can be found [{{{licenseURL}}} here]<!-- | -->|agreement=under an agreement which can be found [{{{licenseURL}}} here]<!-- | ||
− | -->|= | + | -->|=its copyright agreement may be different from that of MGP<!-- |
− | -->|#default={{#if:{{{copyright|}}}| | + | -->|#default=under {{#if:{{{copyright|}}}|{{#if:{{{licenseURL|}}}|[{{{licenseURL}}} {{{copyright}}}]|{{{copyright}}}}}}} }}{{#if:{{{contributors|}}}|; the contributor(s){{#ifeq:{{lc:{{{copyright|}}}}}|agreement|or copyright holder(s)}} is/are {{{contributors}}}|{{#if:{{{pagename|}}}|; the names of contributors can be found [{{fullurl:{{{interwiki}}}:{{{pagename}}}|action=history}} here]. |{{#ifeq:{{lc:{{{copyright|}}}}}|cc|{{#ifeq:{{lc:{{{lsubtype|}}}}}|zero||<strong class="error">CC licenses indicated except CC0 require attribution. Please provide a list, or a link to a list, of all contributors<</strong>}}}}}}}}.<wbr /><span style="white-space:nowrap;">This {{#var:noticetype}} may differ from its original source after being modified by editors on both sides.</span></td> |
</tr></table></includeonly><noinclude> | </tr></table></includeonly><noinclude> | ||
− | {{documentation}}[[Category:Page-top templates]]</noinclude> | + | {{documentation}}[[Category:Page-top prompt templates]]</noinclude> |
Latest revision as of 22:03, 4 September 2023
This template is rewritten on the basis of {{FromOther}}, using interwiki links to simplify parameter filling.
Because this template does not have a built-in compatibility judgment syntax, it is recommended to use Template:FromOther/wiki.
Parameters
interwiki
: required parameter, prefix for interwiki links, all available prefixes, see Special:interwiki. It also corresponds to the anonymous parameter1
.- Currently, only common site names (zhwp=Chinese Wikipedia, enwp=English Wikipedia, jawp=Japanese Wikipedia, metawikimedia=MetaWiki) and default protocols are written in the template, welcome to add them.
pagename
: Required parameter, the name of the referenced page.oldid
: optional parameter, the version id referenced from, which can be seen in the browser address bar of the historical version.sect
: optional parameter, you can use|sect=sect
to make the template mark only one paragraph (not the whole page).sectlink
: Optional parameter, pointing to the specific section name of the referenced page.
The following are things that are generally not used (
copyright
parameter
The following is quoted from the template documentation of {{FromOther}}. The only difference from the FromOther template is that this template defines the default protocol of common sites.
The copyright
parameter is the most complex parameter system in this template. Currently, it allows users to choose one of three authorization methods or to define a certificate themselves.
- CC protocol.
copyright=cc
.- When the CC protocol is selected, a protocol subclass (such as "BY", "BY-NC-SA", etc.) must be provided with the
lsubtype
parameter, and thelver
parameter must be used Provide a correct protocol version number. - The templates automatically generates protocol URLs. Do not use
licenseURL
. - The template has special support for CC0: the subclass of CC0 is
zero
, and the version number is1.0
.
- Public domain.
copyright=pd
.- Although it is generally not necessary to attribute the content cited from the public domain, if you know the author's name and the source URL, please attach it.
- (Special) agreement or authorization.
copyright=agreement
.- Use this option if you have a license from the copyright owner or author for Moegirlpedia (ie, not a generic license like CC). Please still tag the source and author as usual, and use the
licenseURL
parameter to provide the license file itself, or the address of a web page that proves the license exists.
- Custom authorization.
The copyright
parameter should be assigned the name of the authorization certificate you want to use (egcopyright=Apache Certificate
; uselicenseURL
to connect to the original address of the certificate. Link to the original authors according to the requirements of the authorization certificate.
Attribution
This template provides two methods of attribution: you can use contribURL
to link to a page listing all contributors (for wiki projects, this is usually the page for viewing historical versions), or you can use contributors
directly lists the names of all contributors or copyright holders. For co-authored sources such as quotes from Wiki projects and books compiled by a large number of editors, please use the former as much as possible (you can consider using Moegirl Library to include editor pages), because it is either impossible to list all contributors directly, or it will take up a lot of page space . Use the contributors
parameter only with few contributors or copyright holders.