Difference between revisions of "Template:Rating"

From YUIkipedia
Jump to navigation Jump to search
m (Reverted edits by Dracul (Talk) to last revision by Kikino)
 
Line 2: Line 2:
 
  |{{#if:{{{2|}}}
 
  |{{#if:{{{2|}}}
 
   |<span style="white-space:nowrap" title="{{{1}}}/{{{2}}} stars">{{#ifexpr:{{{1}}}>=1
 
   |<span style="white-space:nowrap" title="{{{1}}}/{{{2}}} stars">{{#ifexpr:{{{1}}}>=1
   |[[File:Star full.png|{{#ifexpr:{{{2}}}>6|7|11}}px|link=|{{{1}}}/{{{2}}} stars]]{{Loop15
+
   |[[File:Star full.svg|{{#ifexpr:{{{2}}}>6|7|11}}px|link=|{{{1}}}/{{{2}}} stars]]{{Loop15
 
     |{{#expr:floor{{{1}}}-1}}
 
     |{{#expr:floor{{{1}}}-1}}
     |[[File:Star full.png|{{#ifexpr:{{{2}}}>6|7|11}}px|link=|alt=]]
+
     |[[File:Star full.svg|{{#ifexpr:{{{2}}}>6|7|11}}px|link=|alt=]]
 
   }}
 
   }}
 
   |{{#ifexpr:{{{1}}}>0
 
   |{{#ifexpr:{{{1}}}>0
     |[[File:Star half.png|{{#ifexpr:{{{2}}}>6|7|11}}px|link=|{{{1}}}/{{{2}}} stars]]
+
     |[[File:Star half.svg|{{#ifexpr:{{{2}}}>6|7|11}}px|link=|{{{1}}}/{{{2}}} stars]]
     |[[File:Star empty.png|{{#ifexpr:{{{2}}}>6|7|11}}px|link=|{{{1}}}/{{{2}}} stars]]
+
     |[[File:Star empty.svg|{{#ifexpr:{{{2}}}>6|7|11}}px|link=|{{{1}}}/{{{2}}} stars]]
 
   }}
 
   }}
 
   }}{{#ifexpr:{{{1}}}>1and{{{1}}}!=ceil{{{1}}}
 
   }}{{#ifexpr:{{{1}}}>1and{{{1}}}!=ceil{{{1}}}
   |[[File:Star half.png|{{#ifexpr:{{{2}}}>6|7|11}}px|link=|alt=]]
+
   |[[File:Star half.svg|{{#ifexpr:{{{2}}}>6|7|11}}px|link=|alt=]]
 
   }}{{Loop15
 
   }}{{Loop15
 
     |{{#expr:{{{2}}}-ceil{{{1}}}{{#ifexpr:{{{1}}}=0|-1}}}}
 
     |{{#expr:{{{2}}}-ceil{{{1}}}{{#ifexpr:{{{1}}}=0|-1}}}}
     |[[File:Star empty.png|{{#ifexpr:{{{2}}}>6|7|11}}px|link=|alt=]]
+
     |[[File:Star empty.svg|{{#ifexpr:{{{2}}}>6|7|11}}px|link=|alt=]]
 
   }}</span>
 
   }}</span>
 
   |Please specify a rating.
 
   |Please specify a rating.

Latest revision as of 02:49, 25 March 2010

Please specify a rating.

[edit] [purge] 50px Template documentation

This template is designed to provide a star rating system. If more than six stars are used, their size is decreased.

When to use this template

Please only use this star template if the rating was actually given in stars. For example, if a reviewer awards something a rating of "8.6" (expressed in digits) on a scale of ten, you should write it as "8.6" or "8.6/10.0" in your article. Do not use {{Rating|8.6|10}} as it is inaccurate and misleading. Note that a rating on a scale of ten expressed with stars can be hard to read.

Examples

  • {{Rating|4|5}} displays as 4/5 stars
  • {{Rating|0|3}} displays as 0/3 stars
  • {{Rating|3.5|6}} displays as 3.5/6 stars
  • {{Rating|8|8}} displays as 8/8 stars
  • {{Rating|5|10}} displays as 5/10 stars

See also


hy:Կաղապար:Ռեյտինգ ar:قالب:التقييم cs:Šablona:Hodnocení eo:Ŝablono:Steloj es:Plantilla:Rating ja:Template:Rating pt:Predefinição:Rating ru:Шаблон:Rating sq:Stampa:Rating sk:Šablóna:Rating uk:Шаблон:Rating