# Ability to hide content from subsets of users using BBCode

**URL:** https://meta.discourse.org/t/ability-to-hide-content-from-subsets-of-users-using-bbcode/303181
**Category:** Feature
**Created:** [April 10, 2024, 4:34am UTC](https://meta.discourse.org/t/ability-to-hide-content-from-subsets-of-users-using-bbcode/303181 "2024-04-10T04:34:07Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![Monikas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/monikas/32/375316_2.png) [@Monikas](https://meta.discourse.org/u/Monikas)
#### Post date: [April 10, 2024, 4:34am UTC](https://meta.discourse.org/t/ability-to-hide-content-from-subsets-of-users-using-bbcode/303181/1 "2024-04-10T04:34:07Z")

</div>

Developing a plugin allows users to hide content from other users by using BBCode.

- Add the following BBCode to your post:
- `[LOGIN]content to hide[/LOGIN]` : hides the content from the non-logged in users
- `[LIKE]content to hide[/LIKE]` : hides the content until the user likes the post
- `[REPLY]content to hide[/REPLY]` : hides the content until the user replies to the post

---

<div class="post-metadata">

### Author: ![Heliosurge](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/heliosurge/32/571810_2.png) [@Heliosurge](https://meta.discourse.org/u/Heliosurge)
#### Post date: [April 10, 2024, 10:18pm UTC](https://meta.discourse.org/t/ability-to-hide-content-from-subsets-of-users-using-bbcode/303181/2 "2024-04-10T22:18:30Z")

</div>

The first too seem pretty cool. Though the last one typically once the reply is posted it jumps the user to their reply. So they might not see the hidden content that is revealed upon creating the reply.

---

<div class="post-metadata">

### Author: ![Heliosurge](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/heliosurge/32/571810_2.png) [@Heliosurge](https://meta.discourse.org/u/Heliosurge)
#### Post date: [May 17, 2024, 4:12pm UTC](https://meta.discourse.org/t/ability-to-hide-content-from-subsets-of-users-using-bbcode/303181/3 "2024-05-17T16:12:48Z")

</div>

I would add option to hide from users not the Op that are not in a targetted group.

This request is similar iirc was for a Tabletop RPGs forum

> [@Way to make part of the post visible to author and staff only?](https://meta.discourse.org/t/way-to-make-part-of-the-post-visible-to-author-and-staff-only/120539):
>
> I’m my forums exclusievly for roleplaying purposes. We have our character sheets partially hidden from other players’ eyes, so there’s always a surprise when it comes to characters’ abilities, which imposes safer, more realistic gameplay. On an old phpBB 3.2 we used [HIDE] BBCode, which allowed to hide part of the post so it was visible only for staff members and author of the post. Does Discourse allow it in any way, possibly via plugins? If it’s impossible then maybe you could tell me how …

---

<div class="post-metadata">

### Author: ![hello-smile6](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hello-smile6/32/304628_2.png) [@hello-smile6](https://meta.discourse.org/u/hello-smile6)
#### Post date: [May 18, 2024, 10:59pm UTC](https://meta.discourse.org/t/ability-to-hide-content-from-subsets-of-users-using-bbcode/303181/4 "2024-05-18T22:59:36Z")

</div>

How could this even be implemented server-side, since anyone can see a post’s raw contents?

---

<div class="post-metadata">

### Author: ![Heliosurge](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/heliosurge/32/571810_2.png) [@Heliosurge](https://meta.discourse.org/u/Heliosurge)
#### Post date: [May 19, 2024, 9:33am UTC](https://meta.discourse.org/t/ability-to-hide-content-from-subsets-of-users-using-bbcode/303181/5 "2024-05-19T09:33:21Z")

</div>

You would need a plugin I believe for server side

This looks like it should work but might need some fix ups

> [@Display different content within a topic based on user's groups membership?](https://meta.discourse.org/t/display-different-content-within-a-topic-based-on-users-groups-membership/227075/6):
>
> Finally got around to knocking this together as, [https://github.com/Umbrella-CAST/discourse-umbrella-groupswitchdisplay](https://github.com/Umbrella-CAST/discourse-umbrella-groupswitchdisplay) Super simple, just removes the targeted DIV from the DOM based on is the current user in a group name “foobar” or not in the group via “!foobar”. That lets me have a simple toggle display of content like the below image. Of course, if the component is disabled, then all of the content shows (since sans component the DOM doesn’t get trimmed down.) But this is good enough for w…

---

<div class="post-metadata">

### Author: ![nwnuyhs](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nwnuyhs/32/444904_2.png) [@nwnuyhs](https://meta.discourse.org/u/nwnuyhs)
#### Post date: [September 9, 2024, 7:07am UTC](https://meta.discourse.org/t/ability-to-hide-content-from-subsets-of-users-using-bbcode/303181/6 "2024-09-09T07:07:22Z")

</div>

Need this feature

---

<div class="post-metadata">

### Author: ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)
#### Post date: [September 9, 2024, 1:49pm UTC](https://meta.discourse.org/t/ability-to-hide-content-from-subsets-of-users-using-bbcode/303181/7 "2024-09-09T13:49:26Z")

</div>

I not really clear on how the hide details or spoiler functions don’t do this adequately. 🤔

---

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [September 9, 2024, 1:56pm UTC](https://meta.discourse.org/t/ability-to-hide-content-from-subsets-of-users-using-bbcode/303181/8 "2024-09-09T13:56:30Z")

</div>

Everyone can read text in “hide details” and spoilers. The request is to allow only logged-in users, or users who replied to or liked the post, to read this part of the post.

For example, you can share a discount code with your members in an announcement that everyone can read. At the moment, you would have to put the code into a different post in a different category.

---

<div class="post-metadata">

### Author: ![nwnuyhs](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nwnuyhs/32/444904_2.png) [@nwnuyhs](https://meta.discourse.org/u/nwnuyhs)
#### Post date: [September 9, 2024, 8:18pm UTC](https://meta.discourse.org/t/ability-to-hide-content-from-subsets-of-users-using-bbcode/303181/10 "2024-09-09T20:18:05Z")

</div>

Hidden Content Feature:

Use hidden code to conceal content, with the ability to set visibility conditions such as:

1. Visible after reply - Content becomes visible when a user replies to the post
2. Visible after login - Content is only visible to logged-in users
3. Visible based on trust level - Content is visible to users who have reached a specific trust level

For example：  
[hide] content [/hide]

---

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [September 10, 2024, 10:30pm UTC](https://meta.discourse.org/t/ability-to-hide-content-from-subsets-of-users-using-bbcode/303181/11 "2024-09-10T22:30:52Z")

</div>

I think [Show Spoiler Content on 'Like'](https://meta.discourse.org/t/show-spoiler-content-on-like/316229) is also included in this request

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [September 11, 2024, 2:02am UTC](https://meta.discourse.org/t/ability-to-hide-content-from-subsets-of-users-using-bbcode/303181/12 "2024-09-11T02:02:11Z")

</div>

This is a similar request:

> [@Group-specific Whispers in addition to staff](https://meta.discourse.org/t/group-specific-whispers-in-addition-to-staff/233114/23):
>
> But permissioning a wider group is already implemented? [image] What is being discussed here is having two types (aka “levels”) of whispers, one which is strictly for staff. I guess you could summarise the requirement as: “add an additional whisper type that is staff only”, since we already have the arbitrary variety. Or more flexibly “add an additional whisper type that can also be permissioned with specific groups” …

---

<div class="post-metadata">

### Author: ![Heliosurge](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/heliosurge/32/571810_2.png) [@Heliosurge](https://meta.discourse.org/u/Heliosurge)
#### Post date: [September 11, 2024, 2:11am UTC](https://meta.discourse.org/t/ability-to-hide-content-from-subsets-of-users-using-bbcode/303181/13 "2024-09-11T02:11:24Z")

</div>

> [@nwnuyhs](#):
>
> Visible after reply - Content becomes visible when a user replies to the post

This one might get be harder/less useful in part.

As once you reply your taken away from the post your replying to. So the user would need to venture back to the post in question.

I do see value though in the overall feature request. For things like table top RPG type forums you might want to send a hidden message to a player or game master. For that purpose a #Customization > Theme component can work as long as it is clear not to use for security sensitive info. For that a plugin would be needed.
