# Plugin: Ask me anything or Q&A format (threaded replies)

**URL:** https://meta.discourse.org/t/plugin-ask-me-anything-or-q-a-format-threaded-replies/44950
**Category:** Feature
**Tags:** rfc
**Created:** [2016年五月28日 17:39 UTC](https://meta.discourse.org/t/plugin-ask-me-anything-or-q-a-format-threaded-replies/44950 "2016-05-28T17:39:59Z")
**Posts on this page:** 20
**Page:** 2

<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: [2016年十二月1日 07:40 UTC](https://meta.discourse.org/t/plugin-ask-me-anything-or-q-a-format-threaded-replies/44950/21 "2016-12-01T07:40:43Z")

</div>

Ah, that’s not what I’d call “one level” threading.

```plaintext
Question
	Answer
		Comment
		Comment
	Answer
		Comment
		Comment
	Answer
		Comment
		Comment

```

Unless I’m missing an easier way to do it, this would require significantly more work than JavaScript and CSS alone could do.

Not only would the DOM need to be substituted but the database would need changing too.

---

<div class="post-metadata">

### Author: ![walker](https://avatars.discourse-cdn.com/v4/letter/w/d26b3c/32.png) [@walker](https://meta.discourse.org/u/walker)
#### Post date: [2016年十二月1日 09:49 UTC](https://meta.discourse.org/t/plugin-ask-me-anything-or-q-a-format-threaded-replies/44950/22 "2016-12-01T09:49:31Z")

</div>

I thought the current forum already supports this question-answer-comment structure, just displaying it in a different way.

right now it looks like

```plaintext
Question
	Answer 1
	Answer 2
        Comment 1 to Answer 1
	Comment 1 to Answer 2
        Comment 2 to Answer 2
        Comment 2 to Answer 1
	Answer 3
        Comment 3 to Answer 1
	Comment 1 to Answer 3

```

but the good news is each answer can already show it’s comments. (replies to them)

so what I can think of involves only two tasks

1. display those comments as the button is clicked
2. hidden those posts that have already been displayed.

why do we need to change the database?

---

<div class="post-metadata">

### Author: ![erlend\_sh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/erlend_sh/32/119475_2.png) [@erlend\_sh](https://meta.discourse.org/u/erlend_sh)
#### Post date: [2016年十二月2日 12:56 UTC](https://meta.discourse.org/t/plugin-ask-me-anything-or-q-a-format-threaded-replies/44950/23 "2016-12-02T12:56:21Z")

</div>

I know messing with the post stream is bad bad bad, but like you I came to the conclusion that we just need to..

- _hide_ replies from the main stream, just like we do with filters that show only posts from one author, or topic summaries;
- show the “X Replies” tab expanded by default.

Probably the biggest challenge would be what to do upon posting, since Discourse will always show your reply in the main stream. To solve this we’d have to..

1. Force-enable the `Don't jump to my post after I reply` user setting on Q&A/introduction topics
2. Live update the “X Replies” tab. We do increment the X by 1 upon posting, but the most recent nested reply will not show up until you refresh and expand the tab again.

@joebuhlig expressed interest in working on such a plugin, so if someone’s able to fund this work (unfortunately it’s not currently the type of work [Discourse.org](http://Discourse.org) can fund) then go for it!

---

<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: [2016年十二月2日 21:28 UTC](https://meta.discourse.org/t/plugin-ask-me-anything-or-q-a-format-threaded-replies/44950/24 "2016-12-02T21:28:47Z")

</div>

> [@Any existing plugin enabling one level threading?](https://meta.discourse.org/t/any-existing-plugin-enabling-one-level-threading/53609/8):
>
> why do we need to change the database?

I haven’t looked into it yet, but there is the `post_custom_fields` table that might be able to put the restrictions on who can reply to what without the need for adding a new table / fields.

I’m also wondering if thinking in terms of hiding - expanding is a bit of a red herring. Seems to me that the end result would be reordered posts so it might be easier to just shuffle the post number values around every new post. (queued transactions?)

---

<div class="post-metadata">

### Author: ![Ajay\_Kishore](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ajay_kishore/32/72066_2.png) [@Ajay\_Kishore](https://meta.discourse.org/u/Ajay_Kishore)
#### Post date: [2017年五月12日 14:22 UTC](https://meta.discourse.org/t/plugin-ask-me-anything-or-q-a-format-threaded-replies/44950/25 "2017-05-12T14:22:27Z")

</div>

Perhaps I’m being dense but I can’t seem to figure it out - how does one force a full quote on every reply? Thanks!

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [2017年五月12日 14:24 UTC](https://meta.discourse.org/t/plugin-ask-me-anything-or-q-a-format-threaded-replies/44950/26 "2017-05-12T14:24:51Z")

</div>

> [@Ajay\_Kishore](#):
>
> how does one force a full quote on every reply?

What you mean by “full quote”? More importantly, why would you want that?

---

<div class="post-metadata">

### Author: ![Ajay\_Kishore](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ajay_kishore/32/72066_2.png) [@Ajay\_Kishore](https://meta.discourse.org/u/Ajay_Kishore)
#### Post date: [2017年五月12日 14:27 UTC](https://meta.discourse.org/t/plugin-ask-me-anything-or-q-a-format-threaded-replies/44950/27 "2017-05-12T14:27:06Z")

</div>

> [@codinghorror](#):
>
> Another reason I don’t like this proposal, on top of the extreme difficulty, is that there is a very simple workaround – simply force a full quote on every reply.
> 
> So
> 
> Halo 4 for the gameplay itself.
> 
> Becomes
> 
> guy asked  
> What’s your favorite halo game?  
> Halo 4 for the gameplay itself.
> 
> Pretty much automatically.
> 
> What you’re seeing there in that Q&A is very bad Q&A topic discipline. But enforcing Q&A topic discipline is easy; every time reply is pressed, do a mandatory full quote and block saving the reply (e.g. reject the reply as an error) if a quote is not present.

From the earlier posts as a workaround if one wants an attempt at threading on their site

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [2017年五月12日 14:53 UTC](https://meta.discourse.org/t/plugin-ask-me-anything-or-q-a-format-threaded-replies/44950/28 "2017-05-12T14:53:09Z")

</div>

You would have to write a plugin for that.

---

<div class="post-metadata">

### Author: ![joebuhlig](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/joebuhlig/32/193054_2.png) [@joebuhlig](https://meta.discourse.org/u/joebuhlig)
#### Post date: [2017年六月4日 01:16 UTC](https://meta.discourse.org/t/plugin-ask-me-anything-or-q-a-format-threaded-replies/44950/29 "2017-06-04T01:16:43Z")

</div>

Near the end of July I’m planning to release a premium section for one of my sites. One of the paid categories that will come with that is geared towards monthly AMAs. So between now and then I want to take a stab at a plugin for this and I’m hoping that in the process of doing these regularly I’ll be able to nail down a good way to do them with Discourse. That said, I need to develop the technical plan for this ahead of time.

It seems that the consensus is the need for mandatory full quoting by the answerer. I’m not sure that’s far enough though. Would it make more sense to automatically add the full quote if a quote hasn’t already been added to the reply? That would allow answerers who can handle the etiquette of an AMA via Discourse to quote the question itself and not always the full post. But at the same time, it would catch those who are new to it.

And if you’re forcing the full quote, would you also hide the Reply button at the bottom of the thread for the answerer only? That way they have to reply to a specific post and allow the aforementioned check?

To allow this, it would require two topic level settings. One, mark the topic as an AMA. Two, tell me who the answerer for the topic is. The latter would also allow the addition of a CSS class to their posts and the addition of coloring/flagging of the answerer on that specific topic.

There have been mentions of expanding replies automatically, but is that necessary if the path I’ve laid out is in place?

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [2017年六月4日 04:38 UTC](https://meta.discourse.org/t/plugin-ask-me-anything-or-q-a-format-threaded-replies/44950/30 "2017-06-04T04:38:24Z")

</div>

The answerer should be the topic owner so that part is straightforward.

---

<div class="post-metadata">

### Author: ![erlend\_sh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/erlend_sh/32/119475_2.png) [@erlend\_sh](https://meta.discourse.org/u/erlend_sh)
#### Post date: [2017年六月5日 12:01 UTC](https://meta.discourse.org/t/plugin-ask-me-anything-or-q-a-format-threaded-replies/44950/31 "2017-06-05T12:01:15Z")

</div>

> [@joebuhlig](#):
>
> It seems that the consensus is the need for mandatory full quoting by the answerer.

I wouldn’t say full consensus; I certainly don’t think that’s the best way. With that workaround, an alternative like Reddit is just so much better because there’s no duplication of text content.

I feel like my [aforementioned suggestion](https://meta.discourse.org/t/plugin-ask-me-anything-or-q-a-format-threaded-replies/44950/23) just hasn’t been explained well enough. I made a video to properly illustrate what the posting process should look like:

[![](https://global.discourse-cdn.com/meta/original/4X/8/d/0/8d0c13fe408b2bf9a977686aaf6d8c9ea0fedee5.jpeg "AMA-mockup") ](https://vimeo.com/220295724)

There’s no hackery going on here. I’m merely skipping past the part where Discourse jumps to the bottom of the topic. Instead I transition to the filtered version of the topic with inline replies. The big question is whether this can easily be skipped in code as well.

My basic spec of the plugin would be:

- Add category-specific setting “enable AMA mode”
- “Reply (to topic)” is replaced with “Ask question”
- OP is the designated AMA host with special privileges
- Posts to the topic (i.e. Questions) by other users can only be replied _after_ OP has replied. Before then, there’s no “reply” button visible to them.
- OP’s replies will be [highlighted](https://meta.discourse.org/t/show-whos-the-topics-author-optional-per-category-with-custom-title/48673).
- All _Replies_ (not Questions) will be hidden from the main stream by default. Instead they will be shown as inline replies by default. In other words this would be quite similar to how `?username_filters=someuser` works.

---

<div class="post-metadata">

### Author: ![joebuhlig](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/joebuhlig/32/193054_2.png) [@joebuhlig](https://meta.discourse.org/u/joebuhlig)
#### Post date: [2017年六月5日 12:31 UTC](https://meta.discourse.org/t/plugin-ask-me-anything-or-q-a-format-threaded-replies/44950/32 "2017-06-05T12:31:23Z")

</div>

That mockup makes a lot of sense to me. It’s quite a bit different than what I originally thought you were suggesting. I could get on board with that process as it seems to be much cleaner.

Edit: I assume this needs to be a plugin and not a PR. Correct?

---

<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年六月5日 14:49 UTC](https://meta.discourse.org/t/plugin-ask-me-anything-or-q-a-format-threaded-replies/44950/33 "2017-06-05T14:49:36Z")

</div>

> [@joebuhlig](#):
>
> I assume this needs to be a plugin and not a PR. Correct?

Absolutely, this has to start as a plugin.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [2017年六月5日 22:09 UTC](https://meta.discourse.org/t/plugin-ask-me-anything-or-q-a-format-threaded-replies/44950/34 "2017-06-05T22:09:14Z")

</div>

> [@erlend\_sh](#):
>
> With that workaround, an alternative like Reddit is just so much better because there’s no duplication of text content.

I disagree with this; there’s plenty of text content duplication in reddit during AMAs. Also any line of thought that begins with “no text reply duplication!” is _deeply_ incompatible with what we’ve been building for the last four years.

What you proposed is probably a month of full time work for an engineer to implement. Much simpler to just:

- disallow more than one “level” of replying, that is, the audience can only post questions as replies to the topic and _cannot_ reply to any individual posts. Only the AMA subject can reply to individual posts.

- enforce quoting by the author when replying, every time the AMA subject presses the reply button, put a quote in on their behalf. Error out if the AMA subject somehow tries to save a reply without a quote.

It is the difference between one day of work, and 30 days of work. It also gets you 90% of the way there in my estimation.

It also does _not_ require readers to click expand a ton of times to see actual replies. If they want to see replies docked, they can, but simply reading quoted text is what Discourse is about in the first place, not enforced and hacked in multi-level threading.

---

<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年六月27日 18:27 UTC](https://meta.discourse.org/t/plugin-ask-me-anything-or-q-a-format-threaded-replies/44950/35 "2017-06-27T18:27:31Z")

</div>

Is anybody working on this plugin?

---

<div class="post-metadata">

### Author: ![joebuhlig](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/joebuhlig/32/193054_2.png) [@joebuhlig](https://meta.discourse.org/u/joebuhlig)
#### Post date: [2017年七月3日 00:10 UTC](https://meta.discourse.org/t/plugin-ask-me-anything-or-q-a-format-threaded-replies/44950/36 "2017-07-03T00:10:13Z")

</div>

I’m planning to jump into in a week or so. I want it for a premium section in one of my communities released in early August.

---

<div class="post-metadata">

### Author: ![joebuhlig](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/joebuhlig/32/193054_2.png) [@joebuhlig](https://meta.discourse.org/u/joebuhlig)
#### Post date: [2017年七月10日 20:17 UTC](https://meta.discourse.org/t/plugin-ask-me-anything-or-q-a-format-threaded-replies/44950/37 "2017-07-10T20:17:20Z")

</div>

> [@erlend\_sh](#):
>
> Instead I transition to the filtered version of the topic

@erlend_sh, it’s been a while, but do you remember how you did this on the front end? I can use the parameter `username_filters` to hide the post at the bottom but I’m not seeing a way to do that without a server call in any way.

For those interested, I have the category setting in place and it automatically expands replies. 😉

[https://github.com/joebuhlig/discourse-ama](https://github.com/joebuhlig/discourse-ama)

---

<div class="post-metadata">

### Author: ![erlend\_sh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/erlend_sh/32/119475_2.png) [@erlend\_sh](https://meta.discourse.org/u/erlend_sh)
#### Post date: [2017年七月10日 20:33 UTC](https://meta.discourse.org/t/plugin-ask-me-anything-or-q-a-format-threaded-replies/44950/38 "2017-07-10T20:33:02Z")

</div>

> [@joebuhlig](#):
>
> I’m not seeing a way to do that without a server call in any way.

You mean where to find it in the front-end interface? I’m talking about this thing:

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

I used that to show only posts by the user `@question-asker`. In the cases of the Q&A format you’d want that filter for every post that is a direct reply to the OP.

---

<div class="post-metadata">

### Author: ![joebuhlig](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/joebuhlig/32/193054_2.png) [@joebuhlig](https://meta.discourse.org/u/joebuhlig)
#### Post date: [2017年七月10日 20:38 UTC](https://meta.discourse.org/t/plugin-ask-me-anything-or-q-a-format-threaded-replies/44950/39 "2017-07-10T20:38:00Z")

</div>

I’m essentially trying to find a front end way to hide the post at the bottom when replying to a question so it’s not duplicated on the screen. But when you click on the button you mentioned, it reloads the page to get it done. Is there way to hide a post via javascript? I haven’t been able to find that piece.

---

<div class="post-metadata">

### Author: ![erlend\_sh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/erlend_sh/32/119475_2.png) [@erlend\_sh](https://meta.discourse.org/u/erlend_sh)
#### Post date: [2017年七月11日 08:42 UTC](https://meta.discourse.org/t/plugin-ask-me-anything-or-q-a-format-threaded-replies/44950/40 "2017-07-11T08:42:39Z")

</div>

Hmmm, you might want to repost that query to #Development for more exposure. @david made a PR for something possibly related to this:

[https://github.com/discourse/discourse/pull/4740](https://github.com/discourse/discourse/pull/4740)

[上一頁](https://meta.discourse.org/t/plugin-ask-me-anything-or-q-a-format-threaded-replies/44950.md?page=1)

[下一頁](https://meta.discourse.org/t/plugin-ask-me-anything-or-q-a-format-threaded-replies/44950.md?page=3)
