MyBB-Plugins Forums

Full Version: Soft delete posts and threads 1.4 [beta]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
Although everybody can see this section and its threads and posts, only gold subscribers can download attachments. Click here to subscribe.


Soft deleted posts/threads is a MyBB plugin that "hides" deleted posts/threads instead of actually deleting them.
Once a thread or post is soft deleted, moderators (if allowed to) and administrators can view it, completely delete it or restore it.
So, regular users can't actually delete threads/posts.

Soft delete deleted posts/threads makes sure that regular users can't view soft deleted posts/threads from:
  • Show Thread page.
  • Forum Display.
  • Send Thread.
  • Archive.
  • Edit Post.
  • Print Thread.
  • Portal Page.
  • Search.

It also doesn't allow users to:
  • Rate soft deleted threads.
  • Vote in polls which are part of soft deleted threads.
  • Quick/Normal Reply to soft deleted threads.
  • Edit posts which are part of soft deleted threads - only admins can do it and moderators if the settings allow them to.
  • Edit subject of soft deleted threads.
  • Print Thread.
  • Edit polls which are part of soft deleted threads.

Read readme.html in order to understand how everything works.

Read install.html

When thread is deleted, this is how it looks from forum display:
The post looks like that too but in the postbit.

Known problem:
- after a thread/post is soft deleted and you want to use the inline moderation tool to inline delete,move or anything else. Delete will not work because the plugin's thread/post delete function will not do anything if that thread or post is hidden. But if you want to move/close/stick it, you can do it. I will find a way to fix this soon.
Anyway, if you want to move a soft deleted thread/post, I recommend you to restore it first and then move. Then delete again.

I have this plugin running in one of my live forums and until now everything's worked perfectly.

Upgrade from 1.3 to 1.4
- Upload everything.
- Now recount forum stats (threads, posts, user post count, etc).
- Then go to maintenance -> Soft delete posts/threads and recount threads and posts (it will recount soft deleted threads and posts so should be fast).
- Done!

Upgrade from 1.2 to 1.3
- Open inc/plugins/hide_deleted_posts.php (the one from your server)
PHP Code:
$db->delete_query("templates""name IN ('hide_deleted_pt_forumdisplay','hide_deleted_pt_do_action','hide_deleted_pt_postbit','hide_deleted_pt_showpost')"); 
Replace with:
PHP Code:
$db->delete_query("templates""title IN ('hide_deleted_pt_forumdisplay','hide_deleted_pt_do_action','hide_deleted_pt_postbit','hide_deleted_pt_showpost')"); 
Then, deactivate Hide deleted posts and threads.
After that, delete the following files:
* inc/plugins/hide_deleted_pt.php
* inc/languages/english/hide_deleted_pt.lang.php
* inc/languages/english/admin/hide_deleted_pt.lang.php

Now you can upload the files that come with 1.3 and activate Soft delete posts and threads from your admin panel Smile

Change log
Changes from 1.3 to 1.4:
* Better performance
* Removed last post feature. If a post or thread is hidden and it's the lastpost, it will still display as last post instead of displaying "Never". However, if someone with no permissions tries to view that post or thread, the user gets ano permission page.
* Fixed two bugs.

Changes from 1.2 to 1.3:
* Fixed a bug that would display a no permission page to those trying to edit a post/thread using the full edit mode - only those with permissions to sof tdeleted edit posts/threads could edit the post/thread
* Renamed from Hide deleted posts and threads to Soft delete posts and threads

Changes from 1.1 to 1.2:
* Fixed a bug that would display a hidden post to a user that should not be able to view.

Changes from 1.0 to 1.1:
* Fixed a no permissions page when trying to view/restore/delete a hidden post

Thanks a lot to FBI for testing 1.3 and 1.4 which allowed me to fix some performance issues.
This is weird, I can only restore, perm delete, and view threads only. If I hide a post, I can't restore, view, or perm delete a thread. I have administrator permission.
Hmm, I don't understand. You can restore, perm delete and view threads only. If you hide a post, you can't restore, view or perm delete a thread. So what can you do?
When I delete a thread, I can restore, remove, and view it.
However, when I delete a post, it says I do not have permissions to restore, remove or view it.
Oh, well, I was confused because the code to do those things is nearly the same. So I'll just do a few tests here to know what's wrong
Okay, I found what's wrong. It was a fix to a bug in view/delete/recover thread that caused that no permission page to appear when viewing/recovering/deleting a post
I'll post back once a new version is out
Thanks Pirata, I will be trying it out right now!

Edit: It is working.
Okay thanks Smile Report any bugs you may find please
Updated to 1.2, upgrading is as easy as re-uploading all files
You forgot the download link Big Grin
Pages: 1 2 3 4