Hey I love this plugin. Thanks for the good work. How about showing the rating on hover over the stars in each topic / posts? For example can show 3.5 or 4.2 numbers based on average rating. I have the Show exact average rating setting turned on.
Sorry for the slow reply, I’ve been away.
Just to clarify, you are seeing the numerical average next to the topic rating right?
Could you show me a mockup or an example of what you have in mind? Cheers.
Yes, I see the average. That’s fine. What I have in mind is a Amazon.com like hover on small title popup showing the average on the main topics list view. In that screen you see a rating but on hover does not show the average. For example, a 3.5 rating is showing as 4 stars and on hover does not give out the average. I have to enter that topic to view the average. Understand it is not a big deal to have it as it is, just thought since we are accustomed to hovering over star ratings on many websites to see the average score, it may be a good feature to implement for habitual reasons.
When the topic creator has chosen no rating for a topic, why don’t we suppress the need to either add a rating or uncheck the box for replies? We can just hide the ratings field for the replies right?
I’ve added exact averages to topic list items in the same format as in the topic title.
I didn’t do the Amazon-style hover (yet) because a hover element typically holds more content than just a single number (unless it’s a tooltip), and I’ll need to decide what else to include there first.
One option is to add the percentages for the different star options like Amazon does (see below).
Also, I had a brief look around at other popular sites using star ratings. It seems a majority display the number of ratings after the stars, with a minority showing the exact average. Not many show anything on hover.
Were there any other specific examples you had in mind?
Could you give a little more info for this scenario:
Is the topic in a category with ratings turned on and/or has a ‘rating’ tag?
Which ratings ‘field’ are we hiding?
Yes, the topic is in a category with ratings turned on. I will give you an example.
As a topic creator, I post a new topic under this category but uncheck ratings while posting it.
Now another user is replying to this topic without ratings (but under a category with ratings enabled)
The user has to now again either uncheck ratings while posting his reply or has to add a rating.
I wonder if we can (or should) suppress the need to add/uncheck a rating for replies to a topic which the owner of the topic has not set ratings to. I cannot think of any scenario where it may be needed to add a rating to a reply for an original topic without ratings.
I triied to install this plugin but seems like something is wrong, i can’t rate a topic and got this in error logs
Error: Could not find module `discourse/helpers/register-unbound` imported from `discourse/plugins/discourse-ratings/discourse/initializers/ratings-edits` at o (https://forum.hsfactory.net/assets/vendor-6c83cefb781b3fa325bff76e9ba637bf719260cc7353ee0179cd706e79535999.js:1:16235) at i (https://forum.hsfactory.net/assets/vendor-6c83cefb781b3fa325bff76e9ba637bf719260cc7353ee0179cd706e79535999.js:1:16160) at n.state (https://forum.hsfactory.net/assets/vendor-6c83cefb781b3fa325bff76e9ba637bf719260cc7353ee0179cd706e79535999.js:1:17303) at e (https://forum.hsfactory.net/assets/vendor-6c83cefb781b3fa325bff76e9ba637bf719260cc7353ee0179cd706e79535999.js:1:15619) at requireModule (https://forum.hsfactory.net/assets/vendor-6c83cefb781b3fa325bff76e9ba637bf719260cc7353ee0179cd706e79535999.js:1:17288) at https://forum.hsfactory.net/assets/application-e93a5eb8d40d078353f1408a62dde9404648a0ef8e6cdf28483c04667dd5e36b.js:1:3894 at Array.forEach (native) at window.Discourse.Ember.Application.extend.start (https://forum.hsfactory.net/assets/application-e93a5eb8d40d078353f1408a62dde9404648a0ef8e6cdf28483c04667dd5e36b.js:1:3837) at https://forum.hsfactory.net/:487:13
@repz I just updated this plugin to work with the latest Discourse code. Please try again. Thanks.
This is great! I’d like to use it with the Discourse WordPress plugin so that WooCommerce (a WordPress ecommerce plugin) product reviews can be written on Discourse. Does anyone have any ideas on what needs to be done to return the
average_rating fields with the information returned from
I’ve got it working by returning the topic custom fields through the
TopicViewWordpressSerializer and the post custom fields through the
Nice. Let me know if you have any other issues.
Hi. I got the following fatal error after rebuilding the app. I am running v1.6.0.beta9 +16. No rating box shows up when creating new topics or posts. Thanks
NoMethodError (undefined method
custom_fields' for nil:NilClass) /var/www/discourse/plugins/discourse-ratings/plugin.rb:55:incalculate_topic_average’
Beginner's Guide to Creating Discourse Plugins - Part 1
@doserved I just made a slight change, could you test it again? If it fails again please post as much of the log here as possible.
It works now. Thanks for making the fix!
Beginner's Guide to Creating Discourse Plugins - Part 1
Cool, if you make it a PR I’ll add it to the repo.
Thanks for your efforts. I have tried to install stable version and master version on the newest discourse version, it cannot work for me. Can this plugin compatible with the discourse master version which has already tag plugin embeded.
Looking forward to your reply.
Hey, are you seeing any errors in the console? or in
I just download the code from github into directory discourse/plugins/.
I use the develoment environment.