Template:Jam occurrence leaderboard/query: Difference between revisions

From VNDev Wiki
put in the filters, let's see how this works
m format with table if not transcluded
 
(24 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#ask: [[Jam occurrence:+]] [[Has end date::≤{{{date|+}}}]] [[Is visual novels only::{{{vnOnly|+}}}]]
<noinclude><table></noinclude>{{#ifexpr: {{Jam occurrence leaderboard/tiecalc|rank={{{1|1}}}|date={{{date|Jan 1 2100}}} | vnOnly={{{vnOnly|}}} | for={{{for|entries}}} | format=number }} < 21 |
|?#-=jam
  <tr><td>{{Jam occurrence leaderboard/tiecalc|rank={{{1|1}}}|date={{{date|Jan 1 2100}}} | vnOnly={{{vnOnly|}}} | for={{{for|entries}}} | format=display }}</td>
|?Has {{{2|entries}}}=count
  <td>{{Jam occurrence leaderboard/prop | date={{{date|Jan 1 2100}}} | vnOnly={{{vnOnly|}}} | for={{{for|entries}}} | offset={{#expr: {{{1|1}}}-1}} | simple=no}}</td>
|template=Jam occurrence leaderboard/row-{{{2|entries}}}
  <td>{{PAGENAME:{{Jam occurrence leaderboard/prop | date={{{date|Jan 1 2100}}} | vnOnly={{{vnOnly|}}} | for={{{for|entries}}} | offset={{#expr: {{{1|1}}}-1}} | prop=name }} }}</td>
|format=plainlist
  </tr>
|sort=Has {{{2|entries}}}
|}}<noinclude></table></noinclude>
|order=descending
|limit=1
|link=none
|searchlabel=
|offset={{#expr: {{{1}}}-1}}
|named args=yes
<!-- The below section calculates the correct rank number by comparing to prior items  -->
|userparam={{#ifexpr: {{{1}}} = 1 | 1 |
    {{#ifexpr: {{#ask: [[Jam occurrence:+]] |?Has {{{2|entries}}}#-|format=plainlist|sort=Has {{{2|entries}}}|order=descending|limit=1|link=none|searchlabel=|headers=hide|mainlabel=-|offset={{#expr: {{{1}}}-1}} }}
      = {{#ask: [[Jam occurrence:+]] |?Has {{{2|entries}}}#-|format=plainlist|sort=Has {{{2|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-->
        {{#ifexpr: {{#ask: [[Jam occurrence:+]] |?Has {{{2|entries}}}#-|format=plainlist|sort=Has {{{2|entries}}}|order=descending|limit=1|link=none|searchlabel=|headers=hide|mainlabel=-|offset={{#expr: {{{1}}}-1}} }}
          = {{#ask: [[Jam occurrence:+]] |?Has {{{2|entries}}}#-|format=plainlist|sort=Has {{{2|entries}}}|order=descending|limit=1|link=none|searchlabel=|headers=hide|mainlabel=-|offset={{#expr: {{{1}}}-3}} }}
          | {{#expr: {{{1}}}-2}}
          | {{#expr: {{{1}}}-1}}
        }} <!--end if for three-way tie-->  
      | <!--Not a tie or is first instance of a tie-->{{{1}}}
    }} <!--end if for two-way tie-->
  }} <!--end if for param is 1-->
}}

Latest revision as of 09:04, 25 January 2025

1 272 Spooktober 2024