Difference between revisions of "Template:LaPreferente/doc"

From blackwiki
Jump to navigation Jump to search
imported>Jonesey95
m (Fix Linter errors using AutoEd)
imported>Zyxw
(updates for use of Wikidata)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
 +
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata -->
 +
{{Uses Wikidata|P7359}}
 +
{{Lua|Module:EditAtWikidata}}
  
==Usage==
+
'''{{NAMESPACE}}:{{BASEPAGENAME}}''' displays an external link to an [[association football]] ([[soccer]]) player's profile at [https://www.lapreferente.com LaPreferente.com].
<code><nowiki>{{LaPreferente|id}}</nowiki></code>
 
:Where '''id''' is the number of the page.
 
  
<code><nowiki>{{LaPreferente|id|name}}</nowiki></code>
+
== Usage ==
:Where '''id''' is the number of the page (without the "J") and '''name''' is a variant display (different to the article's name).
+
; Unnamed parameters
 +
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | ''ID'' }}</code>
 +
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | ''ID'' | ''NAME'' }}</code>
 +
 
 +
; Named parameters
 +
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' }}</code>
 +
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' | name= ''NAME'' }}</code>
 +
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= ''ID'' | name= ''NAME'' | accessdate= ''DATE'' }}</code>
 +
 
 +
; Using [[Wikidata]] property [[d:Property:P7359|P7359]]
 +
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki></code>
 +
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | name= ''NAME'' }}</code>
  
 
==Examples==
 
==Examples==
  
 
=== Unnamed parameters ===
 
