Awesome!
But in some case, I may want to shadow hide one's old posts instead of new ones.
Can you add this feature to this extension?

    4 months later

    Yolo anyone with the permission to shadow ban users will see the shadow ban status.

    Other users shouldn't see any badge.

    Can you double-check that your test non-admin user does not have the shadow ban permission?

    When a user is shadow banned, their existing content isn't hidden. Only new content is automatically hidden. You can manually hide more posts with the Shadow Hide control.

    achso, we assumed that a user can hide other users. then it doesn't seem to work. as soon as i make this function available to all registered members, the users who have been banned by ONE member will be displayed with the "mute" icon for all others?

    Settings:
    Shadow ban users: members
    Shadow hide discussions and posts: members / admins?!

    6 months later

    I don't quite get it either. Is it possible to allow users to ignore others without that person being "blocked" for everyone? Does anyone happen to have a screenshot of the settings? Would you be really grateful for an answer

      tom23 this is a moderator feature that will impact all users in the same way once enacted.

      A moderator selects the content to shadow hide (a specific post or discussion, all content from a user, or the entire user profile). The moderator will continue to see the content grayed out similar to deleted content. The target user/author will not see any difference. All other users will no longer see the content.

      This isn't an ignore feature. It wouldn't make any sense to shadow hide something for yourself only, the whole point is to hide it from others.

      6 months later

      Hi @clarkwinkelmann , I would like to know if this extension allows for shadow-banning a user within a specific discussion thread or within a particular tag. Sometimes it is very useful to be able to ban a user only in specific areas

        Oshvam current version is only global. But you could manually shadow hide content in specific places if you have active moderators.

        This could definitely be implemented though. I don't have free time to contribute any new feature at the moment but it could be sponsored.

          clarkwinkelmann Thanks for the response. But I have a doubt about it, for example, can I do it manually with this extension? That is, can one of my moderators apply a shadowban on a certain thread to a user and only apply it to that thread/discussion? Sorry for asking so much, but I like to make sure of some data before adding additional tables when installing extensions that I won't use later.

          If what I'm talking about can't be done, I wouldn't mind sponsoring the extension. Is there a starting point for that

            Oshvam the extension revolves around "shadow hiding" content. This can be done and undone manually at any time by moderators. When a "shadow ban" is placed on a user, all their new content gets automatically "shadow hidden". That's the same effect as manual shadow hide, except it happens immediately as soon as new content is created. I hope that answers the question.

            5 months later

            If you purge the extension instead of unchecking the banned shadow messages, do they disappear, are they removed or where exactly are they left?

              Darkle I believe the posts end up in "limbo". The posts are flagged with the "private API" of Flarum, which means:

              • When the extension is disabled, the posts become invisible to everyone but remain in the database.
              • If you purge the extension, the posts become dissociated from the extension and will remain in the database but never appear again for users even if the extension is re-installed.

              If an extension edits the posts in any way, they might revert back to public messages though. It should generally not be possible to edit a post flagged by the private API. But if an extension had for example a CRON job that loops through all the posts in the database with no regard for the private API visibility scope, they could accidentally "touch" the post, cause Flarum to re-evaluate the private API state and since no extension is there to request the private state anymore it might revert to public state.

              EDIT: another situation where a post might revert to public is if multiple extension had flagged the post as private. For example if one post was still under approval as well as shadow hidden, once this extension is disabled the post will remain visible according to the Approval extension rules and if it gets approved it will become a normal public post again.

              If you want to delete all the posts permanently, you can perform an SQL query manually for all posts where shadow_hidden_at is not NULL before the purge.

                clarkwinkelmann I've already done the purge, is there an option to recover/delete those posts/discussions? I'm not sure if I can retrieve a previous copy of the database, I'm looking into it.

                  Darkle the posts have the is_private column set to 1. But you must be careful because many other extensions will also cause the value to be one and each extension will have a different way to distinguish their posts. Approval is the main one, but I believe private discussions also use it and other extensions will. Setting the flag to 0 will make the posts visible but if you change it on the wrong posts it might expose private messages and such.

                  If you don't have too many posts, you could search for posts with is_private and manually choose which ones you revert.

                    clarkwinkelmann I was able to recover the database and recover/delete what I needed, I wanted to use the extension from scratch because of the abuse of shadow banned posts... I'll leave this better for staff only. Thanks for the detailed explanation!

                    If you want to delete all the posts permanently, you can perform an SQL query manually for all posts where shadow_hidden_at is not NULL before the purge.

                    If anyone needs the query for this, here is the example for the posts table:

                    SELECT * FROM posts WHERE shadow_hidden_at IS NOT NULL;
                    4 months later

                    A shadow-banned user replied to one of my posts (I'm an admin and a mod) and the post didn't get shadow hidden. Is that a bug or a feature?

                      CyberGene probably a bug, there's nothing special for replies or for hard-coded groups. Do you have more information that could help reproduce?

                        clarkwinkelmann I checked the logs, couldn’t see anything. Basically, I have a user who is shadow-banned until 2033. He posts from time to time but all his posts are shadow-hidden as expected. BTW, he always replies to other posts (no quote, just reply). However, today I was surprised to discover that he had replied to an old post of mine and his reply was not shadow-hidden. The only possible difference is I’m an admin and a mod (and thus have the permissions to see shadow-hidden content). I checked with a logged-off browser and his post is publicly visible and was on top. Basically, a regular post.

                        10 days later

                        clarkwinkelmann seems the problem is not related to “replying to an admin”. The same shadow banned user has just replied to a regular user and his post was not shadow hidden. However he has had other similar posts in between that were shadow hidden correctly.

                        So, the extension has had two misses (out of 20-30 correctly hidden posts for that user) but I don’t see any errors in the logs.

                          CyberGene can you share your php flarum info output so I can see which extensions are in use ? There could be some sort of conflict with another extension.