# Topic Ratings Plugin

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

<div class="post-metadata">

### Author: ![parisa](https://avatars.discourse-cdn.com/v4/letter/p/91b2a8/32.png) [@parisa](https://meta.discourse.org/u/parisa)
#### Post date: [2월 10, 2018, 1:51오후 UTC](https://meta.discourse.org/t/topic-ratings-plugin/39578/144 "2018-02-10T13:51:54Z")

</div>

[here](https://talk.zabanshenas.com/c/review) is all our rating topics.

you can open [this one](https://talk.zabanshenas.com/t/%D8%A7%D8%B1%D8%B2%DB%8C%D8%A7%D8%A8%DB%8C-%D8%A7%D9%BE%D9%84%DB%8C%DA%A9%DB%8C%D8%B4%D9%86-%D8%B2%D8%A8%D8%A7%D9%86%D8%B4%D9%86%D8%A7%D8%B3/540/4588) since it is the most rated topic.

---

<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: [2월 11, 2018, 1:31오전 UTC](https://meta.discourse.org/t/topic-ratings-plugin/39578/145 "2018-02-11T01:31:10Z")

</div>

> [@parisa](#):
>
> you can open this one since it is the most rated topic.

The slow load of that topic may have more to do with it having 4542 posts 🙂 That’s a very long topic.

Nevertheless, I’ve made some performance improvements. The first time you load the topic you won’t notice a difference, but subsequent loads may be faster, if the ratings plugin is having any effect on the load time.

[https://github.com/angusmcleod/discourse-ratings/commit/55dd33988d3fd9b7b4368d7618d19481176de13f](https://github.com/angusmcleod/discourse-ratings/commit/55dd33988d3fd9b7b4368d7618d19481176de13f)

Let me know how it goes.

---

<div class="post-metadata">

### Author: ![parisa](https://avatars.discourse-cdn.com/v4/letter/p/91b2a8/32.png) [@parisa](https://meta.discourse.org/u/parisa)
#### Post date: [2월 11, 2018, 6:30오전 UTC](https://meta.discourse.org/t/topic-ratings-plugin/39578/146 "2018-02-11T06:30:27Z")

</div>

> [@angus](#):
>
> The slow load of that topic may have more to do with it having 4542 posts 🙂 That’s a very long topic.

but as I told previously, it was ok until some days ago I updated both discourse and this plugin to the latest version.

---

<div class="post-metadata">

### Author: ![parisa](https://avatars.discourse-cdn.com/v4/letter/p/91b2a8/32.png) [@parisa](https://meta.discourse.org/u/parisa)
#### Post date: [2월 11, 2018, 10:48오후 UTC](https://meta.discourse.org/t/topic-ratings-plugin/39578/147 "2018-02-11T22:48:49Z")

</div>

I updated the plugin, but unfortunately it didn’t have any effect imo. What is it that takes the most process in this plugin?

If it is calculating the average rating, maybe you could cache the value for, lets say, one day perhaps?

It could be a disaster for rating topics like mine that rapidly grows in number of posts.

However again I need to say that this problem occurred very recently in my last update (discourse core + all plugin). So maybe its because of one of your new commits, or even commits to the core discourse that caused the problem?

---

<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: [2월 12, 2018, 12:37오전 UTC](https://meta.discourse.org/t/topic-ratings-plugin/39578/148 "2018-02-12T00:37:34Z")

</div>

> [@parisa](#):
>
> However again I need to say that this problem occurred very recently in my last update (discourse core + all plugin). So maybe its because of one of your new commits, or even commits to the core discourse that caused the problem?

Aside from the changes I just made, none of my commits in the last few months to this plugin would have had an effect on performance. They were style and translation changes.

So if there has been a noticeable deterioration in performance in those very large topics in the last few days, it is probably something core related.

I can take a look in more detail at what might have caused this in core Discourse later this week, but you should raise this with the Discourse team.

\*edit @parisa You may want to have a read of this topic: [Performance improvements on long topics?](https://meta.discourse.org/t/performance-improvements-on-long-topics/30187). Another host with a topic of a similar size (i.e. 4.5K posts) has the same issue:

> [@Performance improvements on long topics?](https://meta.discourse.org/t/performance-improvements-on-long-topics/30187/13):
>
> Whats the performance impact of long threads? I have one that has escalated to 4.5K very rapidly and will keep escalating for at least 36 hours. Expecting thousands of messages, server is screaming. Will it help anything to close the thread and start a new one, a “part 2” to continue the discussion? Ping @codinghorror, @sam

---

<div class="post-metadata">

### Author: ![parisa](https://avatars.discourse-cdn.com/v4/letter/p/91b2a8/32.png) [@parisa](https://meta.discourse.org/u/parisa)
#### Post date: [2월 12, 2018, 7:18오전 UTC](https://meta.discourse.org/t/topic-ratings-plugin/39578/149 "2018-02-12T07:18:57Z")

</div>

> [@angus](#):
>
> So if there has been a noticeable deterioration in performance in those very large topics in the last few days, it is probably something core related.

Yes you are right. I think I found the problem. Its the new [mixed text direction feature](https://meta.discourse.org/t/recommended-way-to-handle-rtl-mixed-with-ltr-languages/78894/20).

---

<div class="post-metadata">

### Author: ![frold](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/frold/32/82547_2.png) [@frold](https://meta.discourse.org/u/frold)
#### Post date: [2월 16, 2018, 2:14오후 UTC](https://meta.discourse.org/t/topic-ratings-plugin/39578/150 "2018-02-16T14:14:49Z")

</div>

Quick question: To rate a topic do you need to post in it - or can you rate without making a reply to the topic?

Im asking as I would like to add a book review section to my site. Im not sure what is best: being able to add star rating with or without adding a reply/reason… 🤔

---

<div class="post-metadata">

### Author: ![frold](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/frold/32/82547_2.png) [@frold](https://meta.discourse.org/u/frold)
#### Post date: [2월 18, 2018, 8:10오전 UTC](https://meta.discourse.org/t/topic-ratings-plugin/39578/151 "2018-02-18T08:10:30Z")

</div>

Now I have installed this great plugin.

I have a question to the styling

1. “No ratings yet”  
I would like that if it is rated then show the stars. If not, show nothing. I dont want a list of “No ratings yet”, is that possible?

2. Could “7” and “17” in the blue circle is normally placed after the title. Is that possible?

 ![36](https://global.discourse-cdn.com/meta/original/3X/a/9/a9f161ea40e4642f4b53803b699e4110dba5a1fd.png)

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [2월 18, 2018, 5:23오후 UTC](https://meta.discourse.org/t/topic-ratings-plugin/39578/152 "2018-02-18T17:23:51Z")

</div>

Maybe instead of not showing “no ratings yet” it would be better to show a type of “be the first to rate”?

---

<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: [2월 20, 2018, 8:31오전 UTC](https://meta.discourse.org/t/topic-ratings-plugin/39578/153 "2018-02-20T08:31:38Z")

</div>

> [@frold](#):
>
> “No ratings yet”
> 
> I would like that if it is rated then show the stars. If not, show nothing. I dont want a list of “No ratings yet”, is that possible?
> 
> Could “7” and “17” in the blue circle is normally placed after the title. Is that possible?

I will take at look at both issues tomorrow.

---

<div class="post-metadata">

### Author: ![frold](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/frold/32/82547_2.png) [@frold](https://meta.discourse.org/u/frold)
#### Post date: [2월 20, 2018, 8:49오전 UTC](https://meta.discourse.org/t/topic-ratings-plugin/39578/154 "2018-02-20T08:49:57Z")

</div>

Else show the icon for no stars yet (5 empty stars).

The mix of text and grafic is not eye candy, I think 😃

---

<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: [2월 21, 2018, 7:20오전 UTC](https://meta.discourse.org/t/topic-ratings-plugin/39578/155 "2018-02-21T07:20:08Z")

</div>

I’ve removed the ‘No ratings yet’ label from the topic list. As you allude, it’s not really necessary there. That also fixes the unread count alignment

[Remove no\_ratings label from topic list · paviliondev/discourse-ratings@f25c9f3 · GitHub](https://github.com/angusmcleod/discourse-ratings/commit/f25c9f38be6d4184268d49d24ac9069dd7af6603)

 ![20%20PM](https://global.discourse-cdn.com/meta/original/3X/1/d/1d0538cd0c267d2b6a9d929f4607109ed3a30a2a.png)

It’s still in the topic itself.

 ![27%20PM](https://global.discourse-cdn.com/meta/original/3X/b/c/bcd7c07f90b367b16731d363c247c83c92726137.png)

You can edit the text itself by editing the translation files in Admin \> Customize \> Text Content. Search for “no\_ratings”.

 ![47%20PM](https://global.discourse-cdn.com/meta/original/3X/7/0/700232d3a6eba763270982e996e0e338ff102b80.png)

---

<div class="post-metadata">

### Author: ![frold](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/frold/32/82547_2.png) [@frold](https://meta.discourse.org/u/frold)
#### Post date: [2월 21, 2018, 7:33오전 UTC](https://meta.discourse.org/t/topic-ratings-plugin/39578/156 "2018-02-21T07:33:09Z")

</div>

Much better 😃

Before

 ![58](https://global.discourse-cdn.com/meta/original/3X/5/6/56bba4025bb0ab97c4fd773ad8b4ee3955b38eda.png)

Now

 ![16](https://global.discourse-cdn.com/meta/original/3X/a/8/a8f5b8caadbc46e7c1a20f6f63ce531c73bd80b8.png)

But there is still a line break from title to “unread posts” - the blue circle

This is the look in a category where you havent enable ratings

 ![05](https://global.discourse-cdn.com/meta/original/3X/e/c/ec5d2752d9703ed01e637eb481d2d1de5be6af88.png)

But much better 👍

---

<div class="post-metadata">

### Author: ![frold](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/frold/32/82547_2.png) [@frold](https://meta.discourse.org/u/frold)
#### Post date: [3월 6, 2018, 11:09오전 UTC](https://meta.discourse.org/t/topic-ratings-plugin/39578/157 "2018-03-06T11:09:54Z")

</div>

> [@frold](#):
>
> But there is still a line break from title to “unread posts” - the blue circle

Any plans to solve this?

---

<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: [3월 7, 2018, 2:45오전 UTC](https://meta.discourse.org/t/topic-ratings-plugin/39578/158 "2018-03-07T02:45:59Z")

</div>

Apologies, this got left off my list. Now fixed:

[https://github.com/angusmcleod/discourse-ratings/commit/3827b080089d26ecd30d514430ae1ff857e715ba](https://github.com/angusmcleod/discourse-ratings/commit/3827b080089d26ecd30d514430ae1ff857e715ba)

---

<div class="post-metadata">

### Author: ![frold](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/frold/32/82547_2.png) [@frold](https://meta.discourse.org/u/frold)
#### Post date: [3월 12, 2018, 9:42오전 UTC](https://meta.discourse.org/t/topic-ratings-plugin/39578/159 "2018-03-12T09:42:18Z")

</div>

Thanks

And the rich data thing is neat!! Thanks

 ![44](https://global.discourse-cdn.com/meta/original/3X/4/e/4eb0a611aa7d290b5377d39e815cb15873e2a517.png)

Based on this

 ![54](https://global.discourse-cdn.com/meta/original/3X/b/a/bafcb7e3c520097c04c13df326f64fab09894ec6.png)

---

<div class="post-metadata">

### Author: ![thaidb](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thaidb/32/68488_2.png) [@thaidb](https://meta.discourse.org/u/thaidb)
#### Post date: [3월 18, 2018, 3:49오후 UTC](https://meta.discourse.org/t/topic-ratings-plugin/39578/160 "2018-03-18T15:49:55Z")

</div>

How add rating effect all category?

---

<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: [3월 19, 2018, 5:23오전 UTC](https://meta.discourse.org/t/topic-ratings-plugin/39578/161 "2018-03-19T05:23:18Z")

</div>

This plugin has to be turned on for each category you want to use it in. I don’t think it would make sense to have a site-wide setting.

---

<div class="post-metadata">

### Author: ![Ivan\_Rapekas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ivan_rapekas/32/248924_2.png) [@Ivan\_Rapekas](https://meta.discourse.org/u/Ivan_Rapekas)
#### Post date: [4월 3, 2018, 10:15오후 UTC](https://meta.discourse.org/t/topic-ratings-plugin/39578/162 "2018-04-03T22:15:24Z")

</div>

Is it possible to have an option to enable this plugin only for group, staff for instance? Regular users should not see stars anyway.

---

<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: [4월 4, 2018, 8:47오전 UTC](https://meta.discourse.org/t/topic-ratings-plugin/39578/163 "2018-04-04T08:47:22Z")

</div>

Do you mean only allow a specific group to add stars to a post?

Or only allow a specific group to see stars on posts at all? Or both?

Do non-group users still have access to the ratings topics at all in your scenario?

[이전 페이지](https://meta.discourse.org/t/topic-ratings-plugin/39578.md?page=7)

[다음 페이지](https://meta.discourse.org/t/topic-ratings-plugin/39578.md?page=9)
