Rating Types

Topics can have multiple types of ratings. This allows you to rate something according to different criteria. For example

image

Rating types are administered in the ratings plugin admin panel at /admin/plugins/ratings.

Types

By default, all instance will have a single type none.

None type

If you have updated the plugin from v0.2 (before types were introduced) to any version after 0.2, all your existing ratings will be migrated to the none type. Ratings with the none type will be displayed without a label

image

For none type, the ratings input in the composer will be prefixed by the i18n string composer.your_rating.

image

Create a type

Click “+ New” in the Types section to create a new rating type. The type should be lowercase and underscored. Once the type is set it cannot be changed. The name of the type is what is displayed to the user in the composer, topic and topic list. The name of the type can be changed after it is set.

Categories and Tags

Rating types can be used on a category or tag basis. When you assign a type to a category or tag in the Categories or Tags section of the ratings admin panel, that rating type will immediately be available in all topics in that category or with that tag, including existing topics.

Migrate

The migration feature allows you to migrate ratings from one type to another on a per-category basis. Currently the migration feature is restricted to migrating from and to none type. The main use case of the feature is migrating ratings from versions v0.1 or v0.2 of the plugin (before rating types where introduced). The ability to migrate between two user-generated types, and the ability to migrate on a per-tag basis will be added in the future.

Destroy

This will destroy all ratings on topics and posts on a per-category basis. The topics and posts themsleves will not be destroyed, only the rating data will be removed. Like the migrate feature, this feature is currently primarily intended for migrating ratings created with v0.1 or v0.2 of this plugin.

Migrating from v0.2

This is an example workflow If you are migrating from v0.1 or v0.2 of this plugin to any subsequent version of the plugin.

1, Existing ratings are automatically migrated

All existing ratings (without a type) will be automatically migrated to none type when you perform the update. There is nothing you need to do to make this happen aside from update the plugin.

If you do not wish to use rating types, there is nothing you need to do. The plugin will continue to function in the same way as before.

If you do wish to apply a type to your existing ratings, or create a new type of ratings then continue to the next step.

2. Create a rating type

Follow the instructions above to create a rating type for your existing ratings, or if you want to create a new type for new ratings.

3. Assign the type

Follow the instructions above to assign the rating types to categories or tags.

4. Migrate your existing ratings

Use the migration feature (see above) to migrate your existing ratings from none type to your new type category by category.