始终匿名类别插件

I personally find that to be a feature, even though it is not intended to be one, as there is a reason it’s anonymous category. But yeah, maybe it happens because there isn’t a track maintained for the post. I’m honestly not sure, but this could be the reason.

Great, this works perfectly fine. Was wondering does all the @anon created accounts get dumped after while or it remains there in the database?

I don’t think that they ever get dumped / scrubbed per se automatically. Just that new anon posts after x days from the last one by that user (controlled by a core site setting) create a new anon user.

It would of course be quite possible to do so manually.

1 个赞

Got you :))

Also, is there a way to hide that popup every time when someone posts?

1 个赞

Here’s a fix if someone needs it, you can form the repo and in the plugin.rb file you can remove both result.message and result.route_to, so now there is no feedback mechanism to the user, and no dialog box or popup will be triggered.

This is how the piece of code would look like:

if result.success?
  result.post = post
  # Removed message and route_to to skip the dialog box
else
  user.flag_linked_posts_as_spam if creator.spam?
end

I’ve added this CSS to a Theme Component to achieve that (and hide their presence):

// Tweaks to the Anon category
body.category-general-hnz-anon {
    div.presence-users, div.row div.post-notice.new-user {
        display: none;
    }
}

The bit after category- is the slug of the category you are targetting.

1 个赞

I found an alternative way to implement similar functions of this plugin but without it: just adding a group called anon (whatever you want) to include all anonymous users. Of course you do not need adding all accounts one by one, all of anonymouses’ email are anon.your.site, so setting an automatic adding, then specify your security of a category to only allow anon group to view, create topics and post.

1 个赞

Clever, but this misses the key functionality of this plugin:

While straightforward for savvy users, the flow of switching to an anonymous user, posting in the correct place, and switching back is a bridge too far for most!

4 个赞