# How can I add "dislike" button?

**URL:** https://meta.discourse.org/t/how-can-i-add-dislike-button/51648
**Category:** Development
**Created:** [2016年十月17日 17:31 UTC](https://meta.discourse.org/t/how-can-i-add-dislike-button/51648 "2016-10-17T17:31:47Z")
**Posts on this page:** 15
**Page:** 2

<div class="post-metadata">

### Author: ![mcbuzz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcbuzz/32/120977_2.png) [@mcbuzz](https://meta.discourse.org/u/mcbuzz)
#### Post date: [2017年五月13日 09:46 UTC](https://meta.discourse.org/t/how-can-i-add-dislike-button/51648/23 "2017-05-13T09:46:37Z")

</div>

Or is there a debugger I can use that will show me the instance variables and routes by clicking and interacting with the web page?

---

<div class="post-metadata">

### Author: ![fefrei](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fefrei/32/119538_2.png) [@fefrei](https://meta.discourse.org/u/fefrei)
#### Post date: [2017年五月13日 09:56 UTC](https://meta.discourse.org/t/how-can-i-add-dislike-button/51648/24 "2017-05-13T09:56:10Z")

</div>

The Retort plugin is a small plugin (a few pages of code), and is _incredibly_ close to what you want to do – it is just more general and lacks the ties into the trust level system. You definitely should start by understanding how it works!

---

<div class="post-metadata">

### Author: ![tophee](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tophee/32/73406_2.png) [@tophee](https://meta.discourse.org/u/tophee)
#### Post date: [2017年五月13日 10:36 UTC](https://meta.discourse.org/t/how-can-i-add-dislike-button/51648/25 "2017-05-13T10:36:46Z")

</div>

> [@mcbuzz](#):
>
> It always goes well when people think they know better than anyone else what people want.

I agree (with the sarkasm). But the challenge is to find out what exactly people want. It’s a challenge because “people” implies diverse needs and opinions and you need to find a way to decide which path to take. This is why I quoted from “How does the Discourse project work”, not because I necessarily agree with all the criteria layed out there but because this is how the Discourse project works.

I wouldn’t say that “complaints driven software development” is much about "people knowing better than others. If were referring to the Discourse philosophy, then I wonder whether you mean to imply that there shouldn’t be any philosophy or whether anyone should be allowed to change it at will or whether you just wanted to call the “anti-downvote policy” into question.

If the latter is the case (which was how I understood you) you simply have to be aware that this goes very deep into the basic philosophy of Discourse, and to point that out was the only point of my post.

Although I do agree that the tone on this forum is not always as friendly and argument oriented as it could be, I would say that your request has been treated with much goodwill here, _in spite_ of it going against the Discourse philosophy. The point of disagreement is probably in just how much an effort a community should make to assist a member in achieving something they themselves don’t really believe in.

---

<div class="post-metadata">

### Author: ![mcbuzz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcbuzz/32/120977_2.png) [@mcbuzz](https://meta.discourse.org/u/mcbuzz)
#### Post date: [2017年五月13日 10:43 UTC](https://meta.discourse.org/t/how-can-i-add-dislike-button/51648/26 "2017-05-13T10:43:33Z")

</div>

I’m using it but I think I having the same issue as another user in that it’s not showing up in any of the posts and no errors. But of course I definitely will go through his code to understand how he did it since it’s so similar. Would you consider this relevant to what I’m trying to do? I found it in the plugin api file:

````javascript
/**
   * Add a new button below a post with your plugin.
   *
   * The `callback` function will be called whenever the post menu is rendered,
   * and if you return an object with the button details it will be rendered.
   *
   * Example:
   *
   * ```
   * api.addPostMenuButton('coffee', () => {
   * return {
   * action: 'drinkCoffee',
   * icon: 'coffee',
   * className: 'hot-coffee',
   * title: 'coffee.title',
   * position: 'first' // can be `first`, `last` or `second-last-hidden`
   * };
   * });
   **/

  addPostMenuButton(name, callback) {
    addButton(name, callback);
}

````

---

<div class="post-metadata">

### Author: ![mcbuzz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcbuzz/32/120977_2.png) [@mcbuzz](https://meta.discourse.org/u/mcbuzz)
#### Post date: [2017年五月13日 10:58 UTC](https://meta.discourse.org/t/how-can-i-add-dislike-button/51648/27 "2017-05-13T10:58:04Z")

</div>

In truth, I do find the “philosophy” irrelevant. It’s not what attracted me to using this platform. I think it’s great they feel so strongly about their idea of a perfect community, but it’s a bit much to expect everyone who is taking advantage of the open-source nature to feel the same way especially when I’m not contributing in a development basis, but production. I’m not trying to dictate what they believe should be the core platform. This isn’t a feature request. I posted here because the people here are very knowledgeable about how this system works; as they should be they created it. I’m asking they share their knowledge so that I can be able to take full advantage. Yet people would rather tell you what they think you should have instead of answering your question. If it’s technically or logistically impossible, that makes sense but to stonewall me due to a purely philosophical basis is not open discourse or whatever they claim.

---

<div class="post-metadata">

### Author: ![fefrei](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fefrei/32/119538_2.png) [@fefrei](https://meta.discourse.org/u/fefrei)
#### Post date: [2017年五月13日 11:13 UTC](https://meta.discourse.org/t/how-can-i-add-dislike-button/51648/28 "2017-05-13T11:13:47Z")

</div>

I think this is relevant. Here’s why:

> <https://github.com/gdpelican/retort/blob/ef21c03f66d9192a04e3190177146e9b8bf747a7/assets/javascripts/discourse/initializers/retort-init.js.es6#L32>

---

<div class="post-metadata">

### Author: ![mcbuzz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcbuzz/32/120977_2.png) [@mcbuzz](https://meta.discourse.org/u/mcbuzz)
#### Post date: [2017年五月13日 11:15 UTC](https://meta.discourse.org/t/how-can-i-add-dislike-button/51648/29 "2017-05-13T11:15:07Z")

</div>

Thank you so much for connecting the dots!

---

<div class="post-metadata">

### Author: ![grahamperrin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/grahamperrin/32/71406_2.png) [@grahamperrin](https://meta.discourse.org/u/grahamperrin)
#### Post date: [2017年五月13日 13:02 UTC](https://meta.discourse.org/t/how-can-i-add-dislike-button/51648/30 "2017-05-13T13:02:39Z")

</div>

^ 👍

> [@mcbuzz](#):
>
> … I’m not trying to convince or disregard their opinion, but this is a something that our users use and want. Not only that, moderators would use it to see who’s not fitting into the community at large whether due to trolling or other reasons.

I’m curious.

Are those users _hesitant_ about flagging posts that don’t fit?

Do they, maybe, _imagine_ that flagging will not lead to an agreeable outcome?

Are those users accustomed to the _immediacy of publicly showing their distaste_ for something? (That’s not a loaded question. If that’s their habit, that’s just the way it is, no good pretending otherwise.)

Do they get a group feelgood factor from _collective distaste_?

> [@Mittineague](#):
>
> … the effect such a feature would have on community spirit.
> 
> I imagine most people are tough-skinned enough, …

The appearance of thick skin can be deceiving 🙂 but I guess that if a person will knowingly speak or write in an area where negativity is a feature, the person should be prepared to apply his or her own bandage after being cut.

Or (@mcbuzz) do your people club together to feel good after one person gets cut by a slash of negadisliky?

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [2017年五月13日 13:50 UTC](https://meta.discourse.org/t/how-can-i-add-dislike-button/51648/31 "2017-05-13T13:50:35Z")

</div>



---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [2017年五月16日 14:50 UTC](https://meta.discourse.org/t/how-can-i-add-dislike-button/51648/32 "2017-05-16T14:50:06Z")

</div>

This topic was automatically opened after 3 days.

---

<div class="post-metadata">

### Author: ![Yu\_Gong1](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/yu_gong1/32/98413_2.png) [@Yu\_Gong1](https://meta.discourse.org/u/Yu_Gong1)
#### Post date: [2018年十二月25日 10:50 UTC](https://meta.discourse.org/t/how-can-i-add-dislike-button/51648/33 "2018-12-25T10:50:24Z")

</div>

Hi how did you use the post menu to add this kind of feature? 🙂

There is the like count and like added as default in post menu but how do you use the post menu to additional such as the dislike? Or does discourse need to be self hosted to extend the post menu items?

---

<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: [2018年十二月25日 11:56 UTC](https://meta.discourse.org/t/how-can-i-add-dislike-button/51648/34 "2018-12-25T11:56:38Z")

</div>

> [@Yu\_Gong1](#):
>
> how did you use the post menu to add this kind of feature?

I didn’t. I used the browsers developers tools to make edits to what was displayed.

AFAIK, the closest thing to a “dislike” feature at this time is still

> [@How can I add "dislike" button?](https://meta.discourse.org/t/how-can-i-add-dislike-button/51648/9):
>
> @mcbuzz Have a look at [the Retort plugin](https://github.com/cpradio/retort) code.

---

<div class="post-metadata">

### Author: ![Dominique\_Dutoit](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dominique_dutoit/32/155880_2.png) [@Dominique\_Dutoit](https://meta.discourse.org/u/Dominique_Dutoit)
#### Post date: [2019年九月24日 16:43 UTC](https://meta.discourse.org/t/how-can-i-add-dislike-button/51648/36 "2019-09-24T16:43:28Z")

</div>

我希望它不会像投票系统那样。你只能投“赞成”或不投票。这很奇怪！

---

<div class="post-metadata">

### Author: ![neerajsingh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neerajsingh/32/165330_2.png) [@neerajsingh](https://meta.discourse.org/u/neerajsingh)
#### Post date: [2020年二月3日 05:34 UTC](https://meta.discourse.org/t/how-can-i-add-dislike-button/51648/37 "2020-02-03T05:34:54Z")

</div>

这很有趣吗？😃  
你好，我想查看帖子的点赞和点踩状态，如果你知道的话，请帮帮我。

---

<div class="post-metadata">

### Author: ![HAWK](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hawk/32/86627_2.png) [@HAWK](https://meta.discourse.org/u/HAWK)
#### Post date: [2020年二月3日 05:48 UTC](https://meta.discourse.org/t/how-can-i-add-dislike-button/51648/38 "2020-02-03T05:48:22Z")

</div>

以上信息状态未发生变化。

[上一頁](https://meta.discourse.org/t/how-can-i-add-dislike-button/51648.md?page=1)
