Actions

Template

Difference between revisions of "Ratings"

From Sega Retro

Line 31: Line 31:
 
{{#ifeq: {{#var: argtype}}|score|{{#ifeq: {{#var: lastargtype}}|score|
 
{{#ifeq: {{#var: argtype}}|score|{{#ifeq: {{#var: lastargtype}}|score|
 
{{#vardefine:magnamelong|{{MagazineName|{{#var: argpubname}}|0|noissuename=yes|nopubdate=yes}}}}
 
{{#vardefine:magnamelong|{{MagazineName|{{#var: argpubname}}|0|noissuename=yes|nopubdate=yes}}}}
{{RatingsRowSum|{{#var: magnamelong}}|{{#var: argpubscore}}|{{#var: argpubsource}}}}[[Category:Rating without source]]
+
 
 +
{{ #if: {{#var: argpubscore}} | {{!}}<span itemprop="author">{{#var: magnamelong}}</span>{{addvar|cumulativeScore|{{#var: argpubscore}}}}{{incvar|totalReviews}}
 +
{{!}}style="padding-left:5px; text-align:center; {{scoreColour|{{#var: argpubscore}}}}" width="20px" {{!}}<span itemprop="ratingValue">{{#var: argpubscore}}</span>
 +
{{!}} {{#if: {{#var: argpubsource}} | {{#var: argpubsource}} | [[Category:Rating without source]] }}
 +
{{!}}-
 +
| }}
 +
[[Category:Rating without source]]
 
|}}|}}
 
|}}|}}
  
Line 44: Line 50:
 
{{#ifeq: {{#var: argpubname}}|null||
 
{{#ifeq: {{#var: argpubname}}|null||
 
{{#ifeq: {{#var: argpubscore}}|null||
 
{{#ifeq: {{#var: argpubscore}}|null||
{{OnlineRatingTest|argpubname}}
 
 
{{#vardefine:magnamelong|{{MagazineName|{{#var: argpubname}}|0|noissuename=yes|nopubdate=yes}}}}
 
{{#vardefine:magnamelong|{{MagazineName|{{#var: argpubname}}|0|noissuename=yes|nopubdate=yes}}}}
{{RatingsRowSum|{{#var: magnamelong}}|{{#var: argpubscore}}|{{#var: argpubsource}}}}
+
 
 +
{{ #if: {{#var: argpubscore}} | {{!}}<span itemprop="author">{{#var: magnamelong}}</span>{{addvar|cumulativeScore|{{#var: argpubscore}}}}{{incvar|totalReviews}}
 +
{{!}}style="padding-left:5px; text-align:center; {{scoreColour|{{#var: argpubscore}}}}" width="20px" {{!}}<span itemprop="ratingValue">{{#var: argpubscore}}</span>
 +
{{!}} {{#if: {{#var: argpubsource}} | {{#var: argpubsource}} | [[Category:Rating without source]] }}
 +
{{!}}-
 +
| }}
 +
 
 
{{#vardefine:argpubname|null}}{{#vardefine:argpubscore|null}}{{#vardefine:argpubsource|}}{{#vardefine: newrow|false}}
 
{{#vardefine:argpubname|null}}{{#vardefine:argpubscore|null}}{{#vardefine:argpubsource|}}{{#vardefine: newrow|false}}
 
|}}
 
|}}

Revision as of 12:36, 21 August 2017

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

<meta itemprop="ratingValue" content="Division by zero.">

Usage

This template is to be used on articles about video games and will display scores awarded to said games by video game magazines/websites.

Usage:

{{Ratings
| icon=
| publication=
}}

Substitute "publication" with a publication code to get the desired result.

for sources, add "_source", e.g.

| smf_source=[http://www.google.com]
| vgce_source={{num|32|page=10/11}}

All fields are optional.