Topic Ratings Plugin


(Daler) #115

Thanks! and sorry for undeserved attribution of a bug. :slight_smile:
On screenshots you can see no errors in the Console and no stars-buttons in the Composer or the average-rating div.

Update:

  1. 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).

  2. 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 :’(


(Angus McLeod) #116

Thanks for figuring that out. It should work for such ‘pre-existing’ topics now.


(Daler) #117

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:


(Tumi) #118

Hi , nice plugin

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)


(Angus McLeod) #119

Given enough time, everything breaks, aka entropy … fixed as well :slight_smile:


(Angus McLeod) #120

Hey

Yes, it’s possible. In a separate plugin you could add a new topic list that sorts topics based on the average_rating topic custom field.

Here’s an example of how to create a new topic list that is sorted by a custom field:

Well, you’ll need a sidebar first. Then a widget that has a topic list in it. Here’s some I prepared earlier:


So all you need to do is change the topic list in the layouts-topic-list widget to the topic list you created in your new plugin.

  1. Follow the beginners guide to creating a plugin

  2. Add the layouts plugin with the topic list widget

  3. Copy / paste the new topic list code I’ve linked above

  4. Change a few variable names and urls in the topic list widget and the topic list code.


(Anton) #121

For some reason, ratings checkbox is now shown in some composers, and users don’t understand why?

I never configured it or turned on anything like that.


(Anton) #122

I think I caught it: it is shown when EDITING messages. Even if it’s turned off.


(Angus McLeod) #123

Thanks for the report :+1: Fixed.


(Daler) #124

Hey, Santa Angus! Got some room in your busy schedule? :slight_smile:

[feature request] Show the count of reviews along with the avg score · Issue #11 · angusmcleod/discourse-ratings · GitHub


(Angus McLeod) #125

Added :santa: Setting is rating_show_count; default is false.

See further: The 400 blows - Truffaut - Ratings - Angus' Sandbox


(Daler) #126

Dear Santa, thank you very much! I always believed you were real :blush:


(Tumi) #127

Thanks for Your time. Ok i will learn how to do it all becouse im not a programmer… Need some time. Pls tell me - should i learn a ruby laungage or not really ? Should i know somethink more ? How to learn it as fast as it possible (not for be a pro - just for myself needs)


(Angus McLeod) #128

@dalerka @hnaseri As discussed, I’ve updated the average / count style. It now looks like this:

54 PM

Both the Amazon style and the use of an emoji has issues. I think it’s best we keep it simple.

Thanks for your suggestions :+1:


(Daler) #129

Thanks, Angus! I totally agree with you on KISS, but genuinely curious if you could expand on issues with Amazon’s approach. Is it about UX or Discourse-related?


(Angus McLeod) #130

There aren’t any inherent flaws with Amazon’s rating UI/UX or any inherent limitations in Discourse, it would just take considerably more work to achieve the same result in this plugin and there would be various UX tweaks to their approach and decisions that you’d need to make.

Effectively it would be a new feature-set rather than a UI tweak, which is all that is required for now.

Off the top of my head, some things you’d need to do would be:

  1. Fractional stars, which would entail a refactor of the CSS. Albeit, this has the minor caveat that the fractional star in Amazon typically does not represent the actual average. See the screenshot below for an example (4.5 according to the stars, 4.7 according to the text)

  2. Provide the rating breakdown from the server and set up the UI so that it’s consistent with the Discourse UI, e.g. the bar chart would be a new UI element you’d need to build specifically for this.

  3. Interactivity of the rating breakdown, i.e. in Amazon if you click on one of the ratings you see just those ratings. Once a rating breakdown is provided, the ability to filter the rating posts by rating is the natural next step.

Not to say that I wouldn’t want to do each of all of these things at some point, just not right now, particularly as these kind of features get more relevant when you’re dealing with consistently large volume of ratings, which (as far as I’m aware) we’re yet to see with this plugin.


(Matthew Boogaard) #131

This is awesome!

I’ve been thinking how awesome a Discourse / ecommerce integration would be. There are heaps of third-party reviews systems, but they all to some extent take the SEO and community engagement away from your site.

IMO, this plugin + your Q&A plugin would work very nicely! Basically you could relate the post to a particular product (from say a CSV or XML product feed or ecommerce CMS’s API). I guess the ratings threads would need a way to restrict topic creation so that there is only one thread per product.

On the ecommerce CMS side you’d have some kind of widget that shows a snippet of the ratings and Q&A’s for that product, similar to the WP / Discourse integration.

Thoughts?


(Angus McLeod) #132

Yes that’s all doable. I haven’t been doing a lot of work on the QnA plugin, so if you want to use that in a serious way you’ll need to take a close look at it and test its functionality thoroughly.

Not entirely sure what you mean here, but this would seem to be something your moderators would handle, at least initially.

Sounds a bit like you may want to also use Topic List Previews.


(Daler) #133

:crazy_face: Today I updated the plugin to (fd25572) and the Rating-stars disappeared from items of topics list view and on suggested topics list (i.e. I can still see the stars on a topic page).

I cannot find any elements with .topic-rating class in the source code of the topic list view. Is it a bug or is there a new setting I should enable?


(Angus McLeod) #134

Yup, minor bug. It will work as normal now. Thanks for reporting.