BBCode Login Code not working on discourse

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

View from the anonymous profile

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

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

This one, no?

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

1 Like

@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’.

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

2 Likes

“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:

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.