Template:Jam occurrence leaderboard/query: Difference between revisions

From VNDev Wiki
handle the logic for outputting (tie) here, rather than in the row
m expr bug
Line 18: Line 18:
         {{#ifexpr: {{#ask: [[Jam occurrence:+]] [[Has end date::<{{{date|Jan 24 2025}}}]] {{#ifeq:{{{vnOnly|}}}|VN-specific jams|[[Is visual novels only::true]]|}} |?Has {{{for|entries}}}#-|format=plainlist|sort=Has {{{for|entries}}}|order=descending|limit=1|link=none|searchlabel=|headers=hide|mainlabel=-|offset={{#expr: {{{1}}}-1}} }}
         {{#ifexpr: {{#ask: [[Jam occurrence:+]] [[Has end date::<{{{date|Jan 24 2025}}}]] {{#ifeq:{{{vnOnly|}}}|VN-specific jams|[[Is visual novels only::true]]|}} |?Has {{{for|entries}}}#-|format=plainlist|sort=Has {{{for|entries}}}|order=descending|limit=1|link=none|searchlabel=|headers=hide|mainlabel=-|offset={{#expr: {{{1}}}-1}} }}
           = {{#ask: [[Jam occurrence:+]] [[Has end date::<{{{date|Jan 24 2025}}}]] {{#ifeq:{{{vnOnly|}}}|VN-specific jams|[[Is visual novels only::true]]|}} |?Has {{{for|entries}}}#-|format=plainlist|sort=Has {{{for|entries}}}|order=descending|limit=1|link=none|searchlabel=|headers=hide|mainlabel=-|offset={{#expr: {{{1}}}-3}} }}
           = {{#ask: [[Jam occurrence:+]] [[Has end date::<{{{date|Jan 24 2025}}}]] {{#ifeq:{{{vnOnly|}}}|VN-specific jams|[[Is visual novels only::true]]|}} |?Has {{{for|entries}}}#-|format=plainlist|sort=Has {{{for|entries}}}|order=descending|limit=1|link=none|searchlabel=|headers=hide|mainlabel=-|offset={{#expr: {{{1}}}-3}} }}
           | {{#expr: {{{1}}}-2}}&#32;(tie)
           | {{#expr: {{{1}}}-2}} &#32;(tie)
           | {{#expr: {{{1}}}-1}}&#32;(tie)
           | {{#expr: {{{1}}}-1}} &#32;(tie)
         }} <!--end if for three-way tie-->  
         }} <!--end if for three-way tie-->  
       | <!--Not a tie or is first instance of a tie. Now test if tied with next item.-->
       | <!--Not a tie or is first instance of a tie. Now test if tied with next item.-->
         {{#ifexpr: {{#ask: [[Jam occurrence:+]] [[Has end date::<{{{date|Jan 24 2025}}}]] {{#ifeq:{{{vnOnly|}}}|VN-specific jams|[[Is visual novels only::true]]|}} |?Has {{{for|entries}}}#-|format=plainlist|sort=Has {{{for|entries}}}|order=descending|limit=1|link=none|searchlabel=|headers=hide|mainlabel=-|offset={{#expr: {{{1}}}-1}} }}
         {{#ifexpr: {{#ask: [[Jam occurrence:+]] [[Has end date::<{{{date|Jan 24 2025}}}]] {{#ifeq:{{{vnOnly|}}}|VN-specific jams|[[Is visual novels only::true]]|}} |?Has {{{for|entries}}}#-|format=plainlist|sort=Has {{{for|entries}}}|order=descending|limit=1|link=none|searchlabel=|headers=hide|mainlabel=-|offset={{#expr: {{{1}}}-1}} }}
         = {{#ask: [[Jam occurrence:+]] [[Has end date::<{{{date|Jan 24 2025}}}]] {{#ifeq:{{{vnOnly|}}}|VN-specific jams|[[Is visual novels only::true]]|}} |?Has {{{for|entries}}}#-|format=plainlist|sort=Has {{{for|entries}}}|order=descending|limit=1|link=none|searchlabel=|headers=hide|mainlabel=-|offset={{{1}}} }}
         = {{#ask: [[Jam occurrence:+]] [[Has end date::<{{{date|Jan 24 2025}}}]] {{#ifeq:{{{vnOnly|}}}|VN-specific jams|[[Is visual novels only::true]]|}} |?Has {{{for|entries}}}#-|format=plainlist|sort=Has {{{for|entries}}}|order=descending|limit=1|link=none|searchlabel=|headers=hide|mainlabel=-|offset={{{1}}} }}
           | {{{1}}}&#32;(tie)
           | {{{1}}} &#32;(tie)
           | {{{1}}}
           | {{{1}}}
         }} <!--end if for first item of tie-->
         }} <!--end if for first item of tie-->

Revision as of 20:08, 24 January 2025