Difference between revisions of "Template:IS link"

From QBWiki
Jump to navigation Jump to search
(Created page with "{{#ifeq:{{{1}}} |154|2608 }}{{#ifeq:{{{1}}} |157A|2708 }}{{#ifeq:{{{1}}} |158|2709 }}{{#ifeq:{{{1}}} |159A|2710 }}{{#ifeq:{{{1}}} |160|2711 }}{{#ifeq:{{{1}}} |161A|2712 }}{{#i...")
 
m
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#ifeq:{{{1}}}
+
{{#if:{{{1|}}}|{{#vardefine:series|{{#explode:{{{1|}}}|-|1}}}}{{#if:{{#var:series}}
|154|2608
+
|[https://www.naqt.com/stats/packet-set/team.jsp?playoffs=false&packet_set_id={{IS map|{{#var:series}}}} {{{1}}}]
}}{{#ifeq:{{{1}}}
+
|[https://www.naqt.com/stats/packet-set/team.jsp?playoffs=false&packet_set_id={{IS map|{{{1}}}}} IS-{{{1}}}]
|157A|2708
+
}}}}<noinclude>
}}{{#ifeq:{{{1}}}
+
Given the name of an IS set as [https://regex101.com/r/vHpXf3/1 <nowiki>/^(IS-)[0-9]{0,2}([24680]+|[13579]+A)$/</nowiki>] (either the full name or just the number), return a link to the NAQT page for that set. The mechanism by which this is accomplished is terrible and hacky and relies on retrieving "packet_set_id" values from [[Template:IS map]], which is manually populated.
|158|2709
 
}}{{#ifeq:{{{1}}}
 
|159A|2710
 
}}{{#ifeq:{{{1}}}
 
|160|2711
 
}}{{#ifeq:{{{1}}}
 
|161A|2712
 
}}{{#ifeq:{{{1}}}
 
|162|2713
 
}}{{#ifeq:{{{1}}}
 
|163A|2714
 
}}{{#ifeq:{{{1}}}
 
|164|2715
 
}}{{#ifeq:{{{1}}}
 
|165A|2716
 
}}{{#ifeq:{{{1}}}
 
|203A|3535
 
}}{{#ifeq:{{{1}}}
 
|204|3536
 
}}{{#ifeq:{{{1}}}
 
|205A|3537
 
}}{{#ifeq:{{{1}}}
 
|206|3538
 
}}{{#ifeq:{{{1}}}
 
|207A|3539
 
}}{{#ifeq:{{{1}}}
 
|208|3540
 
}}{{#ifeq:{{{1}}}
 
|209A|3541
 
}}{{#ifeq:{{{1}}}
 
|210|3542
 
}}{{#ifeq:{{{1}}}
 
|211A|3543
 
}}<noinclude>
 
A centralized map from IS number to the "packet_set_id" on the NAQT website. Used as part of a hacky scheme for producing a link to the results page for a given IS set.
 
  
{| class=wikitable
+
{| class="wikitable"
! IS set
+
! Input
! ID
+
! Output
! link
 
 
|-
 
|-
|203A
+
|
|{{IS link|203A}}
+
<nowiki>
|[https://www.naqt.com/stats/packet-set/team.jsp?playoffs=false&packet_set_id={{IS link|203A}} IS 203A]
+
{{IS link|203A}}
|}
+
{{IS link|IS-203A}}
 
+
</nowiki>
</noinclude>
+
|
 +
{{IS link|203A}}
 +
{{IS link|IS-203A}}
 +
|}</noinclude>

Latest revision as of 12:25, 8 May 2022

Given the name of an IS set as /^(IS-)[0-9]{0,2}([24680]+|[13579]+A)$/ (either the full name or just the number), return a link to the NAQT page for that set. The mechanism by which this is accomplished is terrible and hacky and relies on retrieving "packet_set_id" values from Template:IS map, which is manually populated.

Input Output

{{IS link|203A}} {{IS link|IS-203A}}

IS-203A IS-203A