Difference between revisions of "Ratings"
From Sonic Retro
m |
|||
(48 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
− | + | <div style="display:none"> | |
− | | | + | {{#vardefine:totalReviews|0}} |
− | + | {{#vardefine:cumulativeScore|0}} | |
− | | | + | <!-- Calculate total number of reviews --> |
− | {{ | + | {{#forargs: |
− | + | | ratingskey | |
− | {{ | + | | ratingsvalue |
+ | | {{#if: {{#pos:{{#var:ratingskey}}|icon}}{{#pos:{{#var:ratingskey}}|_source}} | | {{addvar|cumulativeScore|{{#var:ratingsvalue}}}}{{incvar|totalReviews}} }} | ||
}} | }} | ||
− | + | <!-- in case it can't cope with divide by zero --> | |
− | {{ | + | {{#ifeq: {{#var: totalReviews}} | 0 | {{incvar|totalReviews}} }} |
− | + | ||
− | + | <!-- Calculate average --> | |
− | + | {{#vardefine: average| | |
− | + | {{#expr: {{#var: cumulativeScore}} / {{#var: totalReviews}} round 0 | |
− | {{ | + | }} |
− | |||
− | |||
− | {{ | ||
}} | }} | ||
+ | </div> | ||
+ | {|cellpadding="0" cellspacing="0" class="breakout mw-collapsible mw-collapsed" style="max-width: 340px; padding: 5px; float: right; margin-left: 15px; display: inline; position: relative" | ||
+ | !rowspan="2" style="width:32px;"| {{{{{icon}}}|L}} | ||
+ | !rowspan="2" style="width:32px;" style="font-size:16pt; {{#ifexpr: {{#var: average}} < 30 | background: #E61414 !important; color: #FFFFFF !important; | {{#ifexpr: {{#var: average}} > 70 | background: #28BE28 !important; color: #FFFFFF !important; | background: #FFE600 !important; color: #000000 !important; }}}}"|{{#var: average}} | ||
+ | !|Sonic Retro Average | ||
|- | |- | ||
− | + | | style="padding-left:5px;" | Based on '''{{#var: totalReviews}}''' review{{#ifexpr: {{#var: totalReviews}} > 1|s| }} | |
− | |||
− | |||
− | {{ | ||
− | }} | ||
|- | |- | ||
− | + | | colspan="3"| | |
− | + | {| class="breakout" width="100%" | |
− | + | !Publication | |
− | + | !Score | |
− | + | !Source | |
|- | |- | ||
− | {{ | + | {{#forargs: |
− | + | | ratingskey | |
− | ! | + | | ratingsvalue |
− | {{!}}style=" | + | | {{#if: {{#pos:{{#var:ratingskey}}|icon}}{{#pos:{{#var:ratingskey}}|_source}} | | |
+ | {{!}}- | ||
+ | {{!}} {{#vardefine:ratingskeyx|{{#replace:{{#var:ratingskey}}|_1|}}}}{{#vardefine:ratingskeyx|{{#replace:{{#var:ratingskeyx}}|_2|}}}}{{#vardefine:ratingskeyx|{{#replace:{{#var:ratingskeyx}}|_3|}}}}{{#vardefine:ratingskeyx|{{#replace:{{#var:ratingskeyx}}|_4|}}}}{{#switch:{{#var:ratingskeyx}} | ||
+ | | acaogames=''Ação Games'' | ||
+ | | ace=''ACE'' | ||
+ | | cvg=''Computer and Video Games'' | ||
+ | | cvgit=''Computer + Video Giochi'' (IT) | ||
+ | | consolemania=''Console Mania'' | ||
+ | | egm=''Electronic Gaming Monthly'' | ||
+ | | excalibur=''Excalibur'' (CZ) | ||
+ | | famitsu=''Famitsu'' | ||
+ | | gamepro=''GamePro'' | ||
+ | | tgm=''The Games Machine'' (UK) | ||
+ | | tgmit=''The Games Machine'' (IT) | ||
+ | | gamesx=''Games-X'' | ||
+ | | hobbyconsolas=''Hobby Consolas'' | ||
+ | | mdag=''[[sega:Sega Mega Drive Advanced Gaming|Sega Mega Drive Advanced Gaming]]'' | ||
+ | | megaaction=''[[sega:Mega Action|Mega Action]]'' | ||
+ | | megablast=''Megablast'' | ||
+ | | megatech=''[[sega:MegaTech|MegaTech]]'' | ||
+ | | mm=''Mean Machines'' | ||
+ | | mms=''[[sega:Mean Machines Sega|Mean Machines Sega]]'' | ||
+ | | playerone=''Player One'' | ||
+ | | raze=''Raze'' | ||
+ | | segapower=''[[sega:Sega Power|Sega Power]]'' | ||
+ | | segapro=''[[sega:Sega Pro|Sega Pro]]'' | ||
+ | | videogame=''VideoGame'' | ||
+ | | vgce=''VideoGames & Computer Entertainment'' | ||
+ | | zero=''Zero'' | ||
+ | | {{#var:ratingskey}} }} | ||
+ | {{!}}style="padding-left:5px;" width="20px" align="center"{{!}} {{#var:ratingsvalue}} | ||
+ | {{!}} {{{{{#var:ratingskey}}_source|}}}{{#if:{{#pos:{{#var:ratingskey}}|_1}}|{{{{{#var:ratingskeyx}}_source_1|}}}}}{{#if:{{#pos:{{#var:ratingskey}}|_2}}|{{{{{#var:ratingskeyx}}_source_2|}}}}}{{#if:{{#pos:{{#var:ratingskey}}|_3}}|{{{{{#var:ratingskeyx}}_source_3|}}}}}{{#if:{{#pos:{{#var:ratingskey}}|_4}}|{{{{{#var:ratingskeyx}}_source_4|}}}}} | ||
+ | {{!}}- | ||
}} | }} | ||
− | |||
− | |||
− | |||
− | |||
− | |||
}} | }} | ||
− | + | ||
− | + | |} | |
− | + | |} | |
− | + | <noinclude> | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | } | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==Usage== | ==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. | 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: | Usage: | ||
<pre> | <pre> | ||
{{Ratings | {{Ratings | ||
+ | | icon= | ||
+ | |||
+ | | 360= | ||
+ | | 3djuegos= | ||
+ | | 4players= | ||
+ | | ace= | ||
+ | | asm= | ||
+ | | badinfluence= | ||
| consolesplus= | | consolesplus= | ||
| cvg= | | cvg= | ||
+ | | cvgit= | ||
| dcuk= | | dcuk= | ||
+ | | dmjp= | ||
+ | | dmjp_r= | ||
| dmuk= | | dmuk= | ||
+ | | dori= | ||
| edge= | | edge= | ||
+ | | eg= | ||
| egm= | | egm= | ||
+ | | famitsu= | ||
+ | | famitsu360= | ||
+ | | flux= | ||
| gamefan= | | gamefan= | ||
− | |||
| gamesmachine= | | gamesmachine= | ||
| gamesmachineuk= | | gamesmachineuk= | ||
+ | | gamesmaster= | ||
+ | | gameplayers= | ||
+ | | gamepower= | ||
+ | | gamepro= | ||
+ | | gamezero= | ||
+ | | gamingtarget= | ||
+ | | generation= | ||
+ | | gi= | ||
+ | | happycomputer= | ||
+ | | highscore= | ||
| hobbyconsolas= | | hobbyconsolas= | ||
− | | | + | | ign= |
| joypad= | | joypad= | ||
| joystick= | | joystick= | ||
+ | | justpushstart= | ||
+ | | maniac= | ||
| mdag= | | mdag= | ||
| mega= | | mega= | ||
+ | | megaforce= | ||
+ | | megafun= | ||
| megaplay= | | megaplay= | ||
+ | | meristation= | ||
+ | | micromania= | ||
| mm= | | mm= | ||
| mms= | | mms= | ||
| mrdc= | | mrdc= | ||
| mt= | | mt= | ||
+ | | nextlevel= | ||
+ | | odmfr= | ||
| odmuk= | | odmuk= | ||
| odmus= | | odmus= | ||
+ | | palgn= | ||
| playerone= | | playerone= | ||
− | | | + | | powersonic= |
+ | | pp= | ||
+ | | psu= | ||
+ | | pu= | ||
+ | | s= | ||
| saturnplus= | | saturnplus= | ||
| saturnpower= | | saturnpower= | ||
+ | | sega16= | ||
+ | | segafan= | ||
| segamagjp= | | segamagjp= | ||
| segamaguk= | | segamaguk= | ||
| segapower= | | segapower= | ||
+ | | segapro= | ||
| sfuk= | | sfuk= | ||
| sfsw= | | sfsw= | ||
+ | | sfm= | ||
| smf= | | smf= | ||
+ | | shin= | ||
| smz= | | smz= | ||
| ssm= | | ssm= | ||
+ | | supersonic= | ||
| sv= | | sv= | ||
+ | | svenska= | ||
| tilt= | | tilt= | ||
| ts= | | ts= | ||
+ | | ug= | ||
+ | | ugameplayers= | ||
+ | | vandal= | ||
+ | | vgce= | ||
+ | | viciojuegos= | ||
+ | | videogamecritic= | ||
+ | | worthplaying= | ||
}} | }} | ||
</pre> | </pre> | ||
+ | for sources, add "_source", e.g. | ||
+ | <pre> | ||
+ | | smf_source=[http://www.google.com] | ||
+ | | vgce_source={{num|32}} | ||
+ | </pre> | ||
All fields are optional. | All fields are optional. | ||
− | + | [[Category:Breakout box templates]]</noinclude> | |
− | [[Category:Breakout |
Revision as of 15:26, 12 September 2016
{{{{{icon}}}|L}} | 0 | Sonic Retro Average | |||
---|---|---|---|---|---|
Based on 1 review | |||||
|
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= | 360= | 3djuegos= | 4players= | ace= | asm= | badinfluence= | consolesplus= | cvg= | cvgit= | dcuk= | dmjp= | dmjp_r= | dmuk= | dori= | edge= | eg= | egm= | famitsu= | famitsu360= | flux= | gamefan= | gamesmachine= | gamesmachineuk= | gamesmaster= | gameplayers= | gamepower= | gamepro= | gamezero= | gamingtarget= | generation= | gi= | happycomputer= | highscore= | hobbyconsolas= | ign= | joypad= | joystick= | justpushstart= | maniac= | mdag= | mega= | megaforce= | megafun= | megaplay= | meristation= | micromania= | mm= | mms= | mrdc= | mt= | nextlevel= | odmfr= | odmuk= | odmus= | palgn= | playerone= | powersonic= | pp= | psu= | pu= | s= | saturnplus= | saturnpower= | sega16= | segafan= | segamagjp= | segamaguk= | segapower= | segapro= | sfuk= | sfsw= | sfm= | smf= | shin= | smz= | ssm= | supersonic= | sv= | svenska= | tilt= | ts= | ug= | ugameplayers= | vandal= | vgce= | viciojuegos= | videogamecritic= | worthplaying= }}
for sources, add "_source", e.g.
| smf_source=[http://www.google.com] | vgce_source={{num|32}}
All fields are optional.