Difference between revisions of "Template:IS link"
Jump to navigation
Jump to search
Kevin Wang (talk | contribs) (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...") |
Kevin Wang (talk | contribs) m |
||
(5 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | {{# | + | {{#if:{{{1|}}}|{{#vardefine:series|{{#explode:{{{1|}}}|-|1}}}}{{#if:{{#var:series}} |
− | | | + | |[https://www.naqt.com/stats/packet-set/team.jsp?playoffs=false&packet_set_id={{IS map|{{#var:series}}}} {{{1}}}] |
− | + | |[https://www.naqt.com/stats/packet-set/team.jsp?playoffs=false&packet_set_id={{IS map|{{{1}}}}} IS-{{{1}}}] | |
− | + | }}}}<noinclude> | |
− | + | 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. | |
− | | | ||
− | |||
− | | | ||
− | |||
− | | | ||
− | |||
− | |||
− | }}{{# | ||
− | |||
− | |||
− | | | ||
− | |||
− | | | ||
− | |||
− | |||
− | }} | ||
− | | | ||
− | |||
− | |||
− | |||
− | |||
− | }} | ||
− | |||
− | } | ||
− | |||
− | |||
− | |||
− | |||
− | | | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | {| class=wikitable | + | {| class="wikitable" |
− | ! | + | ! Input |
− | ! | + | ! Output |
− | |||
|- | |- | ||
− | | | + | | |
− | + | <nowiki> | |
− | | | + | {{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}} |