Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/doublesecretagency/craft-starratings
Star Ratings plugin for Craft CMS
https://github.com/doublesecretagency/craft-starratings
Last synced: about 12 hours ago
JSON representation
Star Ratings plugin for Craft CMS
- Host: GitHub
- URL: https://github.com/doublesecretagency/craft-starratings
- Owner: doublesecretagency
- License: other
- Created: 2018-04-15T23:14:22.000Z (over 6 years ago)
- Default Branch: v3-dev
- Last Pushed: 2024-02-22T06:14:46.000Z (9 months ago)
- Last Synced: 2024-04-23T23:15:04.502Z (7 months ago)
- Language: PHP
- Size: 1.6 MB
- Stars: 4
- Watchers: 3
- Forks: 3
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
Star Ratings plugin for Craft CMS
=================================An easy to use and highly flexible ratings system.
![](src/resources/img/example-stars.png)
***
## Rate Elements
Just specify the element ID of the item you want to rate. Any element type (Entry, Asset, User, etc) will work!
```twig
{{ craft.starRatings.stars(entry.id) }}
```## Customize Star Icons
It's easy to customize your star icons. You can either [adjust the CSS](https://www.doublesecretagency.com/plugins/star-ratings/docs/customize-your-star-css), or [replace the icons entirely](https://www.doublesecretagency.com/plugins/star-ratings/docs/customize-your-star-icons).
```twig
{% do craft.starRatings.setIcons({
full : '',
half : '',
empty : '',
}) %}
```By default, Star Ratings uses the Font Awesome library. Which means you can easily swap to a different icon from the Font Awesome collection. And if you'd rather not use Font Awesome, you can disable the library from being included at all.
## Sort by Highest Rated
Once your users have cast ratings, you'll want to know which items are the [highest rated...](https://www.doublesecretagency.com/plugins/star-ratings/docs/sort-by-highest-rated)
```twig
{% set mostPopular = craft.entries.orderBy('avgRating DESC').all() %}
```## Settings
Here's a screenshot of the plugin's settings page...
![](src/resources/img/example-settings.png)
To see some other ways that Star Ratings is flexible, check out the [full documentation...](https://www.doublesecretagency.com/plugins/star-ratings/docs)
***
## Anything else?
We've got other plugins too!
Check out the full catalog at [doublesecretagency.com/plugins](https://www.doublesecretagency.com/plugins)