Difference between revisions of "RatingsTest"

From Sega Retro

 
(32 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#vardefine:totalReviews|0}}{{#vardefine:cumulativeScore|0}}{{#vardefine:arguments|}}
+
{{#vardefine:totalReviews|0}}{{#vardefine:cumulativeScore|0}}
 
{|cellpadding="0" cellspacing="0" class="breakout mw-collapsible mw-collapsed" style="width:auto !important; max-width: 320px; float: right; margin-left: 0px; display: inline; position: relative;"
 
{|cellpadding="0" cellspacing="0" class="breakout mw-collapsible mw-collapsed" style="width:auto !important; max-width: 320px; float: right; margin-left: 0px; display: inline; position: relative;"
 
!style="height:39px;" |Sega Retro Average 
 
!style="height:39px;" |Sega Retro Average 
Line 5: Line 5:
 
| style="padding: 0px;"|
 
| style="padding: 0px;"|
 
{| class="breakout" width="100%" style="margin: 0px; border:0px;"
 
{| class="breakout" width="100%" style="margin: 0px; border:0px;"
!Publication
+
!class="sortable"|Publication
!Score
+
!class="sortable"|Score
 
!Source
 
!Source
 
|-
 
|-
{{#vardefine:pubname|null}}{{#vardefine:pubscore|null}}{{#vardefine:pubsource|null}}
+
{{#vardefine:argpubname|null}}{{#vardefine:argpubscore|null}}{{#vardefine:argpubsource|}}{{#vardefine: newrow|false}}{{#vardefine: lastargtype|null}}
 
{{#forargs:
 
{{#forargs:
 
| key
 
| key
 
| value  
 
| value  
 
|
 
|
{{#vardefine:arguments|{{#var:arguments}} {{#var:key}}}}
+
<span style="display:none;">
 +
{{#vardefine: key|{{#replace:{{#var:key}}|_1|}}}}
 +
{{#vardefine: key|{{#replace:{{#var:key}}|_2|}}}}
 +
{{#vardefine: key|{{#replace:{{#var:key}}|_3|}}}}
 +
{{#vardefine: key|{{#replace:{{#var:key}}|_4|}}}}
 +
 
 +
{{#vardefine:argtype|score}}
 
{{#ifeq: {{#var: key}}|icon|{{#vardefine:argtype|icon}}|
 
{{#ifeq: {{#var: key}}|icon|{{#vardefine:argtype|icon}}|
{{#ifeq: {{#sub:{{#var: key}}|{{#len:key}} - 7|7}}|_source|{{#vardefine:argtype|source}}|
+
{{#ifexpr: {{#len: {{#var: key}}}} > 7 |
{{#vardefine:argtype|score}}
+
{{#ifeq: {{#sub:{{#var: key}}|-7}}|_source|{{#vardefine:argtype|source}}|}}
 +
|}}
 +
}}
 +
 
 +
<!-- -->
 +
{{#ifeq: {{#var: argtype}}|score|{{#ifeq: {{#var: lastargtype}}|score|
 +
{{OnlineRatingTest|argpubname}}
 +
{{#vardefine:magnamelong|{{MagazineName|{{#var: argpubname}}|0|noissuename=yes|nopubdate=yes}}}}
 +
{{RatingsRowSum|{{#var: magnamelong}}|{{#var: argpubscore}}|{{#var: argpubsource}}}}[[Category:Rating without source]]
 +
|}}|}}
 +
 
 +
 
 +
{{#ifeq: {{#var: argtype}}|score|{{#vardefine:argpubname|{{#var: key}}}}{{#vardefine:argpubscore|{{#var: value}}}}|}}
 +
{{#ifeq: {{#var: argtype}}|source|{{#vardefine:argpubsource|{{#var: value}}}}
 +
{{#vardefine: newrow|true}}
 +
|}}
 +
{{#vardefine: lastargtype|{{#var: argtype}}}}
 +
</span>
 +
{{#ifeq: {{#var: newrow}}|true|
 +
{{#ifeq: {{#var: argpubname}}|null||
 +
{{#ifeq: {{#var: argpubscore}}|null||
 +
{{OnlineRatingTest|argpubname}}
 +
{{#vardefine:magnamelong|{{MagazineName|{{#var: argpubname}}|0|noissuename=yes|nopubdate=yes}}}}
 +
{{RatingsRowSum|{{#var: magnamelong}}|{{#var: argpubscore}}|{{#var: argpubsource}}}}
 +
{{#vardefine:argpubname|null}}{{#vardefine:argpubscore|null}}{{#vardefine:argpubsource|}}{{#vardefine: newrow|false}}
 +
|}}
 
}}
 
}}
 
}}
 
}}
  
{{#ifeq: {{#var: argtype}}|score|{{#vardefine:pubname|{{#var: key}}}}{{#vardefine:pubscore|{{#var: value}}}}|
 
{{#ifeq: {{#var: argtype}}|source|{{#vardefine:pubsource|{{#var: value}}}}
 
{{RatingsRowSum|{{#var: pubname}}|{{#var: pubscore}}|{{#var: pubsource}}}}
 
{{#vardefine:pubname|null}}{{#vardefine:pubscore|null}}{{#vardefine:pubsource|null}}
 
 
}}
 
}}
  
}}
 
}}
 
  
 
<!-- Calculate average -->
 
<!-- Calculate average -->
Line 43: Line 68:
 
|colspan="2" style="padding:2px; text-align:center; line-height:initial" | <small>Based on<br>'''{{#var: totalReviews}}''' review{{#ifexpr: {{#var: totalReviews}} > 1|s| }}</small>
 
|colspan="2" style="padding:2px; text-align:center; line-height:initial" | <small>Based on<br>'''{{#var: totalReviews}}''' review{{#ifexpr: {{#var: totalReviews}} > 1|s| }}</small>
 
|}
 
|}
{{#var: arguments}}
 
 
<noinclude>[[Category:Breakout box templates]]</noinclude>
 
<noinclude>[[Category:Breakout box templates]]</noinclude>

Latest revision as of 08:00, 25 June 2016

Sega Retro Average 
Publication Score Source
{{{{{icon}}}|L}} Division by zero.
Based on
0 review