CSS Star Rating
CSS Star Rating 1.1
Changes from version 1.0: Small fix to provide better validation on querystring parameters.
This snippet lets visitors to your site vote on your web articles using a completely CSS based star rating.
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 :)
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
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
Installation1.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)
Previous Releases
Extras
No results found.