Difference between revisions of "Ratings"

From Sega Retro

Line 65: Line 65:
 
|colspan="2" style="padding:2px; text-align:center; line-height:initial" | <small>{{#vardefine:totalText|Based on<br>'''{{#var: totalReviews}}''' review{{#ifexpr: {{#var: totalReviews}} > 1|s| }}}}{{#var:totalText}}</small>
 
|colspan="2" style="padding:2px; text-align:center; line-height:initial" | <small>{{#vardefine:totalText|Based on<br>'''{{#var: totalReviews}}''' review{{#ifexpr: {{#var: totalReviews}} > 1|s| }}}}{{#var:totalText}}</small>
 
|}
 
|}
{{#vardefine:thisIsARating|false}}<includeonly>{{#cargo_store:
+
{{#vardefine:thisIsARating|false}}{{#if:{{{icon|}}}|[[Category:Update ratings template]][[Category:{{#var: totalReviews}} old ratings]]}}</div>{{Ratings2|{{{icon|}}}{{{1|}}}|{{{2|{{FormatSQL|{{#titleparts:{{PAGENAME}}}}}}}}}}}<noinclude>
_table = ratings_table
 
|name = {{#titleparts:{{PAGENAME}}}}
 
|console={{{icon}}}
 
|average = {{#var: average}}
 
|totalReviews = {{#var: totalReviews}}
 
}}</includeonly>{{#if:{{{icon|}}}|[[Category:Update ratings template]][[Category:{{#var: totalReviews}} old ratings]]}}</div>{{Ratings2|{{{icon|}}}{{{1|}}}|{{{2|{{FormatSQL|{{#titleparts:{{PAGENAME}}}}}}}}}}}<noinclude>{{#cargo_declare:
 
_table = ratings_table
 
|name=Page
 
|console=Text
 
|average=Integer
 
|totalReviews=Integer
 
}}
 
 
==Usage==
 
==Usage==
 
Template showing ratings given to a video game by the press. This template is fully automated, with data coming from [[:Category:Magazine articles]] and [[:Category:Video coverage]]. The game in question is inferred by the the page name.
 
Template showing ratings given to a video game by the press. This template is fully automated, with data coming from [[:Category:Magazine articles]] and [[:Category:Video coverage]]. The game in question is inferred by the the page name.

Revision as of 08:45, 5 March 2022

Sega Retro Average 
Publication Score Source
{{{{{icon}}}|L}} Division by zero.
Based on
0 review
Sega Retro Average 
Publication Version Score
{{|L}} N/A
Based on
0 reviews

Ratings

Usage

Template showing ratings given to a video game by the press. This template is fully automated, with data coming from Category:Magazine articles and Category:Video coverage. The game in question is inferred by the the page name.

Usage:

{{Ratings|<SYSTEM>}}