=== Unnamed parameters ===
''URLs:''
+
; Usage
* <code>[http://www.lapreferente.net/index.php?IDjugador=112727 http://www.lapreferente.net/index.php?IDjugador={{hilite|112727}}]</code>
+
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}} | 112727 | Cristian Salvador }}</code>
* <code>[http://www.lapreferente.net/J112727/.html http://www.lapreferente.net/J{{hilite|112727/}}.html]</code>
 
* <code>[http://www.lapreferente.net/J112727/cristian.html http://www.lapreferente.net/J{{hilite|112727/cristian}}.html]</code>
 
* <code>[http://www.lapreferente.net/J112727/real-sporting-b/cristian.html http://www.lapreferente.net/J{{hilite|112727/real-sporting-b/cristian}}.html]</code>
 
  
''Usage and output:''
+
; Output
* <code><nowiki>{{LaPreferente | 112727 | Cristian (Cristian Salvador González) }}</nowiki></code>
+
:* {{{{BASEPAGENAME}} | 112727 | Cristian Salvador }}
*: {{LaPreferente | 112727 | Cristian (Cristian Salvador González) }}
+
 
* <code><nowiki>{{LaPreferente | 112727/ | Cristian (Cristian Salvador González) }}</nowiki></code>
+
; Current URLs
*: {{LaPreferente | 112727/ | Cristian (Cristian Salvador González) }}
+
: [https://www.lapreferente.com/index.php?IDjugador=112727 https://www.lapreferente.com/index.php?IDjugador={{hilite|112727}}]
* <code><nowiki>{{LaPreferente | 112727/cristian | Cristian (Cristian Salvador González) }}</nowiki></code>
+
: [https://www.lapreferente.com/J112727/.html https://www.lapreferente.com/J{{hilite|112727}}/.html]
*: {{LaPreferente | 112727/cristian | Cristian (Cristian Salvador González) }}
+
: [https://www.lapreferente.com/J112727/cristian.html https://www.lapreferente.com/J{{hilite|112727}}/cristian.html]
* <code><nowiki>{{LaPreferente | 112727/real-sporting-b/cristian | Cristian (Cristian Salvador González) }}</nowiki></code>
+
: [https://www.lapreferente.com/J112727/real-sporting-b/cristian.html https://www.lapreferente.com/J{{hilite|112727}}/real-sporting-b/cristian.html]
*: {{LaPreferente | 112727/real-sporting-b/cristian | Cristian (Cristian Salvador González) }}
+
 
 +
; Former URLs
 +
: <nowiki>http://</nowiki>www.lapreferente.net/index.php?IDjugador={{hilite|112727}}
 +
: <nowiki>http://</nowiki>www.lapreferente.net/J{{hilite|112727}}/.html
 +
: <nowiki>http://</nowiki>www.lapreferente.net/J{{hilite|112727}}/cristian.html ([https://web.archive.org/web/20170108191610/http://www.lapreferente.net/J112727/cristian.html archive])
 +
: <nowiki>http://</nowiki>www.lapreferente.net/J{{hilite|112727}}/real-sporting-b/cristian.html ([https://web.archive.org/web/20170210135710/http://www.lapreferente.net/J112727/real-sporting-b/cristian.html archive])
  
 
=== Named parameters ===
 
=== Named parameters ===
''URLs:''
+
; Usage
* <code>[http://www.lapreferente.net/index.php?IDjugador=211345 http://www.lapreferente.net/index.php?IDjugador={{hilite|211345}}]</code>
+
: <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | id= 211345 | name= Juan Moreno | accessdate= {{CURRENTDAY}}&nbsp;{{CURRENTMONTHNAME}}&nbsp;{{CURRENTYEAR}} }}</code>
* <code>[http://www.lapreferente.net/J211345/.html http://www.lapreferente.net/J{{hilite|211345/}}.html]</code>
+
 
* <code>[http://www.lapreferente.net/J211345/juan-moreno.html http://www.lapreferente.net/J{{hilite|211345/juan-moreno}}.html]</code>
+
; Output
* <code>[http://www.lapreferente.net/J211345C6792/atletico-de-madrid/juan-moreno.html http://www.lapreferente.net/J{{hilite|211345C6792/atletico-de-madrid/juan-moreno}}.html]</code>
+
: {{{{BASEPAGENAME}} | id= 211345 | name= Juan Moreno | accessdate= {{CURRENTDAY}}&nbsp;{{CURRENTMONTHNAME}}&nbsp;{{CURRENTYEAR}} }}
 +
 
 +
; Current URLs
 +
: [https://www.lapreferente.com/index.php?IDjugador=211345 https://www.lapreferente.com/index.php?IDjugador={{hilite|211345}}]
 +
: [https://www.lapreferente.com/J211345/.html https://www.lapreferente.com/J{{hilite|211345}}/.html]
 +
: [https://www.lapreferente.com/J211345/juan-moreno.html https://www.lapreferente.com/J{{hilite|211345}}/juan-moreno.html]
 +
: [https://www.lapreferente.com/J211345C6792/atletico-de-madrid/juan-moreno.html https://www.lapreferente.com/J{{hilite|211345}}C6792/atletico-de-madrid/juan-moreno.html]
 +
 
 +
; Former URLs
 +
: <nowiki>http://</nowiki>www.lapreferente.net/index.php?IDjugador={{hilite|211345}}
 +
: <nowiki>http://</nowiki>www.lapreferente.net/J{{hilite|211345}}/.html
 +
: <nowiki>http://</nowiki>www.lapreferente.net/J{{hilite|211345}}/juan-moreno.html
 +
: <nowiki>http://</nowiki>www.lapreferente.net/J{{hilite|211345}}C6792/atletico-de-madrid/juan-moreno.html
 +
 
 +
=== No parameters and Wikidata property not defined ===
 +
; Usage
 +
: <code><nowiki>* {{</nowiki>{{BASEPAGENAME}}}}</code>
 +
 
 +
; Output
 +
:* {{ {{BASEPAGENAME}} }}
  
''Usage and output:''
+
== TemplateData ==
* <code><nowiki>{{LaPreferente |id= 211345 |name= Juan Moreno (Juan Moreno Fernández) |accessdate=</nowiki>{{CURRENTDAY}}&nbsp;{{CURRENTMONTHNAME}}&nbsp;{{CURRENTYEAR}}<nowiki> }}</nowiki></code>
+
{{TemplateData header}}
*: {{LaPreferente |id= 211345 |name= Juan Moreno (Juan Moreno Fernández)|accessdate={{CURRENTDAY}}&nbsp;{{CURRENTMONTHNAME}}&nbsp;{{CURRENTYEAR}} }}
+
<templatedata>
* <code><nowiki>{{LaPreferente |id= 211345/ |name= Juan Moreno (Juan Moreno Fernández) |accessdate=</nowiki>{{CURRENTDAY}}&nbsp;{{CURRENTMONTHNAME}}&nbsp;{{CURRENTYEAR}}<nowiki> }}</nowiki></code>
+
{
*: {{LaPreferente |id= 211345/ |name= Juan Moreno (Juan Moreno Fernández|accessdate={{CURRENTDAY}}&nbsp;{{CURRENTMONTHNAME}}&nbsp;{{CURRENTYEAR}}) }}
+
  "description": "This template displays an external link to an association football (soccer) player's profile at LaPreferente.com.",
* <code><nowiki>{{LaPreferente |id= 211345/juan-moreno |name= Juan Moreno (Juan Moreno Fernández) |accessdate=</nowiki>{{CURRENTDAY}}&nbsp;{{CURRENTMONTHNAME}}&nbsp;{{CURRENTYEAR}}<nowiki> }}</nowiki></code>
+
  "params": {
*: {{LaPreferente |id= 211345/juan-moreno |name= Juan Moreno (Juan Moreno Fernández)|accessdate={{CURRENTDAY}}&nbsp;{{CURRENTMONTHNAME}}&nbsp;{{CURRENTYEAR}} }}
+
    "id": {
* <code><nowiki>{{LaPreferente |id= 211345C6792/atletico-de-madrid/juan-moreno |name= Juan Moreno (Juan Moreno Fernández) |accessdate=</nowiki>{{CURRENTDAY}}&nbsp;{{CURRENTMONTHNAME}}&nbsp;{{CURRENTYEAR}}<nowiki> }}</nowiki></code>
+
      "label": "ID",
*: {{LaPreferente |id= 211345C6792/atletico-de-madrid/juan-moreno |name= Juan Moreno (Juan Moreno Fernández)|accessdate={{CURRENTDAY}}&nbsp;{{CURRENTMONTHNAME}}&nbsp;{{CURRENTYEAR}} }}
+
      "aliases": ["1"],
 +
      "description": "The \"id\" parameter (or unnamed parameter \"1\") should contain the ID portion of the URL. Example: 112727 is the ID portion of https://www.lapreferente.com/index.php?IDjugador=112727 or https://www.lapreferente.com/J112727/real-sporting-b/cristian.html. This parameter is optional if Wikidata property P7359 exists, but required if not.",
 +
      "type": "number",
 +
      "required": false,
 +
      "default": "Wikidata property P7359"
 +
    },
 +
    "name": {
 +
      "label": "Name",
 +
      "aliases": ["2"],
 +
      "description": "The \"name\" parameter (or unnamed parameter \"2\") may be used to specify the link text, which should be the name of the player. This parameter is optional; it defaults to the Wikipedia article name, without any disambiguation such as \"(footballer)\" or \"(soccer)\".",
 +
      "type": "string",
 +
      "required": false,
 +
      "default": "{{PAGENAMEBASE}}"
 +
    },
 +
    "accessdate": {
 +
      "label": "Access Date",
 +
      "description": "The \"accessdate\" parameter may be used to specify the date when the URL was last accessed. This parameter is optional.",
 +
      "type": "date",
 +
      "required": false
 +
    }
 +
  },
 +
  "paramOrder": [
 +
    "id",
 +
    "name",
 +
    "accessdate"
 +
  ]
 +
}
 +
</templatedata>
  
==See also==
+
== See also ==
 
* [[Template:BDFutbol]]
 
* [[Template:BDFutbol]]
 
* [[Template:BDFutbol manager]]
 
* [[Template:BDFutbol manager]]
 
* [[Template:Futbolme]]
 
* [[Template:Futbolme]]
  
<includeonly>
+
<includeonly>{{Sandbox other||
 +
<!-- Categories below this line; interwikis at Wikidata -->
 
[[Category:Association football external link templates]]
 
[[Category:Association football external link templates]]
 
[[Category:People and person external link templates]]
 
[[Category:People and person external link templates]]
</includeonly>
+
[[Category:External link templates with accessdate parameter]]
 +
[[Category:External link templates using Wikidata]]
 +
}}</includeonly>

Latest revision as of 15:05, 29 March 2020

Template:Uses Wikidata

Template:LaPreferente displays an external link to an association football (soccer) player's profile at LaPreferente.com.

Usage

Unnamed parameters
{{LaPreferente | ID }}
{{LaPreferente | ID | NAME }}
Named parameters
{{LaPreferente | id= ID }}
{{LaPreferente | id= ID | name= NAME }}
{{LaPreferente | id= ID | name= NAME | accessdate= DATE }}
Using Wikidata property P7359
{{LaPreferente}}
{{LaPreferente | name= NAME }}

Examples

Unnamed parameters

Usage
* {{LaPreferente | 112727 | Cristian Salvador }}
Output
  • Cristian Salvador at LaPreferente.com (in Spanish)Script error: No such module "EditAtWikidata".
Current URLs
https://www.lapreferente.com/index.php?IDjugador=112727
https://www.lapreferente.com/J112727/.html
https://www.lapreferente.com/J112727/cristian.html
https://www.lapreferente.com/J112727/real-sporting-b/cristian.html
Former URLs
http://www.lapreferente.net/index.php?IDjugador=112727
http://www.lapreferente.net/J112727/.html
http://www.lapreferente.net/J112727/cristian.html (archive)
http://www.lapreferente.net/J112727/real-sporting-b/cristian.html (archive)

Named parameters

Usage
{{LaPreferente | id= 211345 | name= Juan Moreno | accessdate= 18 August 2026 }}
Output
Juan Moreno at LaPreferente.com (in Spanish). Retrieved 18 August 2026.Script error: No such module "EditAtWikidata".
Current URLs
https://www.lapreferente.com/index.php?IDjugador=211345
https://www.lapreferente.com/J211345/.html
https://www.lapreferente.com/J211345/juan-moreno.html
https://www.lapreferente.com/J211345C6792/atletico-de-madrid/juan-moreno.html
Former URLs
http://www.lapreferente.net/index.php?IDjugador=211345
http://www.lapreferente.net/J211345/.html
http://www.lapreferente.net/J211345/juan-moreno.html
http://www.lapreferente.net/J211345C6792/atletico-de-madrid/juan-moreno.html

No parameters and Wikidata property not defined

Usage
* {{LaPreferente}}
Output

TemplateData

This is the TemplateData documentation for this template used by VisualEditor and other tools; see the monthly parameter usage report for this template.

TemplateData for LaPreferente

This template displays an external link to an association football (soccer) player's profile at LaPreferente.com.

Template parameters

ParameterDescriptionTypeStatus
IDid 1

The "id" parameter (or unnamed parameter "1") should contain the ID portion of the URL. Example: 112727 is the ID portion of https://www.lapreferente.com/index.php?IDjugador=112727 or https://www.lapreferente.com/J112727/real-sporting-b/cristian.html. This parameter is optional if Wikidata property P7359 exists, but required if not.

Default
Wikidata property P7359
Numberoptional
Namename 2

The "name" parameter (or unnamed parameter "2") may be used to specify the link text, which should be the name of the player. This parameter is optional; it defaults to the Wikipedia article name, without any disambiguation such as "(footballer)" or "(soccer)".

Default
{{PAGENAMEBASE}}
Stringoptional
Access Dateaccessdate

The "accessdate" parameter may be used to specify the date when the URL was last accessed. This parameter is optional.

Dateoptional

See also