Difference between revisions of "Module:PHL sports team/PBA/doc"

From blackwiki
Jump to navigation Jump to search
blackwiki>McVahl
m (7 revisions imported)
 
(3 intermediate revisions by one other user not shown)
Line 12: Line 12:
 
For teams whose article is [[WP:DAB|disambiguated]]:
 
For teams whose article is [[WP:DAB|disambiguated]]:
 
<pre>
 
<pre>
["TEAM CODE"] = {"Team full name", "Team short name", a="Disambig article title"},</pre>
+
["TEAM CODE"] = {"Team full name", "Team short name", dab="Disambiguated title"},</pre>
  
For teams with multiple names:
+
For teams with multiple or historical names (where {{code|XXXX}} represents the 4-digit start year and {{code|YYYY}} represents the 4-digit end year):
 
<pre>
 
<pre>
 
["TEAM CODE"] = {"Team full name", "Team short name",
 
["TEAM CODE"] = {"Team full name", "Team short name",
   ["NAME1"] = "Name 1",
+
   ["XXXXthruYYYY"] = "Name 1",
   ["NAME2"] = "Name 2",
+
   ["XXXXthruYYYY"] = "Name 2",
   ["NAME3"] = "Name 3",
+
   ["XXXXthruYYYY"] = "Name 3",
 
   ..
 
   ..
   ["NAMEn"] = "Name n",
+
   ["XXXXthruYYYY"] = "Name n",
 
},</pre>
 
},</pre>
  
Line 31: Line 31:
 
== Advanced structure ==
 
== Advanced structure ==
 
{{code|Team full name}} must match to the team's article title. For case of [[WP:DAB|disambiguation]], for example:
 
{{code|Team full name}} must match to the team's article title. For case of [[WP:DAB|disambiguation]], for example:
<pre>ALA = {"Alaska Aces", "Alaska", a = "Alaska Aces (PBA)"},"</pre>
+
<pre>ALA = {"Alaska Aces", "Alaska", dab = "PBA"},"</pre>
 
+
Sample demo: {{demo-inline|<nowiki>{{PBA team|ALA}}</nowiki>}}
Above will result to a red link, only if entry requires link to season article:
+
Instead of linking to ambiguous article [[Alaska Aces]], the {{code|dab}} parameter will appropriately link it to [[Alaska Aces (PBA)]].
* e.g. <code><nowiki>{{PBA team|ALA|season=2019}}</nowiki></code> → [[2019 Alaska Aces (PBA) season|Alaska Aces]], which links to [[2019 Alaska Aces (PBA) season]]
 
 
 
To resolve this issue, add {{code|s}} element to override the season team article title baseline:
 
<pre>ALA = {"Alaska Aces", "Alaska", a = "Alaska Aces (PBA)", s = "Alaska Aces" },</pre>
 
Then, {{demo-inline|<nowiki>{{PBA team|ALA|season=2019}}</nowiki>}}, now links to [[2019 Alaska Aces season]]
 
  
 +
