Difference between pages "Template:fs" and "Category:Ratings Templates"

From LCA2015 Delegate wiki
(Difference between pages)
Jump to: navigation, search
m (Fixed, thanks to #wikimedia on Freenode. I'm such a wally!)
 
m (Example: new section)
 
Line 1: Line 1:
<includeonly>[[File:Farm-Fresh-bullet-star.png|16px]]</includeonly><noinclude>
 
[[Category:Ratings Templates]]
 
 
== Description ==
 
== Description ==
A '''f'''ull '''s'''tar for a ranking / rating system.
+
A collection of templates to simplify the placement of rankings and ratings.
  
 
== Example ==
 
== Example ==
<pre>{{fs}}{{fs}}{{fs}}{{fs}}{{fs}}</pre>
+
You can now use code similar to below in order to display a star rating system...
  
Will display as...
+
<pre>{{fs}}{{fs}}{{hs}}{{es}}{{es}}</pre>
  
{{fs}}{{fs}}{{fs}}{{fs}}{{fs}}
+
This will display 2½ stars out of a five-star rating, as below...
  
</noinclude>
+
{{fs}}{{fs}}{{hs}}{{es}}{{es}}
 +
 
 +
=== Improvements ===
 +
* If you want to sort a table column based on the star ranking, it is suggested that you prefix the rating in the cell with hidden text, such as...
 +
 
 +
: <pre><span style="display:none;">2.5</span>{{fs}}{{fs}}{{hs}}{{es}}{{es}}</pre>
 +
 
 +
* A future template might allow for a complete rating to specified from a single template, such as...
 +
 
 +
: <pre>{{rating|2.5|5}}</pre>
 +
 
 +
: I'll add this to my [[User:Augur_./To Do|To Do]] list.
 +
== See Also ==
 +
* [[:Category:Ratings Icons|Ratings Icons]] category
 +
 
 +
[[Category:Image Templates]]

Revision as of 20:07, 27 December 2014

Description

A collection of templates to simplify the placement of rankings and ratings.

Example

You can now use code similar to below in order to display a star rating system...

{{fs}}{{fs}}{{hs}}{{es}}{{es}}

This will display 2½ stars out of a five-star rating, as below...

Farm-Fresh-bullet-star.pngFarm-Fresh-bullet-star.pngFarm-Fresh-bullet-half-star.pngFarm-Fresh-bullet-empty-star.pngFarm-Fresh-bullet-empty-star.png

Improvements

  • If you want to sort a table column based on the star ranking, it is suggested that you prefix the rating in the cell with hidden text, such as...
<span style="display:none;">2.5</span>{{fs}}{{fs}}{{hs}}{{es}}{{es}}
  • A future template might allow for a complete rating to specified from a single template, such as...
{{rating|2.5|5}}
I'll add this to my To Do list.

See Also