# Post folding

**URL:** https://meta.discourse.org/t/post-folding/324442
**Category:** Plugin
**Created:** [September 2, 2024, 5:41am UTC](https://meta.discourse.org/t/post-folding/324442 "2024-09-02T05:41:45Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![Lhc\_fl](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lhc_fl/32/268115_2.png) [@Lhc\_fl](https://meta.discourse.org/u/Lhc_fl)
#### Post date: [September 2, 2024, 5:41am UTC](https://meta.discourse.org/t/post-folding/324442/1 "2024-09-02T05:41:45Z")

</div>

| | | |
| --- | --- | --- |
| ℹ | **Summary** | Allow some posts to be folded manually |
| 🛠 | **Repository Link** | [https://github.com/Lhcfl/discourse-post-folding](https://github.com/Lhcfl/discourse-post-folding) |
| 📖 | **Install Guide** | [How to install plugins in Discourse](https://meta.discourse.org/t/install-plugins-in-discourse/19157) |

  

### Features

TL;DR Allow manually collapse/uncollapse certain posts.

 ![](https://global.discourse-cdn.com/meta/original/4X/a/1/6/a16768574ffdad05c40ac36db56f5a28c129eaa1.png)

Staff/TL4 users can find the collapse/uncollapse button under the wrench under the post

 ![](https://global.discourse-cdn.com/meta/original/4X/9/0/1/901c7d88bda9dff140c21a2a5ebcb843ba270192.png)

For user groups that do not have a wrench in their post, it will appear directly in the post button

 ![](https://global.discourse-cdn.com/meta/original/4X/8/f/e/8fec808fb261480b578795e35eed7221a5ad72a4.png)

### Configuration

- `discourse_post_folding_enabled`: Enable post folding
- `discourse_post_folding_can_fold_post_groups`: Groups that can fold posts

### With [Topic OP moderation Plugin](https://meta.discourse.org/t/topic-op-moderation-plugin/256222)

After installing [Topic OP moderation Plugin](https://meta.discourse.org/t/topic-op-moderation-plugin/256222), you can let the OP of a topic fold the posts under the topic.

 ![This is a screenshot of a settings page for an "OP-admin" with various checkboxes and radio buttons, including topics to allow and disallow. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/e/0/e/e0eea238f3771b6d9b0f84ccf9396fdd27d6bdf3.png)

---

<div class="post-metadata">

### Author: ![denvergeeks](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/denvergeeks/32/327671_2.png) [@denvergeeks](https://meta.discourse.org/u/denvergeeks)
#### Post date: [September 2, 2024, 8:50pm UTC](https://meta.discourse.org/t/post-folding/324442/2 "2024-09-02T20:50:11Z")

</div>

This looks very useful – thank you!

Does Post Folding require the Topic OP moderation Plugin?

I believe I have this installed and configured correctly, but I can’t seem to get past a permissions error…

 ![folding-plugin-error-2](https://global.discourse-cdn.com/meta/original/4X/5/2/e/52ef3a7ef91890827f8b2268c069c2fd43a44436.png)  
 ![folding-plugin-error-1](https://global.discourse-cdn.com/meta/original/4X/a/6/c/a6c1b5442efc74c875846e6b438b994e6f4a3cfa.png)

---

<div class="post-metadata">

### Author: ![Lhc\_fl](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lhc_fl/32/268115_2.png) [@Lhc\_fl](https://meta.discourse.org/u/Lhc_fl)
#### Post date: [September 2, 2024, 11:28pm UTC](https://meta.discourse.org/t/post-folding/324442/3 "2024-09-02T23:28:09Z")

</div>

It should not be required, but can be coordinated. This looks like a bug, let me look into it

---

<div class="post-metadata">

### Author: ![Lhc\_fl](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lhc_fl/32/268115_2.png) [@Lhc\_fl](https://meta.discourse.org/u/Lhc_fl)
#### Post date: [September 2, 2024, 11:56pm UTC](https://meta.discourse.org/t/post-folding/324442/4 "2024-09-02T23:56:58Z")

</div>

I realized, I made a stupid syntax error… it should be fixed now.

---

<div class="post-metadata">

### Author: ![denvergeeks](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/denvergeeks/32/327671_2.png) [@denvergeeks](https://meta.discourse.org/u/denvergeeks)
#### Post date: [September 3, 2024, 1:08am UTC](https://meta.discourse.org/t/post-folding/324442/5 "2024-09-03T01:08:03Z")

</div>

I discovered there is a strange behavior with the expandable reply count, _when_ the setting **enable filtered replies view** _is enabled_ (checked as shown below)…

![Screenshot 2024-09-04 131406](https://global.discourse-cdn.com/meta/original/4X/c/2/f/c2fed90dd0eceaa1c059f41c256440517b7e8ab9.png)

---

<div class="post-metadata">

### Author: ![Lhc\_fl](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lhc_fl/32/268115_2.png) [@Lhc\_fl](https://meta.discourse.org/u/Lhc_fl)
#### Post date: [September 3, 2024, 1:51am UTC](https://meta.discourse.org/t/post-folding/324442/6 "2024-09-03T01:51:57Z")

</div>

What strange behavior? I don’t see it. Do you have any screenshots?

---

<div class="post-metadata">

### Author: ![denvergeeks](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/denvergeeks/32/327671_2.png) [@denvergeeks](https://meta.discourse.org/u/denvergeeks)
#### Post date: [September 3, 2024, 2:19am UTC](https://meta.discourse.org/t/post-folding/324442/7 "2024-09-03T02:19:22Z")

</div>

This shows the (misbehavior)…

---

<div class="post-metadata">

### Author: ![Lhc\_fl](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lhc_fl/32/268115_2.png) [@Lhc\_fl](https://meta.discourse.org/u/Lhc_fl)
#### Post date: [September 3, 2024, 3:25am UTC](https://meta.discourse.org/t/post-folding/324442/8 "2024-09-03T03:25:38Z")

</div>

I don’t think it’s a problem with my plugin 😉 because I can’t reproduce it in either my test environment or my forum. Is it possible that it’s a problem with the theme or other plugins you installed?

Here is a link to see how it looks on my forum. [https://futarino.online/t/test-fold-plugin/2602/3](https://futarino.online/t/test-fold-plugin/2602/3)

 ![The image is a screenshot of a computer interface showing a conversation on a platform that allows for test-fold plug-in development. The interface is in a language that uses Chinese characters. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/8/1/e/81e2cdded171a6300e90fce586bf3cc1a2eea732.png)

---

<div class="post-metadata">

### Author: ![denvergeeks](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/denvergeeks/32/327671_2.png) [@denvergeeks](https://meta.discourse.org/u/denvergeeks)
#### Post date: [September 4, 2024, 7:05pm UTC](https://meta.discourse.org/t/post-folding/324442/11 "2024-09-04T19:05:37Z")

</div>

This mis-behavior (as shown in the above video) happens when I have this plugin enabled and _ **also** _ have _ **enable filtered replies view** _ enabled. They both provide similar behaviors, and having both enabled at the same time seems to cause a conflict. Just using one _ **or** _ the other seems like the best answer.

My only suggestion would be to mention this in the plugin settings.

---

<div class="post-metadata">

### Author: ![Lhc\_fl](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lhc_fl/32/268115_2.png) [@Lhc\_fl](https://meta.discourse.org/u/Lhc_fl)
#### Post date: [September 5, 2024, 2:05am UTC](https://meta.discourse.org/t/post-folding/324442/12 "2024-09-05T02:05:03Z")

</div>

This is indeed a point to be improved 🤔 Anyway, I disabled the folding filter for the filtered replies view.

But I think this is not a bug, it is a feature, because it does exactly what it is supposed to do: fold the posts you folded, leaving the rest unchanged.
