Topic Ratings Plugin

Is it possible to use 2 step rating instead of stars?`

Like :+1: :-1: With a result like

:+1: (69%) :-1: (31%)

2 Likes

Does this plugin expose the average rating and number of ratings of a topic as 1-2 simply API calls somehow?

1 Like

And is it possible to show the ratings when embedding Discourse as in Embed Discourse comments on another website via Javascript ?

1 Like

As a user, how can one see all one’s ratings?

PS: Sorry for posting question after question, but I think this is the appropriate please, yes?

2 Likes

HI @frold,

I appreciate your patience and apologize for the delay in my response. I’ve been preoccupied with other commitments but am back now and ready to address your questions.

The possibility of having a 2-step rating system is interesting. The current design of the Topics Ratings Plugin supports a star-based system, but I see the value in a simpler, thumbs up/down system. Although this is not currently a feature, it’s a compelling idea and I’ll certainly explore its feasibility for a future update. We are also open to sponsorships or funding for the development of specific features. If you’re interested in sponsoring this feature or any other, please feel free to get in touch.

Hi @n1bff,

My sincere apologies for the delayed response. Your patience is truly appreciated. I had other engagements that required my attention, but I’m now here to focus on your inquiries.

As of now, the plugin does not provide direct API calls for average rating and number of ratings for a topic. While we recognize the convenience this could provide, it’s not a current feature but something I’ll certainly consider for future enhancements.

Similarly, displaying ratings when embedding comments and providing a consolidated view of all a user’s ratings are not currently supported. These are thoughtful suggestions, and rest assured, I will look into their feasibility.

As we are an open-source project, any feature developments could be expedited through sponsorships or funding. If you or your organization are interested in sponsoring these or other features, please reach out.

I cannot delete the Type because of an error.

When I try to delete “The Name is … and the Type is empty”, an error message “The requested URL or resource could not be found.” is displayed and I cannot delete it.

Even if I uninstall and reinstall the plugin by “Rebuild the container”, the same error occurs.

It appears that an invalid type was added, resulting in an empty type. The plugin definitely needs a sanity check for input validation.

For now, you can use the Rails console to delete the empty type:

cd /var/discourse
./launcher enter app
rails c
DiscourseRatings::RatingType.destroy("")
exit

Refresh the page, and it should be gone!
Keep the type simple, such as my_type, and you are good. :smile:

2 Likes

That’s super cool! Thanks for telling me.

1 Like

Text categories other than English are not displayed.

Categories must be displayed for non-English text to be managed.

How do I display them?

※ Also, In the case of Type, an error will occur if a non-English character is entered.

@LoveMCJ A quick fix for this is to define a slug for your category, then delete/add the category for the rating again. This should work!

@jumagura

I see an issue here:

Category.slugFor will return either the slug if it exists or {id}-category if not defined.

The plugin uses findBySlugPath, which only looks for categories with a slug defined.
For categories without, findSingleBySlug should likely be used as well.

I hope that helps! :slight_smile:

2 Likes

:heart_eyes:I really appreciate it from the bottom of my heart.

1 Like

Hi,
The rating star appears on any topic title page.
But on the homepage, I see [object Object] instead of the rating star of the posts.

How can I fix this?

*Note: The problem occurred after the update.( Discourse and Topic Ratings Plugin and other Everything is up to date)

2 Likes

When I remove this option, the [object Object] text disappears. Are you planning to do anything about this? I think this should be fixed.

Kind regards. Good Work. @jumagura

image

@merefield

On your last changes

It misses:

import { registerRawHelper } from "discourse-common/lib/helpers";

registerRawHelper("rating-list", _ratingList);
2 Likes

Ooooops! You are quite right! thx!

done:

4 Likes

Hi, can this plugin be used for rating posts rather than topics? If so, could someone let me know if it also do these 3 things?

  • enable rating on all posts in a topic after the posts are created
  • be configured so that users can’t see other users’ ratings or average ratings
  • export a CSV with each user name and their ratings for each post

Hi, :wave:

That’s not possible with this plugin.

The closest plugin I could find is Discourse Post Voting (thanks, Jammy, for correcting my silliness :sweat_smile:). Users can upvote posts once per topic (except the first post), so the rating would be the number of upvotes.

To export a list of users with ratings, you can use this plugin: Discourse Data Explorer. You can create an SQL query, and you will be able to download the list in CSV format. Check data & reporting sql-query if you need help.

Also, there is marketplace if you can afford to sponsor someone to make the exact plugin you’re looking for. :+1:

1 Like

Just an FYI, that plugin has been deprecated in favour of the official Discourse Post Voting plugin.

1 Like