Recycle Bin

License Latest Stable Version Total Downloads Donate here

A Flarum extension to manage deleted (hidden) discussions and posts (as of v0.2.0).

Screenshot

With Recycle Bin you can:

  • list all hidden discussions and posts
  • restore (unhide) a hidden discussion or post
  • forever delete a hidden discussion or post (remove from db)
  • Mass restore & delete discussions or posts

🐞 Known issues :

  • Search filter for discussions only works with complete words (returns a empty list for partial words) and isn't limited to discussion titles but also returns discussions where the searched word is found in its messages (replies) too.
  • Mass restore or delete need a full page refresh to update de list and total number of hidden discussions (the page refresh is implemented but it's not ideal, you'll have to wait for it after confirming your mass action)

Notes

  • This is my very first Flarum extension
  • Developed and tested on Flarum 1.8.5 (v 0.2 of the extension dev. & tested on Flarum 1.8.9)
  • Extention settings page is based on the core UserListPage.tsx (Users settings page).
  • Developped this with the help of AI (mainly ChatGPT, Cody & Gemini)

Installation

Install with composer:

composer require walsgit/recycle-bin:"*"

Updating

composer update walsgit/recycle-bin:"*"
php flarum migrate
php flarum cache:clear

Links

    Walid what a beautiful addition to Flarum 👏 I see you do a count on all discussions when visiting the admin page, it might be wise delegating that to the settings page of your extension to improve performance on larger communities.

      Cool, thanks you! Maybe I will use it when my community makes bigger. ^.^

      Congratulations on your first extension.

      Walid it is a cool extention thanks i want to learn how to make extentions but i lost in the less 😃

        Anonymous41 I whish there was a one place with all the details to start (and up to date) but here is where I started:

        https://discuss.flarum.org/d/6320-extension-developers-show-us-your-workflow/3
        https://discuss.flarum.org/d/1608-extension-development-using-composer-repositories-path
        I used Flarum-CLI to setup the files & folder structure flarum/cli
        and look at the official docs (even though I wish it was more noob-friendly) https://docs.flarum.org/extend/ & API refs https://api.docs.flarum.org
        Finally, look at some of the core code or other extensions' code for specific parts that you want to replicate, and copy & modify it. Ask questions on the Discord or this forum, and you can use AI like I did, but beware, 8 times of 10 their solutions aren't correct or if they work, they're note optimal so there's a lot of trial and error and iterations (but that's what coding is too I guess)

        As soon as I can, I think I'll post my workflow for this extension on that first link discussion.

          2 months later

          Hi! Thanks for the extension. I suggest adding posts, not just discussions. Or is there a different logic applied and it can be difficult?

            a month later
            • Edited

            0.2.0

            Added

            • Support for hidden posts (posts bin)

            Changed

            • Settings page is now split into two bins : discussions & posts bins
            • Updated README.md
            • Some code refactoring

            Fixed

            • Some translations typos

            Capybara Posts are now supported 😉