MyBB-Plugins Forums
Soft delete posts and threads 1.4 [beta] - Printable Version

+- MyBB-Plugins Forums (http://forums.mybb-plugins.com)
+-- Forum: Archived Forums (http://forums.mybb-plugins.com/Forum-Archived-Forums)
+--- Forum: MyBB 1.4.x (http://forums.mybb-plugins.com/Forum-MyBB-1-4-x)
+---- Forum: Paid Plugins (http://forums.mybb-plugins.com/Forum-Paid-Plugins)
+---- Thread: Soft delete posts and threads 1.4 [beta] (/Thread-Soft-delete-posts-and-threads-1-4-beta)

Pages: 1 2 3 4


Soft delete posts and threads 1.4 [beta] - Diogo Parrinha - 07-28-2009

Although everybody can see this section and its threads and posts, only gold subscribers can download attachments. Click here to subscribe.

Description

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.

Installation
Read install.html

Screenshot
When thread is deleted, this is how it looks from forum display:
[Image: 19862128.th.png]
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.

[spoiler=UPGRADE]
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)
Find:
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
[/spoiler]

Thanks a lot to FBI for testing 1.3 and 1.4 which allowed me to fix some performance issues.


RE: [Relese] Hide deleted posts and threads [beta] - eternalwolf - 08-01-2009

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.


RE: [Relese] Hide deleted posts and threads [beta] - Diogo Parrinha - 08-03-2009

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?


RE: [Relese] Hide deleted posts and threads [beta] - eternalwolf - 08-03-2009

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.


RE: [Relese] Hide deleted posts and threads [beta] - Diogo Parrinha - 08-03-2009

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
Edit:
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


RE: [Relese] Hide deleted posts and threads 1.1 [beta] - Diogo Parrinha - 08-03-2009

Updated!


RE: [Relese] Hide deleted posts and threads 1.1 [beta] - eternalwolf - 08-04-2009

Thanks Pirata, I will be trying it out right now!

Edit: It is working.


RE: [Relese] Hide deleted posts and threads 1.1 [beta] - Diogo Parrinha - 08-04-2009

Okay thanks Smile Report any bugs you may find please


RE: [Relese] Hide deleted posts and threads 1.2 [beta] - Diogo Parrinha - 08-06-2009

Updated to 1.2, upgrading is as easy as re-uploading all files


RE: [Relese] Hide deleted posts and threads 1.2 [beta] - eternalwolf - 08-07-2009

You forgot the download link Big Grin