# BBCode Login Code not working on discourse

**URL:** https://meta.discourse.org/t/bbcode-login-code-not-working-on-discourse/363147
**Category:** Support
**Tags:** bbcode
**Created:** [April 23, 2025, 12:45pm UTC](https://meta.discourse.org/t/bbcode-login-code-not-working-on-discourse/363147 "2025-04-23T12:45:06Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Bhanu\_Agarwal](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bhanu_agarwal/32/488267_2.png) [@Bhanu\_Agarwal](https://meta.discourse.org/u/Bhanu_Agarwal)
#### Post date: [April 23, 2025, 12:45pm UTC](https://meta.discourse.org/t/bbcode-login-code-not-working-on-discourse/363147/1 "2025-04-23T12:45:06Z")

</div>

Hi everyone,

I have been reading up about BBCode and how the following code can help me to hide certain content from the unregistered users.

[LOGIN]content to hide[/LOGIN]

I have installed & enabled BBCode plugin on my discourse instance, However, when I am creating any new post and trying to use these syntax, they aren’t working as expected.

To show an example, please refer to the following screenshots. Both screenshots (one from logged in profile and another from anonymous profile)

**View from the logged-in profile**

 ![Screenshot 2025-04-23 at 6.09.43 PM](https://global.discourse-cdn.com/meta/original/4X/c/f/1/cf164fcb9d6cfde598bec0c3c3b0a7c42e330077.jpeg)

**View from the anonymous profile**

 ![Screenshot 2025-04-23 at 6.11.18 PM](https://global.discourse-cdn.com/meta/original/4X/0/1/1/011fb2c3797ed4dee77e47db5682a0f460d9fea3.jpeg)

How to resolve this error? Has anyone ever faced this issue and can help me out, it would be really appreciated.

---

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [April 23, 2025, 12:52pm UTC](https://meta.discourse.org/t/bbcode-login-code-not-working-on-discourse/363147/3 "2025-04-23T12:52:48Z")

</div>

Hi, can you share what plugin you’re referring to?  
I’m not aware of such a plugin, but I can be wrong.

---

<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: [April 23, 2025, 1:26pm UTC](https://meta.discourse.org/t/bbcode-login-code-not-working-on-discourse/363147/4 "2025-04-23T13:26:47Z")

</div>

This one, no?

> [@Discourse BBCode](https://meta.discourse.org/t/discourse-bbcode/65425):
>
> information_sourceSummary Discourse BBCode adds the ability to use BBCode to format posts.discourse2Hosted by us? This plugin is available on our Enterprise plansmechanicSelf-host Install [Install plugins on a self-hosted site](https://meta.discourse.org/t/install-plugins-on-a-self-hosted-site/19157)hammer_and_wrenchRepository Link [https://github.com/discourse/discourse-bbcode](https://github.com/discourse/discourse-bbcode) The Discourse BBCode plugin enhances the Markdown composer [[1]](#footnote-304175-1) with support for the [BBCode syntax](https://www.bbcode.org/reference.php) beyond what is included by default (i.e. [i], [b], [s], [u], […

However, I don’t think it claims to support all of BBCode … perhaps you could PR?

---

<div class="post-metadata">

### Author: ![Bhanu\_Agarwal](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bhanu_agarwal/32/488267_2.png) [@Bhanu\_Agarwal](https://meta.discourse.org/u/Bhanu_Agarwal)
#### Post date: [April 23, 2025, 1:42pm UTC](https://meta.discourse.org/t/bbcode-login-code-not-working-on-discourse/363147/5 "2025-04-23T13:42:14Z")

</div>

@merefield Yes I used this plugin only, I agree it doesn’t seem like this Plugin supports all of BBCode.

Do you know how I can achieve my objective, if through any other medium? I didn’t understand what you meant by ‘PR’.

---

<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: [April 23, 2025, 1:43pm UTC](https://meta.discourse.org/t/bbcode-login-code-not-working-on-discourse/363147/6 "2025-04-23T13:43:15Z")

</div>

You may need to code it, but it likely won’t be trivial, especially if you are not familiar with PRing 🙂 Alternatively consider #Marketplace if you have budget

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [April 23, 2025, 2:23pm UTC](https://meta.discourse.org/t/bbcode-login-code-not-working-on-discourse/363147/7 "2025-04-23T14:23:46Z")

</div>

“PR” means pull request. Where you submit a proposed change to the code and wait for someone with control over that code base to accept it.

You could also fork the plugin, which you can look up yourself.

Here’s an example of something that handles a BBcode. You’d need to add something similar for whatever you want to happen for your login:

> <https://github.com/discourse/discourse-bbcode/blob/56a84785798b898729dd44635df8e031e65750ec/assets/javascripts/lib/discourse-markdown/bbcode.js#L68-L71>

You’d change “small” to “login” and do something about the style, and maybe need to add some CSS somewhere to make it do what you want.
