Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolves #2139 : Soft deleted threads and answers #3216

Merged
merged 5 commits into from Aug 12, 2018
Merged

Resolves #2139 : Soft deleted threads and answers #3216

merged 5 commits into from Aug 12, 2018

Conversation

@effone
Copy link
Member

@effone effone commented May 17, 2018

Attempt to fix: #2139
Recreated #3185

To Do:

  • Dynamically show / hide quickreply, new reply button, thread rating, thread tools for deleted thread
  • Disable functionality of above said tools for deleted threads
  • Dynamically show / hide post control buttons for deleted posts
  • Disable post control actions deleted posts
  • Disable certain moderator actions for deleted thread (showthread)
  • Disable moderation tools for above said disabled actions (showthread)
  • Handle custom mod tools for deleted thread
  • Swap Soft Delete / Restore moderator tool on thread delete
@effone effone added the b:1.8 label May 17, 2018
@Sama34
Copy link
Contributor

@Sama34 Sama34 commented May 24, 2018

It seems to work for me in a fresh installation. The only problem is that I see is that I can edit a not soft deleted post inside a soft deleted thread. I think editpost.php should be disabled and the buttons hidden too @mybb/developers

I suppose you could hide .postbit_buttons.post_management_buttons but just not for the first post.

Can somebody check the update? I think it should work even though style sheets would need to be updated manually by administrators.

@euantorano
Copy link
Member

@euantorano euantorano commented May 24, 2018

@effone
Copy link
Member Author

@effone effone commented May 25, 2018

@euantorano With this PR the posts can be edited in a soft deleted thread as long as the post itself is not soft deleted.

@Sama34
Copy link
Contributor

@Sama34 Sama34 commented May 25, 2018

Regarding of the final decision about editing posts, users can still see the quote/report/etc buttons even if they can't use them.

@euantorano
Copy link
Member

@euantorano euantorano commented May 25, 2018

@effone
Copy link
Member Author

@effone effone commented May 25, 2018

@Sama34 if you read the main Issue by @JN-Jones #2139 that is the thing what has been pointed out as bug. If I can't use the tool I shouldn't have seeing the button - thats the gist.

@Sama34
Copy link
Contributor

@Sama34 Sama34 commented May 28, 2018

Why don't you use the approve/unapprove feature and not soft delete? What did you use before we implemented soft delete? We could also add a new moderation option to "Allow Editing of Soft Deleted Threads" and make it selected by default.

@Eldenroot
Copy link
Contributor

@Eldenroot Eldenroot commented Jun 3, 2018

New option would be useful :) anyway can be added later.

var deleted = true;
}

if(quoted && !deleted)
Copy link
Contributor

@Shade- Shade- Jun 8, 2018

From a quick look, this should raise a fatal error if deleted is not defined. You should add var deleted = false after is_new = true and change its value within the deleted_post check above.

Copy link
Member Author

@effone effone Jun 8, 2018

Done!

@Eldenroot
Copy link
Contributor

@Eldenroot Eldenroot commented Jun 8, 2018

I tested this PR as effone requested, seems to be fine. Can anybody else confirm this? I would like to see a separated pr with new setting in future

@effone
Copy link
Member Author

@effone effone commented Jun 8, 2018

The settings thing what @Sama34 said is easy to implement. Just getting no urge as I have a feeling that this is not gonna be considered for .16 as its a lengthy PR and needs quiet a bit of testing.
I have created this PR 3 times, tested in deep, still @Shade- has caught a mistake. So, you see ... It needs multiple testing by multiple people.

@euantorano
Copy link
Member

@euantorano euantorano commented Aug 12, 2018

Updated template versions to 1818, currently testing this for 1.8.18.

@euantorano euantorano merged commit 76c6277 into mybb:feature Aug 12, 2018
@effone effone deleted the softdel-revamp branch Aug 12, 2018
@effone
Copy link
Member Author

@effone effone commented Aug 12, 2018

Note:

Admins must confirm the following chunk of CSS is present in global.css else need to add manually, preferably at line 1340 to make this PR work as desired.

.postbit_qrestore,
.status_type {
	display:none!important;
}

.deleted_post .postbit_qrestore,
.deleted_post .status_type {
	display:inline!important;
}

.deleted_post .postbit_mirage {
	display:none!important;
}

@YashvirGaming
Copy link

@YashvirGaming YashvirGaming commented Aug 23, 2020

hello why mybb deleting all my threads after 2-3 days, how to prevent it
I don't want my threads to be deleting, please how to stop it from being auto delete

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

6 participants