Delete Unreplied Topics plugin

The Delete Unreplied Topics plugin scans designated categories for topics that exist over x days which did not get any replies, and deletes them. This keeps your forum clean of topics that did not gain any traction for whatever reason.

Settings:

  • delete_unreplied_topics_categories the categories to work on
  • delete_unreplied_topics_days the amount of days before a topic without any posts will be deleted
  • delete_unreplied_topics_dry_run a safety net to test and make sure the plugin will not delete unwanted parts of your forum

The plugin logs its actions in /logs.

The repository can be found here.

This work has been sponsored by @outofthebox.

10 Likes

Amazing work @RGJ! Your skillful development of this plugin is a huge time saver and greatly improves our community.

6 Likes

Thank you for writing this.

It would be good if it would log the topic title as well as ID (DeleteUnrepliedTopics removing Topic ID #{t.id}).

And it would be more reassuring if delete_unreplied_topics_dry_run would default to true :slight_smile:

2 Likes

Thank you, those are very useful suggestions. I have made those changes.

4 Likes

I finally installed this plugin, so far in dry run mode. It seems correctly to identify the topics to delete.

In the logs each line like DeleteUnrepliedTopics would remove Topic ID *number* (*topic title*) (dry run mode) is preceded by the X indicator for an “Error”. I’d have expected it be “Info” or even “Warning”.

@RGJ Is that expected? Thanks. I’m using the latest version of Discourse.

1 Like

Yes, that seems to be by design. I vaguely remember that there was some issue with debug levels so I made it to be an error. Sorry for any confusion!

3 Likes

Thanks for clarifying that. The plugin works as expected, thanks - though, interestingly, unlisted topics are displayed by Discourse as having at least one reply (i.e. the act of unlisting) which means your plugin does not delete them.

1 Like