Difference between revisions of "Ratings"
From Sega Retro
(initiate cheat mode) |
|||
Line 1: | Line 1: | ||
− | {{#if:{{{icon|}}}| | + | {{#if:{{{icon|}}}||<div style="display:none;">}}{{#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;" |
− | !style="height:39px;" | + | !style="height:39px;" |Sega Retro Average |
− | + | |- | |
− | + | | style="padding: 0px;"| | |
− | { | + | {| class="breakout" width="100%" style="margin: 0px; border:0px;" |
− | !class="sortable" | + | !class="sortable"|Publication |
− | !class="sortable" | + | !class="sortable"|Score |
!Source | !Source | ||
− | + | |- | |
{{#vardefine:argpubname|null}}{{#vardefine:argpubscore|null}}{{#vardefine:argpubsource|}}{{#vardefine: newrow|false}}{{#vardefine: lastargtype|null}}{{#vardefine:thisIsARating|true}} | {{#vardefine:argpubname|null}}{{#vardefine:argpubscore|null}}{{#vardefine:argpubsource|}}{{#vardefine: newrow|false}}{{#vardefine: lastargtype|null}}{{#vardefine:thisIsARating|true}} | ||
{{#forargs: | {{#forargs: | ||
Line 25: | Line 25: | ||
{{#ifexpr: {{#len: {{#var: key}}}} > 7 | | {{#ifexpr: {{#len: {{#var: key}}}} > 7 | | ||
{{#ifeq: {{#sub:{{#var: key}}|-7}}|_source|{{#vardefine:argtype|source}}|}} | {{#ifeq: {{#sub:{{#var: key}}|-7}}|_source|{{#vardefine:argtype|source}}|}} | ||
− | + | |}} | |
}} | }} | ||
Line 57: | Line 57: | ||
}} | }} | ||
}} | }} | ||
− | + | |} | |
− | + | |} | |
− | { | + | {|cellpadding="0" cellspacing="0" class="breakout" style="width:auto !important; float: right; margin-left: 15px; display: inline; position: relative;" |
− | ! style="max-width:40px; height:40px" | + | ! style="max-width:40px; height:40px"| {{{{{icon}}}|L}}{{#if: {{{icon|}}} | | [[Category:Old Ratings Template]]}} |
− | ! style="max-width:40px;" style="font-size:16pt; {{scoreColour|{{#var: average}}}}" | + | ! style="max-width:40px;" style="font-size:16pt; {{scoreColour|{{#var: average}}}}"|{{#var: average}} |
− | + | |- | |
− | + | |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> | |
− | + | |} | |
<div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating"> | <div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating"> | ||
<meta itemprop="itemReviewed" content="{{PAGENAME}}"> | <meta itemprop="itemReviewed" content="{{PAGENAME}}"> | ||
Line 78: | Line 78: | ||
|average = {{#var: average}} | |average = {{#var: average}} | ||
|totalReviews = {{#var: totalReviews}} | |totalReviews = {{#var: totalReviews}} | ||
− | }}</includeonly><noinclude>{{#cargo_declare: | + | }}</includeonly>{{#if:{{{icon|}}}||</div>[[Category:Update ratings template]]{{Ratings2|{{{1|}}}|{{{2|}}}}}}}<noinclude>{{#cargo_declare: |
_table = ratings_table | _table = ratings_table | ||
|name=Page | |name=Page | ||
Line 84: | Line 84: | ||
|average=Integer | |average=Integer | ||
|totalReviews=Integer | |totalReviews=Integer | ||
− | |||
− | |||
}} | }} | ||
==Usage== | ==Usage== |
Revision as of 14:01, 25 April 2020
Sega Retro Average | ||||
---|---|---|---|---|
|
{{|L}} | N/A |
---|---|
Based on 0 reviews |
This template defines the table "ratings_table". View table.
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.