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?
https://github.com/angusmcleod/discourse-ratings/commit/fc78122d0dd3d3de1fe5ff9483413f1de637819b
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.
Hi!
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.
https://github.com/angusmcleod/discourse-ratings/commit/b77ed1068018fd107a4a4c8ac35af57666ac6884
@angus working like a charm!
Thanks a lot
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 rating
and average_rating
fields with the information returned from wordpress.json
?
Edit:
Iāve got it working by returning the topic custom fields through the TopicViewWordpressSerializer
and the post custom fields through the PostWordpressSerializer
.
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:in
calculate_topic_averageā
@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.
Thanks.
https://github.com/angusmcleod/discourse-ratings/commit/450f528e5b52248a6082863c3a3b146bf927b099
Angus,
It works now. Thanks for making the fix!
David
Italian translation
client.it.yml (469 Bytes)
Cool, if you make it a PR Iāll add it to the repo.
Hi:
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 /logs
?