== Test table ==
 +
{{#ifeq:{{SUBPAGENAME}}|sandbox
 +
|{{#invoke:PHL sports team/testtable|main|league=PBA/sandbox|tname=PBA team}}
 +
|{{#invoke:PHL sports team/testtable|main|league=PBA|tname=PBA team}}
 +
}}
 
<includeonly>{{sandbox other | |
 
<includeonly>{{sandbox other | |
 
<!-- Categories below this line, please; interwikis at Wikidata -->
 
<!-- Categories below this line, please; interwikis at Wikidata -->
  
 
}}</includeonly>
 
}}</includeonly>

Latest revision as of 08:20, 27 September 2020


This is the data module used by Module:PHL sports team.

Data structure

Most lines will be of the following form:

["TEAM CODE"] = {"Team full name", "Team short name"},

For teams whose article is disambiguated:

["TEAM CODE"] = {"Team full name", "Team short name", dab="Disambiguated title"},

For teams with multiple or historical names (where XXXX represents the 4-digit start year and YYYY represents the 4-digit end year):

["TEAM CODE"] = {"Team full name", "Team short name",
  ["XXXXthruYYYY"] = "Name 1",
  ["XXXXthruYYYY"] = "Name 2",
  ["XXXXthruYYYY"] = "Name 3",
  ..
  ["XXXXthruYYYY"] = "Name n",
},

Aliasing – a team having more than one code is also supported:

["ALIAS CODE"] = "TEAM CODE",

Trailing comma in each element is significant.

Advanced structure

Team full name must match to the team's article title. For case of disambiguation, for example:

ALA = {"Alaska Aces", "Alaska", dab = "PBA"},"

Sample demo: {{PBA team|ALA}}Template:PBA team Instead of linking to ambiguous article Alaska Aces, the dab parameter will appropriately link it to Alaska Aces (PBA).

Test table

CodeUsageOutput
ALA{{PBA team|ALA}}Template:PBA team
{{PBA team|ALA|short}}Template:PBA team
{{PBA team|ALA|name=Custom Team Name}}Template:PBA team
AMA{{PBA team|AMA}}Template:PBA team
{{PBA team|AMA|short}}Template:PBA team
{{PBA team|AMA|name=Custom Team Name}}Template:PBA team
BKW{{PBA team|BKW}}Template:PBA team
{{PBA team|BKW|short}}Template:PBA team
{{PBA team|BKW|name=Custom Team Name}}
or {{PBA team|BKW|yr=2014}} (2014–2019)
Template:PBA team
or Template:PBA team (2014–2019)
CEU{{PBA team|CEU}}Template:PBA team
{{PBA team|CEU|short}}Template:PBA team
{{PBA team|CEU|name=Custom Team Name}}
or {{PBA team|CEU|yr=2020}} (2020–2020)
Template:PBA team
or Template:PBA team (2020–2020)
COL{{PBA team|COL}}Template:PBA team
{{PBA team|COL|short}}Template:PBA team
{{PBA team|COL|name=Custom Team Name}}
or {{PBA team|COL|yr=2018}} (2018–2019)
Template:PBA team
or Template:PBA team (2018–2019)
DIL{{PBA team|DIL}}Template:PBA team
{{PBA team|DIL|short}}Template:PBA team
{{PBA team|DIL|name=Custom Team Name}}Template:PBA team
DLS{{PBA team|DLS}}Template:PBA team
{{PBA team|DLS|short}}Template:PBA team
{{PBA team|DLS|name=Custom Team Name}}
or {{PBA team|DLS|yr=2020}} (2020–2020)
Template:PBA team
or Template:PBA team (2020–2020)
END{{PBA team|END}}Template:PBA team
{{PBA team|END|short}}Template:PBA team
{{PBA team|END|name=Custom Team Name}}
or {{PBA team|END|yr=2019}} (2019–2020)
Template:PBA team
or Template:PBA team (2019–2020)
FEU{{PBA team|FEU}}Template:PBA team
{{PBA team|FEU|short}}Template:PBA team
{{PBA team|FEU|name=Custom Team Name}}
or {{PBA team|FEU|yr=2020}} (2020–2020)
Template:PBA team
or Template:PBA team (2020–2020)
GSM{{PBA team|GSM}}Template:PBA team
{{PBA team|GSM|short}}Template:PBA team
{{PBA team|GSM|name=Custom Team Name}}Template:PBA team
LET{{PBA team|LET}}Template:PBA team
{{PBA team|LET|short}}Template:PBA team
{{PBA team|LET|name=Custom Team Name}}
or {{PBA team|LET|yr=2020}} (2020–2020)
Template:PBA team
or Template:PBA team (2020–2020)
MAG{{PBA team|MAG}}Template:PBA team
{{PBA team|MAG|short}}Template:PBA team
{{PBA team|MAG|name=Custom Team Name}}Template:PBA team
MAP{{PBA team|MAP}}Template:PBA team
{{PBA team|MAP|short}}Template:PBA team
{{PBA team|MAP|name=Custom Team Name}}Template:PBA team
MAU{{PBA team|MAU}}Template:PBA team
{{PBA team|MAU|short}}Template:PBA team
{{PBA team|MAU|name=Custom Team Name}}
or {{PBA team|MAU|yr=2020}} (2020–2020)
Template:PBA team
or Template:PBA team (2020–2020)
MER{{PBA team|MER}}Template:PBA team
{{PBA team|MER|short}}Template:PBA team
{{PBA team|MER|name=Custom Team Name}}Template:PBA team
NLX{{PBA team|NLX}}Template:PBA team
{{PBA team|NLX|short}}Template:PBA team
{{PBA team|NLX|name=Custom Team Name}}Template:PBA team
NOR{{PBA team|NOR}}Template:PBA team
{{PBA team|NOR|short}}Template:PBA team
{{PBA team|NOR|name=Custom Team Name}}Template:PBA team
PHX{{PBA team|PHX}}Template:PBA team
{{PBA team|PHX|short}}Template:PBA team
{{PBA team|PHX|name=Custom Team Name}}
or {{PBA team|PHX|yr=2016}} (2016–2018)
or {{PBA team|PHX|yr=2019}} (2019–2019)
Template:PBA team
or Template:PBA team (2016–2018)
or Template:PBA team (2019–2019)
ROS{{PBA team|ROS}}Template:PBA team
{{PBA team|ROS|short}}Template:PBA team
{{PBA team|ROS|name=Custom Team Name}}Template:PBA team
SMB{{PBA team|SMB}}Template:PBA team
{{PBA team|SMB|short}}Template:PBA team
{{PBA team|SMB|name=Custom Team Name}}Template:PBA team
SSC{{PBA team|SSC}}Template:PBA team
{{PBA team|SSC|short}}Template:PBA team
{{PBA team|SSC|name=Custom Team Name}}
or {{PBA team|SSC|yr=2020}} (2020–2020)
Template:PBA team
or Template:PBA team (2020–2020)
TIP{{PBA team|TIP}}Template:PBA team
{{PBA team|TIP|short}}Template:PBA team
{{PBA team|TIP|name=Custom Team Name}}Template:PBA team
TNT{{PBA team|TNT}}Template:PBA team
{{PBA team|TNT|short}}Template:PBA team
{{PBA team|TNT|name=Custom Team Name}}
or {{PBA team|TNT|yr=2016}} (2016–2019)
Template:PBA team
or Template:PBA team (2016–2019)
UST{{PBA team|UST}}Template:PBA team
{{PBA team|UST|short}}Template:PBA team
{{PBA team|UST|name=Custom Team Name}}
or {{PBA team|UST|yr=2019}} (2019–2019)
or {{PBA team|UST|yr=2020}} (2020–2020)
Template:PBA team
or Template:PBA team (2019–2019)
or Template:PBA team (2020–2020)
{{{team1}}}{{PBA team|{{{team1}}}}}Template:PBA team
{{PBA team|{{{team1}}}|short}}Template:PBA team
{{PBA team|{{{team1}}}|name=Custom Team Name}}Template:PBA team
XYZ{{PBA team|XYZ}}Template:PBA team
{{PBA team|XYZ|short}}Template:PBA team
{{PBA team|XYZ|name=Custom Team Name}}Template:PBA team