Vorlage:Rating/Doku

Aus MrBlackRocket
Zur Navigation springen Zur Suche springen

This template is designed to provide an image rating system, defaulting to stars. The template accepts ratings of up to ten, with more than six appearing reduced in size.

When to use this template

The template works with whole and half ratings (e.g. 0, 0.5, 1, 1.5, etc.). Other rating fractions (e.g. 3.2, 7.25) will be rounded, and the page on which the template resides will be inserted into the maintenance category Category:Pages with incorrect use of Rating template. Use |score= to provide explanatory text for ratings that the original source does not express in whole or half increments.

Please only use this template if the rating was originally expressed with the images used. For example, if a reviewer awards something a rating of "4" (expressed in digits not stars) on a scale of 5, you should simply write it as "4" or "4/5" in your article, depending on how it is presented by the source. Do not use {{rating|4|5}} where the source does not use stars, because it is inaccurate and misleading. Note that ratings on a scale of 10 can be hard to read if expressed visually with images.

Parameters

Default

These are the only parameters you need to show star ratings, the default symbols.

  • The first unnamed parameter is the number of the rating received.
  • The second unnamed parameter is optional, and is the maximum possible for the rating system. This will show empty or blank elements for the remainder above the rating, and changes the text in the tooltip to add "/x".


TemplateData

This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. Click here to see a monthly parameter usage report for this template based on this TemplateData.

TemplateData for Rating

A template to provide an image rating system

Vorlagenparameter

ParameterBeschreibungTypStatus
Received1

Number of stars (or other images) received

Nummererforderlich
Possible2

Total possible stars (or other images; defaults to parameter 1)

Nummeroptional
Scorescore

Text displayed when hovering over the rating

Zeichenfolgeoptional
Full alternatefull

Alternate image for a full star, without the File: prefix

Standard
Star full.svg
Zeichenfolgeoptional
Half alternatehalf

Alternate image for a half star, without the File: prefix

Standard
Star half.svg
Zeichenfolgeoptional
Empty alternateempty

Alternate image for an empty star, without the File: prefix

Standard
Star empty.svg
Zeichenfolgeoptional
Rating symbolrating

Unit for alternate images

Standard
star
Zeichenfolgeoptional
Plural rating symbolrating-plural

Plural form of the rating parameter if it is not just adding an "s"

Zeichenfolgeoptional
Images sizesize

Size of the images, in pixels

Standard
11px
Zeichenfolgeoptional

See also