Difference between revisions of "RatingsTest"

From Sega Retro

 
(41 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
 
 
 
{{#vardefine:totalReviews|0}}{{#vardefine:cumulativeScore|0}}
 
{{#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;"
Line 8: 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:argtype|score}}
+
{{#vardefine:argpubname|null}}{{#vardefine:argpubscore|null}}{{#vardefine:argpubsource|}}{{#vardefine: newrow|false}}{{#vardefine: lastargtype|null}}
 
{{#forargs:
 
{{#forargs:
 
| key
 
| key
 
| value  
 
| value  
 
|
 
|
{{#ifeq: {{#var: key}}|icon|{{#vardefine:argtype|icon}}|}}
+
<span style="display:none;">
{{#ifeq: {{#sub:{{#var: key}}|{{#len:key}} - 7|7}}|_source|{{#vardefine:argtype|source}}|}}
+
{{#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}}|
 +
{{#ifexpr: {{#len: {{#var: key}}}} > 7 |
 +
{{#ifeq: {{#sub:{{#var: key}}|-7}}|_source|{{#vardefine:argtype|source}}|}}
 +
|}}
 +
}}
  
{{#switch: {{#var: argtype}}
+
<!-- -->
{{!}}score=
+
{{#ifeq: {{#var: argtype}}|score|{{#ifeq: {{#var: lastargtype}}|score|
{{!}}NAME HERE: {{#var: key}}
+
{{OnlineRatingTest|argpubname}}
{{!}}SCORE HERE: {{#var: value}}
+
{{#vardefine:magnamelong|{{MagazineName|{{#var: argpubname}}|0|noissuename=yes|nopubdate=yes}}}}
{{!}}source=
+
{{RatingsRowSum|{{#var: magnamelong}}|{{#var: argpubscore}}|{{#var: argpubsource}}}}[[Category:Rating without source]]
{{!}}SOURCE HERE: {{#var: value}}
+
|}}|}}
{{!}}-
+
 
{{!}}#default: bork
+
 
 +
{{#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}}
 +
|}}
 +
}}
 
}}
 
}}
  
 
}}
 
}}
 +
  
 
<!-- Calculate average -->
 
<!-- Calculate average -->
Line 37: Line 59:
 
{{#expr: {{#var: cumulativeScore}} / {{#var: totalReviews}} round 0
 
{{#expr: {{#var: cumulativeScore}} / {{#var: totalReviews}} round 0
 
}}
 
}}
}}
 
 
}}
 
}}
 
|}
 
|}

Latest revision as of 08:00, 25 June 2016

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