MyBB Community Forums

Full Version: Disable Delete threads/post
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How do I stop my MODs and Admins from deleting posts/threads? I have the soft delete by default on, but I would like to restrict them from deleting anything perm if possible.
you can disable it from user group permissions.
(2022-03-09, 11:09 PM)xLoy Wrote: [ -> ]you can disable it from user group permissions.

Little help, cuz when I look there I’m only seeing own posts not in general
There are standard inline mod tools and custom inline mod tools. Standard permits soft as well as hard deletes.
Administrators and moderators have permissions for standard tools. They either are or are not administrators and moderators.
A plugin or core code edits could achieve the results you're looking for. This is beyond my available freetime.

However, you can do a workaround in templates.
Create a group called superadmin and add it to your account profile.
Additionally, you'll want to consider what permissions are allowed in Users and Groups / Admin Permissions. Default settings will allow administrators to undo changes outlined here.
Create a theme called superadmin which can only be used by superadmin group. This will likely be based on the theme you use most.
Then, in all themes which can be used by admins and moderators, edit the templates showthread_inlinemoderation_delete and showthread_moderationoptions_delete to delete the contents.
The options to delete threads and posts will not be available, only softdelete options are there.

If admins have access to Manage Groups, Manage Themes and Templates, Manage Admin Permissions, and maybe some others, they can undo the steps taken here. I believe only the superuser gid=0 has unlimited permissions regardless of other settings.

Another approach might be to use template conditionals for $user['gid']=0 in those two templates mentioned, although a different variable might be what's required there. I have not researched this path.

Good luck. Please report your solution.
From what I can see, you'd need to set the super mod and admin groups to not be super moderators, and then add those groups as moderators on all forums, where you can disable the permission to hard delete. It's quite a long-winded process, but it's not really the intended functionality.

It won't be possible to change this with a plugin, not unless you want to rewrite hundreds of lines of code, as it checks if you're a super mod and allows any action if you are. So to change that behaviour, nobody can be a super mod and you'll have to add users as moderators to all forums individually.

Ether that, or just remove the options from the template.