The discussion is about activating a plugin only for registered users on a Discourse forum. eextra wants to hide the “Who’s Online” plugin from guest users and asks why there isn’t a user group or trust level for non-registered users. david suggests changing the “Who’s Online Display Public” setting, which awesomerobot confirms is a simpler solution than using CSS to hide the plugin.
eextra also asks about defining a user group for non-logged-in users, which awesomerobot explains is not possible because a group requires members. Stranik suggests using the currentUser variable in a plugin to target anonymous users, and eextra understands that a simple if statement is enough to check if the user is logged in.
Additionally, eextra wants to hide the flag component icons from anonymous users, and Stephen suggests targeting the .anon class to hide content from anonymous users. eextra wonders if it’s possible to make these changes from the admin panel without editing the plugin and rebuilding the forum.
I would like to display the number of logged users (users online plugin) on the site only for logged users (my all members from trust 0-4).
But I don’t know how to disable this plugin on the site for guest ?
Why is there no such thing as a user group or trust level (-1 ? ) for not registered - not logged in/guest users?
How can I put it in the code?
I’ll check it out right away, but I already have a question.
Why can’t I define a user group as not logged in? Other forums allow this. I mean, they give them permissions (like ipb, mybb, Vbull)
What if I want to write my own plugin that only activates for anonymous users? Is it enough for me to have a css class or something else?
oh I guess I see what you’re saying, this really isn’t a group though is it? A group has members. This would just be anyone who isn’t logged in. It’s kind of the lack of a group.
Are there other permissions you want to grant to anonymous users other than hiding whos online?
Do I need to edit the plugin and rebuild the forum to make such a simple change or can I do it from the admin panel in the head or footer section. Is it possible?