We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
Subscribe: RSS
  • This is a topic for starRating by jerry325


    This Snippet displays an image of Stars in relation to the "starRating_Rating"
    parameter that is passed to it.


    &starRating_Rating integer - The rating to display (from 0-10 in .5 steps). REQUIRED!
    $tpl string - the template chunk to use. Default: starRating_Tpl
    $range = integer - the max range of the rating (Five or Ten). Default: Ten
    $image = string - the path to the sprite image. Default: assets/components/starrating/starSprite.png
    there is also a half size version named starSprite_sm or you can create your own.
    $width = integer - the width of the display block. 1/2 the image width in pixels. Default: 360
    $height = integer - the height of the display block. 1/2 the image height in pixels. Default: 36

    version 1.0.0-pl
    author Jerry Mercer (ultravision.net)
    credits Many thanks for the ideas and work of Abdullah Rubiyath

    USAGE: All but starRating_Rating are optional


    Release Notes
    While working on another project I needed a way to display a rating in a colorfull way. Finding none I
    searched the web and found a CSS slider display by Abdullah Rubiyath. I rewrote to fit my needs and Modx
    and when finished I found I had something that others might want so I packaged it up. As always I would
    be grateful for any and all suggestions for improvements.

    [ed. note: jerry325 last edited this post 5 years, 2 months ago.]