Downloads » Resources » CSS Star Rating » CSS Star Rating | 1.0

CSS Star Rating 1.0

  • Currently 4.4358974358974/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
78 vote(s).

This snippet lets visitors to your site vote on your web articles using a completely CSS based star rating.

Works with MODx Version(s): 0.9.2.1, 0.9.2, 0.9.1
Submitted: Jun 29th 2006 | License: LGPL | Downloads: 2822

Description

This CSS Star Rating snippet is derived from the komodomedia star rating code.

It allows for a star rating to be included for web articles that you have on your website.

Yes, you might have guessed it already but if you want a Demo URL then look no further ... this snippet is used on the MODx Repository :)

Instructions

Installation

1.Extract all the files into a 'star_rating' folder under 'assets/snippets/'.
2. Copy and paste the contents of star_rating.snippet.tpl into a new snippet title 'star_rating'.
3. Setup a 'text' Template Variable and assign it to the required template. (default TV name used in the snippet is 'star_rating')
4. Add the CSS link into the head of your template.4. Call the snippet uncached on the required document.

Snippet Parameters

  • &tvName - Template Variable name where data will be stored (optional, use only if different from 'star_rating')
  • &starTpl - Chunk name containing custom template
  • &useSession - Whether to only one vote per session (optional)
  • &docID - Retrieve star rating from a different Document ID (optional)
  • &viewOnly - Disable voting (optional)
  • &cssFile - Integer value of alternate css to be used (optional, css paths need to be added to the cssFile array in the snippet)
  • &imgWidth - Get the image width, used when displaying current rating (only needed if image width is not 25px)
  • &onevote - Use cookie restrictions to only allow one vote
  • &ovtime - Cookie expiry time in seconds (default:expire in one week)


( back to top )