Template:Jam occurrence leaderboard/query: Difference between revisions
From VNDev Wiki
m use count param instead of entries |
m change the indexing |
||
Line 4: | Line 4: | ||
|template=Jam occurrence leaderboard/row | |template=Jam occurrence leaderboard/row | ||
|format=plainlist | |format=plainlist | ||
|sort=Has entries | |sort=Has entries | ||
|order=descending | |order=descending | ||
|limit=1 | |limit=1 | ||
|link=none | |link=none | ||
|searchlabel= | |searchlabel= | ||
|offset={{{1}}} | |offset={{#expr: {{{1}}}-1}} | ||
|named args=yes | |named args=yes | ||
<!-- The below section calculates the correct rank number by comparing to prior items --> | <!-- The below section calculates the correct rank number by comparing to prior items --> | ||
|userparam={{#ifexpr: {{{1}}} = | |userparam={{#ifexpr: {{{1}}} = 1 | 0 | | ||
{{#ifexpr: {{#ask: [[Jam occurrence:+]] |?Has entries#-|format=plainlist|sort=Has entries|order=descending|limit=1|link=none|searchlabel=|headers=hide|mainlabel=-|offset={{{1}}} }} | {{#ifexpr: {{#ask: [[Jam occurrence:+]] |?Has entries#-|format=plainlist|sort=Has entries|order=descending|limit=1|link=none|searchlabel=|headers=hide|mainlabel=-|offset={{#expr: {{{1}}}-1}} }} | ||
= {{#ask: [[Jam occurrence:+]] |?Has entries#-|format=plainlist|sort=Has entries|order=descending|limit=1|link=none|searchlabel=|headers=hide|mainlabel=-|offset={{#expr: {{{1}}}- | = {{#ask: [[Jam occurrence:+]] |?Has entries#-|format=plainlist|sort=Has entries|order=descending|limit=1|link=none|searchlabel=|headers=hide|mainlabel=-|offset={{#expr: {{{1}}}-2}} }} | ||
| <!--At least two way tie; now test for three way tie--> | | <!--At least two way tie; now test for three way tie--> | ||
{{#ifexpr: {{#ask: [[Jam occurrence:+]] |?Has entries#-|format=plainlist|sort=Has entries|order=descending|limit=1|link=none|searchlabel=|headers=hide|mainlabel=-|offset={{{1}}} }} | {{#ifexpr: {{#ask: [[Jam occurrence:+]] |?Has entries#-|format=plainlist|sort=Has entries|order=descending|limit=1|link=none|searchlabel=|headers=hide|mainlabel=-|offset={{#expr: {{{1}}}-1}} }} | ||
= {{#ask: [[Jam occurrence:+]] |?Has entries#-|format=plainlist|sort=Has entries|order=descending|limit=1|link=none|searchlabel=|headers=hide|mainlabel=-|offset={{#expr: {{{1}}}- | = {{#ask: [[Jam occurrence:+]] |?Has entries#-|format=plainlist|sort=Has entries|order=descending|limit=1|link=none|searchlabel=|headers=hide|mainlabel=-|offset={{#expr: {{{1}}}-3}} }} | ||
| {{#expr: {{{1}}}-3}} | |||
| {{#expr: {{{1}}}-2}} | | {{#expr: {{{1}}}-2}} | ||
}} <!--end if for three-way tie--> | }} <!--end if for three-way tie--> | ||
| <!--Not a tie or is first instance of a tie-->{{{1}}} | | <!--Not a tie or is first instance of a tie-->{{#expr: {{{1}}}-1}} | ||
}} <!--end if for two-way tie--> | }} <!--end if for two-way tie--> | ||
}} <!--end if for param is 1--> | }} <!--end if for param is 1--> | ||
}} | }} |