$49

Star Ratings

Documentation  •  Changelog

Documentation

Override settings

Craft 3 only

You can set the plugin's config settings via a file in your config folder. Similar to the default `general.php` and `db.php`, create a config file called `star-ratings.php`. Once you've created that, you can override any of the default settings values...

return [
    'maxStarsAvailable' => 5,
    'requireLogin' => true,
    'allowHalfStars' => true,
    'allowRatingChange' => true,
    'allowFontAwesome' => true,
    'keepRatingLog' => false,
];

It's possible to override only the settings that you want to change. You can also override settings based on the current environment...

return [
    // All environments
    '*' => [
        'keepRatingLog' => false
    ],
    // Production environment only
    'production' => [
        'keepRatingLog' => true
    ]
];