# Topic Ratings Plugin

**URL:** https://meta.discourse.org/t/topic-ratings-plugin/39578
**Category:** Plugin
**Tags:** pavilion
**Created:** [February 14, 2016, 9:06pm UTC](https://meta.discourse.org/t/topic-ratings-plugin/39578 "2016-02-14T21:06:53Z")
**Posts on this page:** 20
**Page:** 19

<div class="post-metadata">

### Author: ![fzngagan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fzngagan/32/259349_2.png) [@fzngagan](https://meta.discourse.org/u/fzngagan)
#### Post date: [January 25, 2021, 6:53am UTC](https://meta.discourse.org/t/topic-ratings-plugin/39578/369 "2021-01-25T06:53:32Z")

</div>

Thanks for setting up the VPS. I was able to change update the ratings on your VPS too. I suspect you’re trying to do the thing via an API? I can assist you with that on a PM.

Just be clear, can you confirm everything works fine with the discourse UI and only an issue while using the API?

Although, I see a small issue with the category settings but that’s not completely related I guess?

p.s.

I think I know what you are pointing at. Are you pointing at the fact that when you open the composer with `Uncategorized` selected, it doesn’t show any rating options in the UI. Yes, that’s a bug but I couldn’t gather that from your explaination 😅

---

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [January 25, 2021, 9:48am UTC](https://meta.discourse.org/t/topic-ratings-plugin/39578/370 "2021-01-25T09:48:15Z")

</div>

> [@fzngagan](#):
>
> . I suspect you’re trying to do the thing via an API?

As reported [Topic Ratings Plugin - #353 by Arkshine](https://meta.discourse.org/t/topic-ratings-plugin/39578/353) ; the event bug happens with either composer or using the API.

> [@fzngagan](#):
>
> Although, I see a small issue with the category settings but that’s not completely related I guess?

Not sure what issue you’re referring, but it should not be related to the event generated.

> [@fzngagan](#):
>
> I think I know what you are pointing at. Are you pointing at the fact that when you open the composer with `Uncategorized` selected, it doesn’t show any rating options in the UI. Yes, that’s a bug but I couldn’t gather that from your explaination

This is NOT my issue, this is NOT what I’ve reported. I’m really confused, don’t you see the **event** bug, despite the screenshot, videos & explanations?

Will try again: whatever you post with composer or with the API, the **generated event** , here `post_created` or `post_edited` should include the _actual_ ratings values after saving. Currently it includes the _previous_ value.

E.g.:  
I post a message with rating of 5:

- current behavior: `post_created` event includes `ratings: []`
- expected behavior: `post_created` event should include the value of 5: `ratings: [value: 5, ...]`

I edit the same message with rating of 1:

- current behavior: `post_edited` event includes `ratings: [value: 5, ...]`
- expected behavior: `post_edited` event should include the new value of 1: `ratings: [value: 1, ...]`

---

<div class="post-metadata">

### Author: ![fzngagan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fzngagan/32/259349_2.png) [@fzngagan](https://meta.discourse.org/u/fzngagan)
#### Post date: [January 25, 2021, 10:41am UTC](https://meta.discourse.org/t/topic-ratings-plugin/39578/371 "2021-01-25T10:41:37Z")

</div>

Are you referring to the webhook event?

---

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [January 25, 2021, 11:04am UTC](https://meta.discourse.org/t/topic-ratings-plugin/39578/372 "2021-01-25T11:04:09Z")

</div>

Yes, this is what I talked about since the start, I believe?

---

<div class="post-metadata">

### Author: ![fzngagan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fzngagan/32/259349_2.png) [@fzngagan](https://meta.discourse.org/u/fzngagan)
#### Post date: [January 25, 2021, 11:28am UTC](https://meta.discourse.org/t/topic-ratings-plugin/39578/373 "2021-01-25T11:28:42Z")

</div>

You used the word `event` but it would have sufficed for you to have said `webhook event`. Our current code doesnt pass the rating details correctly to the webhook payload.

I do acknowledge the confusion on my part too.

I think its an intresting usecase though. Can you create a feature request on our Pavilion instance?

---

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [January 25, 2021, 11:41am UTC](https://meta.discourse.org/t/topic-ratings-plugin/39578/374 "2021-01-25T11:41:49Z")

</div>

> [@fzngagan](#):
>
> You used the word `event` but it would have sufficed for you to have said `webhook event` . Our current code doesnt pass the rating details correctly to the webhook payload.

Come one, I know my english is not the best, but I showed you many times with screenshot and video, the webhook events panel, describing exactly the `ratings` field value issue, with the name of the events `post_created`/`post_edited` (with code formatting) which can be only webhook event names…

> [@fzngagan](#):
>
> Can you create a feature request on our Pavilion instance?

Alright, will create a **bug** report there.

---

<div class="post-metadata">

### Author: ![fzngagan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fzngagan/32/259349_2.png) [@fzngagan](https://meta.discourse.org/u/fzngagan)
#### Post date: [January 25, 2021, 11:46am UTC](https://meta.discourse.org/t/topic-ratings-plugin/39578/375 "2021-01-25T11:46:47Z")

</div>

I said feature request coz we don’t gurantee(yet) that the webhook payload will reflect the custom fields we create for our plugins. But we’re flexible on what the reports should be called. 😉

---

<div class="post-metadata">

### Author: ![fzngagan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fzngagan/32/259349_2.png) [@fzngagan](https://meta.discourse.org/u/fzngagan)
#### Post date: [January 25, 2021, 11:55am UTC](https://meta.discourse.org/t/topic-ratings-plugin/39578/376 "2021-01-25T11:55:09Z")

</div>

Can you create a bug report on [https://thepavilion.io](https://thepavilion.io)?

---

<div class="post-metadata">

### Author: ![hosna](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hosna/32/99969_2.png) [@hosna](https://meta.discourse.org/u/hosna)
#### Post date: [January 30, 2021, 5:19pm UTC](https://meta.discourse.org/t/topic-ratings-plugin/39578/377 "2021-01-30T17:19:21Z")

</div>

![image](https://global.discourse-cdn.com/meta/original/3X/1/5/155829cf3479185f2f21a1331161b98ef552a859.png)

I dont underestand these new options. where are they explained?

---

<div class="post-metadata">

### Author: ![fzngagan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fzngagan/32/259349_2.png) [@fzngagan](https://meta.discourse.org/u/fzngagan)
#### Post date: [January 30, 2021, 5:23pm UTC](https://meta.discourse.org/t/topic-ratings-plugin/39578/378 "2021-01-30T17:23:00Z")

</div>

Hi @hosna  
I do realize we’re a bit behind in terms of documention how the new ratings system works for the admin. Although, there’s this topic which can help you get through initially. [Pavilion](https://thepavilion.io/t/rating-types/3049/2)

Secondly, if you can point out the pain points in setting up the plugin, I can help you out via a PM and can write more docs which would be helpful for others too.

---

<div class="post-metadata">

### Author: ![Iceman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/iceman/32/181309_2.png) [@Iceman](https://meta.discourse.org/u/Iceman)
#### Post date: [February 8, 2021, 10:44am UTC](https://meta.discourse.org/t/topic-ratings-plugin/39578/379 "2021-02-08T10:44:00Z")

</div>

Hi,

Was playing around with the plugin to see how it works and as of now ( Discourse [5cff198aba](https://github.com/discourse/discourse/commits/5cff198abab6af7dcdfa1283684c917b1d597e56) with latest Ratings Plugin), there is a small bug that I thought I would let you guys know about:

If you try to filter the replies on a topic per user, the result is blank, does not show any results. It does “finish” loading/filtering, but it’s just blank, empty.

This happens with both the new reply filter option and the default one. However, the new message/reply filter option does work perfectly and it is my understanding that this new filter leverages on the user-reply-filter that doesn’t seem to work when the Topic Ratings Plugin is enabled.

If you disable the Plugin, it works as usual.

Thanks for the great work you guys do!

---

<div class="post-metadata">

### Author: ![fzngagan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fzngagan/32/259349_2.png) [@fzngagan](https://meta.discourse.org/u/fzngagan)
#### Post date: [February 8, 2021, 1:39pm UTC](https://meta.discourse.org/t/topic-ratings-plugin/39578/380 "2021-02-08T13:39:06Z")

</div>

Thanks for the catch. can you report it at [Pavilion](https://thepavilion.io/w/bug-report)

---

<div class="post-metadata">

### Author: ![kinqlev](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kinqlev/32/226287_2.png) [@kinqlev](https://meta.discourse.org/u/kinqlev)
#### Post date: [July 2, 2021, 9:36am UTC](https://meta.discourse.org/t/topic-ratings-plugin/39578/381 "2021-07-02T09:36:53Z")

</div>

Thanks for the plugin!

Can have a small feature that restrict rating base on the account age / days visited / posts read / topics posted etc to prevent user creating new accounts and manipulate the ratings?

---

<div class="post-metadata">

### Author: ![fzngagan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fzngagan/32/259349_2.png) [@fzngagan](https://meta.discourse.org/u/fzngagan)
#### Post date: [July 2, 2021, 9:52am UTC](https://meta.discourse.org/t/topic-ratings-plugin/39578/382 "2021-07-02T09:52:12Z")

</div>

Please make a feature request here. [Pavilion](https://thepavilion.io/w/feature-request)

---

<div class="post-metadata">

### Author: ![GVG](https://avatars.discourse-cdn.com/v4/letter/g/ba9def/32.png) [@GVG](https://meta.discourse.org/u/GVG)
#### Post date: [February 1, 2022, 8:50am UTC](https://meta.discourse.org/t/topic-ratings-plugin/39578/383 "2022-02-01T08:50:41Z")

</div>

Hi, when topic have for example 5-10 rating parameters it can be too much to display them at topics listing, search results, etc. Can your plugin:

1. Auto-calculate the average number of all ratings at 1 message and display avg number at each message with ratings?
2. Auto-calculate average number for all avg rating of rating messages inside topic and display it at topics listing?

If not - how fast you can add such enough simple feature, please?

---

<div class="post-metadata">

### Author: ![balupton](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/balupton/32/255461_2.png) [@balupton](https://meta.discourse.org/u/balupton)
#### Post date: [February 14, 2022, 7:39pm UTC](https://meta.discourse.org/t/topic-ratings-plugin/39578/384 "2022-02-14T19:39:36Z")

</div>

> [@fzngagan](#):
>
> [🖥 See an example](https://try.thepavilion.io)

Can this link be updated with a topic that exhibits the rating functionality, thank you!

---

<div class="post-metadata">

### Author: ![oganer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/oganer/32/103794_2.png) [@oganer](https://meta.discourse.org/u/oganer)
#### Post date: [March 16, 2022, 3:39am UTC](https://meta.discourse.org/t/topic-ratings-plugin/39578/385 "2022-03-16T03:39:13Z")

</div>

Updated link in first post.

---

<div class="post-metadata">

### Author: ![Randy\_Hulett](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/randy_hulett/32/182177_2.png) [@Randy\_Hulett](https://meta.discourse.org/u/Randy_Hulett)
#### Post date: [April 25, 2022, 10:29pm UTC](https://meta.discourse.org/t/topic-ratings-plugin/39578/386 "2022-04-25T22:29:18Z")

</div>

Our community members often submit solutions as new topics. We’d love to implement a plugin like this so community members could validate the functionality, usability and security of submitted solutions. We are intrigued by this plugin.

We are on a Discourse-hosted business plan, and it appears that this plugin can only be installed on communities not hosted by Discourse.

As there doesn’t appear to be anything similar in [the plugin directory](https://www.discourse.org/plugins#business), does anyone have any recommendations on how to implement custom ratings on a per-topic level within specific categories?

Thanks,  
Randy

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [April 27, 2022, 7:03am UTC](https://meta.discourse.org/t/topic-ratings-plugin/39578/388 "2022-04-27T07:03:13Z")

</div>

Not that I’m aware of. It’s probably worth discussing this with [Discourse.org](http://Discourse.org) support though.

---

<div class="post-metadata">

### Author: ![darkpixlz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/darkpixlz/32/549896_2.png) [@darkpixlz](https://meta.discourse.org/u/darkpixlz)
#### Post date: [July 14, 2022, 4:51am UTC](https://meta.discourse.org/t/topic-ratings-plugin/39578/389 "2022-07-14T04:51:40Z")

</div>

Hey, the plugin is breaking the reply composer. Not the background, that’s just firefox being firefox, but I cant see the preview and upload images. Please fix this ASAP.

[https://streamable.com/gz9oed](https://streamable.com/gz9oed)

[Previous page](https://meta.discourse.org/t/topic-ratings-plugin/39578.md?page=18)

[Next page](https://meta.discourse.org/t/topic-ratings-plugin/39578.md?page=20)
