Content deleted Content added
replacing Template:Uncategorized with Category:The Wikipedia Library |
m run-on sentence/punctuation |
||
(19 intermediate revisions by the same user not shown) | |||
Line 1:
{{template shortcut|TWLaccess|twlac}}
{{lua|Module:String}}
{{never substitute}}
This template allows you to add a link to a resource accessed via [[Wikipedia:The Wikipedia Library|The Wikipedia Library]]. The template's output is only visible in [[Wikipedia:Mainspace|mainspace]] (article namespace) for [[Wikipedia:Autoconfirmed|autoconfirmed]] users; The Wikipedia Library is only accessible to [[Wikipedia:Extended-confirmed|extended-confirmed]] users (ie. users who have made 500+ edits and have had an account for 30+ days), so [[Wikipedia:UNREGISTERED|unregistered]] users and non-autoconfirmed users are unlikely to have any use for the TWL link. In other namespaces, the template is visible for everyone.
Double-check links produced by this template, especially before adding them to [[Wikipedia:Mainspace|mainspace]] citations; if you find an error, or the template behaves unexpectedly, please report this at [[Template talk:Wikipedia Library access|the talk page]]!
===Parameters===
* '''1''', aliases '''url''' and '''link''': takes '''''either''''' a regular URL (in which case it will convert the URL to TWL format, ie. from <code>www.example.com</code> to <code>www-example-com.wikipedialibrary.idm.oclc.org</code>) '''''or''''' a full Wikipedia Library source URL (in which case it won't modify the URL)
*
*
* '''jstor''': takes a JSTOR reference number and formats it as a Wikipedia Library JSTOR stable URL
* '''gale''': takes a [[Gale (publisher)|Gale]] Document Number and formats it as a Wikipedia Library Gale stable URL. Enter the number ''without'' the Gale prefix, ie. {{xt|gale{{=}}A613605069}} not {{!xt|gale{{=}}GALE{{!}}A613605069}}. ''({{as of|2025|08}} this parameter is still experimental, so make sure to check that the resulting link is functional!)''
* '''date''': takes a date as of which the source was or wasn't accessible. This date isn't affected by date format templates, so it will be displayed exactly as input
If no parameters are defined, or only '''2''' / '''access''' is defined, the template defaults to plain text (other than a wikilink to [[Wikipedia:The Wikipedia Library|The Wikipedia Library]]).
===Examples===
{{markup
|<syntaxhighlight lang="wikitext" copy>{{Wikipedia Library access}}</syntaxhighlight>|{{Wikipedia Library access}}
|<syntaxhighlight lang="wikitext" copy>{{Wikipedia Library access|https://www.example.com}}</syntaxhighlight>|{{Wikipedia Library access|https://www.example.com}}
|<syntaxhighlight lang="wikitext" copy>{{TWLaccess|doi=10.
|<syntaxhighlight lang="wikitext" copy>{{twlac|jstor=4486062}}</syntaxhighlight>|{{twlac|jstor=4486062}}
|<syntaxhighlight lang="wikitext" copy>{{twlac|gale=A613605069}}</syntaxhighlight>|{{twlac|gale=A613605069}}
|<syntaxhighlight lang="wikitext" copy>{{twlac|jstor=4486062|date=August 2025}}</syntaxhighlight>|{{twlac|jstor=4486062|date=August 2025}}
|<syntaxhighlight lang="wikitext" copy>{{twlac|https://www.example.com|partial}}</syntaxhighlight>|{{twlac|https://www.example.com|partial}}
|<syntaxhighlight lang="wikitext" copy>{{twlac|access=no}}</syntaxhighlight>|{{twlac|access=no}}
|<syntaxhighlight lang="wikitext" copy>{{twlac|access=none}}</syntaxhighlight>|{{twlac|access=none}}
|<syntaxhighlight lang="wikitext" copy>{{twlac|access=none|date=August 2025}}</syntaxhighlight>|{{twlac|access=none|date=August 2025}}
|<syntaxhighlight lang="wikitext" copy><ref>This is a citation, which might be formatted with a citation template. {{TWLaccess|https://www.example.com}}</ref></syntaxhighlight>|<ref>This is a citation, which might be formatted with a citation template. {{TWLaccess|https://www.example.com}}</ref>
}}
====A real example====
{{markup
|<syntaxhighlight lang="wikitext"><ref>{{cite book
}}▼
=== TemplateData ===
{{TemplateData header}}
<templatedata>
{
"description": "Indicates that a source is available via The Wikipedia Library. Hidden for users who are not autoconfirmed.",
"params": {
"1": {
"aliases": [
"url",
"link"
],
"type": "url",
"description": "source URL"
},
"2": {
"aliases": [
"access"
],
"type": "line",
"default": "full",
"description": "access type"
},
"doi": {
"type": "line",
"description": "source DOI"
},
"jstor": {
"type": "number",
"description": "source JSTOR ID"
},
"gale": {
"type": "line",
"description": "Gale Document Number"
},
"date": {
"type": "line",
"description": "'as of' date"
}
},
"paramOrder": [
"1",
"2",
"doi",
"jstor",
"gale",
"date"
]
</templatedata>
=== References ===
{{reflist}}
<includeonly>{{Sandbox other||
<!-- Categories below this line -->
[[Category:The Wikipedia Library]]
[[Category:Citation templates]]
}}</includeonly>
|