# Plugin Login to view content (Working)

**URL:** <https://meta.discourse.org/t/plugin-login-to-view-content-working/126196>\
**Category:** Development\
**Created:** [August 19, 2019, 4:58pm UTC](https://meta.discourse.org/t/plugin-login-to-view-content-working/126196 "2019-08-19T16:58:24Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![tohaitrieu](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tohaitrieu/32/151338_2.png) [@tohaitrieu](https://meta.discourse.org/u/tohaitrieu)\
**Post date:** [August 19, 2019, 4:58pm UTC](https://meta.discourse.org/t/plugin-login-to-view-content-working/126196/1 "2019-08-19T16:58:25Z")

</div>

Hi Everybody.

Hi everybody

I created a Plugin based on the idea of BBCode Color Plugin and BBCode Lock.

Currently I have made it work, but I have not been able to change the css class when the visitor is not logged in and logged in.

How do I know if a member has logged in and changed the css class value?

I use BBCode:

```
[hideto=guest]Content Hide.[/hideto]

```

Example:

 ![28%20PM](https://global.discourse-cdn.com/meta/original/3X/3/0/309e57cb1fbb47d548e6f66d54588d5a58b2618d.png)

Plugin: [GitHub - tohaitrieu/discourse-bbcode-hide: Hide content from guest for Discourse · GitHub](https://github.com/tohaitrieu/discourse-bbcode-hide)

BBCode Color Plugin: [GitHub - discourse/discourse-bbcode-color: A Discourse Plugin to support BBCode color tags. · GitHub](https://github.com/discourse/discourse-bbcode-color)

BBCode Lock (Broken Plugin): [GitHub - vinkashq/discourse-bbcode-lock: A Discourse plugin to lock post contents to guest (anonymous) users · GitHub](https://github.com/vinkashq/discourse-bbcode-lock/)

Please help me to complete this plugin

Thank you.

---

_[View the full topic](https://meta.discourse.org/t/plugin-login-to-view-content-working/126196)._
