If you’re talking about this plugin and not polls:
A user can only submit one rating per topic. Once you’ve submitted your rating, you can still post in the topic, but the rating controls will not appear in the composer again.
Rating controls will appear in:
Topics in a category with ratings enabled
Topics with a ratings tag
As @cpradio said, this plugin uses both TopicCustomFields and PostCustomFields, however I can’t see any reason why moving a topic from one category to another would affect the ratings control visibility logic. The logic for deciding whether to show the ratings controls in the composer is dependent on CategoryCustomFields which are not being migrated in this case.
Topic and post custom fields are used to store ratings and average ratings, not to decide whether to show rating controls.
So are you saying this is the reason why I’m not seeing the ratings controls? No, I think you’re saying that the CustomCategoryFields are not being moved because I moved the post into rather than out of a rating category.
Correct. CategoryCustomFields are not affected by topics being moved.
tbh, I haven’t tested the ratings client logic in the scenario you’re dealing with: moving an existing topic into a ratings category. I’ll take a look at that scenario this weekend. Thanks.
If I understand correctly how schema.org works (which I’m still not sure I do, even after a using it a few times), the schema for AggregateRating will only work if it is within the scope of a ‘type’. It seems these scope types support AggregateRating:
As it (seems) to be type dependent, I’m not sure it makes sense to support it directly in this plugin as that would involve choosing a particular type, e.g. Product or Service. Not all users of this plugin will be using it for one particular type.
If someone else knows more about schemas and can confirm or deny this, that would help (@vinothkannans?)
You could still add schema support for AggregateRating within the scope of a particular type, by forking this plugin and adding a new file:
We can add AggregateRating by default. In the allowed schema type list it have CreativeWork. In Discourse we are using DiscussionForumPosting as default schema type. It is a part of CreativeWork (CreativeWork > Article > SocialMediaPosting > DiscussionForumPosting). So it is 100% appropriate to use AggregateRating in topic ratings .
@vinothkannans You probably are already aware that Google’s structured data testing tool is complaining about the DiscussionForumPosting microdata for core Discourse topic views not having images. I’m not sure if that omission means the DiscussionForumPosting microdata blocks will be ignored?
Today I enabled this plugin for the first time on a pretty fresh discourse install and I don’t see the star-rating buttons in a reply box (composer) and I get the following error: https://github.com/angusmcleod/discourse-ratings/issues/10
Update: after rebuilding the discourse app, I can no longer reproduce the TypeError... but I still don’t see the star-ratings buttons.
Thanks! and sorry for undeserved attribution of a bug.
On screenshots you can see no errors in the Console and no stars-buttons in the Composer or the average-rating div.
The plugin works well if the post is created in the rating-enabled category initially. However it doesn’t work for the posts in such directory which have been created/edited before error-less installation of this plugin (i.e. I had some Discourse-related error on the server when initially installed this plugin, but after rebuild there was no error).
Unfortunately the plugin doesn’t appear to be working for the posts initially created in a non-rating category, when those posts have been moved to a rating-enabled category, which is sad :’(
Thank you that was fast! Indeed, now I can rate the pre-existing topics. However I can also place multiple ratings with the same user, which kind of allows for rating-abuse:
It is possible to create a ranking of this ratings ?
For example i wanna to show the most importand topic from all category or selected in admin menu
For example i want to show on the sidebar Top 10 best rating topic from category X and category Y
It is possiible ?
It would be perfect if the top post will depend on Number of stars + number of votes (quality ratio)