Difference between revisions of "Template:Wikipedia/doc"

From Second Life Wiki
Jump to navigation Jump to search
(→‎Examples: Add some real examples for Wikipedia)
m (One of the rare cases where I *know* this template is, indeed, being used quite a lot)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Languages|Template:Wikipedia}}
{{Languages|Template:Wikipedia}}
{{Documentation subpage}}
{{Documentation subpage}}
This template is useful to simply create link to Wikipedia.
{{High use}}
This template is useful to simply create a link to Wikipedia.


=== Usage ===
=== Usage ===
{{Ambox|type=notice|text=This template is in flux; currently, a small Wikipedia icon is always shown to explain that the link is ''external'' to the SL Wiki. This might change in the future}}
{{Ambox|type=notice|text=This template is in flux; currently, a small Wikipedia icon is always shown to explain that the link is ''external'' to the SL Wiki. This might change in the future}}
* First parameter (mandatory): the Wikipedia linguistic edition code;
 
*: it is the <var style="color:#080">xx</var> in URL "<nowiki>//</nowiki><var style="color:#080">xx</var>.wikipedia.org/wiki/<var style="color:#080">Pagename</var>", or any other '''interwiki code''' recognized by English Wikipedia);
* First parameter (mandatory): the actual pagename on Wikipedia (or in the target wiki of the interwiki code specified in the first parameter)
*: When this required parameter is empty, it implies the English Wikipedia edition (so the empty value is equivalent to the <code>en</code> value).
* Second parameter: the actual pagename on Wikipedia (or in the target wiki of the interwiki code specified in the first parameter)
*: it is the <var style="color:#080">Pagename</var> in URL "<nowiki>//</nowiki><var style="color:#080">xx</var>.wikipedia.org/wiki/<var style="color:#080">Pagename</var>");
*: it is the <var style="color:#080">Pagename</var> in URL "<nowiki>//</nowiki><var style="color:#080">xx</var>.wikipedia.org/wiki/<var style="color:#080">Pagename</var>");
*: note however that this parameter should not be URL-encoded (with overlong <code>%<var style="color:#080">NN</var>%<var style="color:#080">NN</var></code> sequences) but should readable (in native UTF-8), also preferably with spaces rather than underscores between words.
*: note however that this parameter should not be URL-encoded (with overlong <code>%<var style="color:#080">NN</var>%<var style="color:#080">NN</var></code> sequences) but should readable (in native UTF-8), also preferably with spaces rather than underscores between words.
* Third parameter: the text to display with the link. If unset, the template displays the title of the page (second parameter).
* Second parameter: the text to display with the link. If unset, the template displays the title of the page (first parameter).


There are also three named parameters which define whether some parts of the link are shown:
There are also three named parameters which define whether some parts of the link are shown:
Line 17: Line 16:
* <code>icon</code>: if set to <code>no</code>, the template doesn't display the Wikipedia icon;
* <code>icon</code>: if set to <code>no</code>, the template doesn't display the Wikipedia icon;
*: any other value (or if the parameter is not specified) will display this icon.
*: any other value (or if the parameter is not specified) will display this icon.
* <code>link</code>: if set to <code>no</code>, the template doesn't display an active link to the Wikipedia article (the link may still be visible when hovering the icon, if there's one);
*: any other value (or if the parameter is not specified) will display the active link.
* <code>text</code>: if set to <code>no</code>, the template doesn't display the sentence "on Wikipedia" (which is translated according to the language of the current page on this wiki, but not the language of the target Wikipedia);
*: any other value (or if the parameter is not specified) will display the extra text.


=== Examples ===
=== Examples ===
* <tt><nowiki>{{Wikipedia|Second Life|Second Life}}</nowiki></tt> ==> {{Wikipedia|Second Life|Second Life}}
{{Markup2|m=<nowiki>{{Wikipedia|Second Life|Second Life}}</nowiki>|r={{Wikipedia|Second Life|Second Life}}
* <tt><nowiki>{{Wikipedia|lang=it|OpenStreetMap}}</nowiki></tt> ==> {{Wikipedia|lang=it|OpenStreetMap}}
|m1=<nowiki>{{Wikipedia|lang=it|OpenStreetMap|OSM}}</nowiki>|r1={{Wikipedia|lang=it|OpenStreetMap|OSM}
* <tt><nowiki>{{Wikipedia|Category:Wikipedia_village_pump|text=no}}</nowiki></tt> ==> {{Wikipedia|Category:Wikipedia_village_pump|text=no}}
|m2=<nowiki>{{Wikipedia|Category:Wikipedia village pump}}</nowiki>|r2={{Wikipedia|Category:Wikipedia village pump}}
}}


=== See also ===
=== See also ===
* The other, similar [[Template:WikiIcon]] does not add extra text ("on Wikipedia"). Also, by default it does exactly what it says in the title: draws an icon.
* The other, similar [[Template:WikiIcon]], by default, does exactly what it says: draws an icon.
* [[Template:Wiki]] does approximately the same thing as this template (may be merged in the future)


<includeonly>
<includeonly>

Latest revision as of 02:07, 26 January 2024

exclamation mark

Note: This template is used on a lot of pages. In order not to put too much load on the servers, edits should be kept to a bare minimum.
Please discuss proposed changes on the talk page first.
Editing a template causes all pages that use the template to be re-rendered. If the Template is used often, this can put a lot of load on the servers since it fills up the job queue. [statistics]

This template is useful to simply create a link to Wikipedia.

Usage

  • First parameter (mandatory): the actual pagename on Wikipedia (or in the target wiki of the interwiki code specified in the first parameter)
    it is the Pagename in URL "//xx.wikipedia.org/wiki/Pagename");
    note however that this parameter should not be URL-encoded (with overlong %NN%NN sequences) but should readable (in native UTF-8), also preferably with spaces rather than underscores between words.
  • Second parameter: the text to display with the link. If unset, the template displays the title of the page (first parameter).

There are also three named parameters which define whether some parts of the link are shown:

  • lang: language for the destination page (default: current language)
  • icon: if set to no, the template doesn't display the Wikipedia icon;
    any other value (or if the parameter is not specified) will display this icon.

Examples

{{Markup2|m={{Wikipedia|Second Life|Second Life}}|r="Wikipedia logo"Second Life |m1={{Wikipedia|lang=it|OpenStreetMap|OSM}}|r1="Wikipedia logo" [https://it.wikipedia.org/wiki/OpenStreetMap OSM} ]

See also

  • The other, similar Template:WikiIcon, by default, does exactly what it says: draws an icon.
  • Template:Wiki does approximately the same thing as this template (may be merged in the future)