Member Class (BBCode)
A Flarum extension. Adds class for logged in members. If someone is logged in, "logged-in" is added as a CSS class to the body
tag. This very simple extension will allow you to make endless CSS customizations just for members. (CSS knowledge required.)
Now includes two BBCodes:
[members][/members]
- only logged in members see this content
[guests][/guests]
- guests see this content but it will be hidden for logged in members
It is compatible with the Rich Text extension.
Example: Hide welcome hero banner to logged in members;
.logged-in header.Hero.WelcomeHero {display: none;}
Other usage;
body.logged-in .some {display: none;} /* Hide members*/
Installation
composer require huseyinfiliz/flarum-member
Updating
composer update huseyinfiliz/flarum-member
(To remove simply run composer remove huseyinfiliz/flarum-member
)
Links
Information
This extension is a direct copy of the extension shared by user @010101 at this link, with no modifications made. The maintenance of the extension has been taken over by the author, and future updates will be provided here. Feature requests can also be submitted in this topic.
As the original extension has been removed from GitHub, this version is being published as-is without any changes. This is a temporary solution, and new features are planned for the future. I am open to suggestions and would appreciate your input on potential updates.
It has been tested with the latest version of Flarum and PHP 8.2, and no issues were encountered. If you come across any errors, please feel free to report them.