The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Stop people mass deleting / editing their posts Details »» | |||||||||||||||||||||||||||
Stop people mass deleting / editing their posts
Developer Last Online: Jul 2023
Recently I have had a couple of my members disagree with me. They've then decided they want to throw a fit and managed to edit or delete several dozen of their posts before I've spotted them and being able to stop it.
Therefore I've written this hack. What it does: Every time someone* edits or soft deletes a post of theirs, the time of that event is logged. The edit post script reads the last 5 times that user edited or deleted a (different) post and if they've done 5 edits/deletes in 10 mins it automatically puts them into a "can not edit" list. The user of your choice (probably you) then gets a PM telling you they've triggered this auto and you can investigate it. The list is in the admin control panel so you can remove (or if you like, manually add) people to it. *Usergroups 5,6,7 (supermods, admin, mods) are excluded from the check. Changes: 1 vB option (optional) 1 phrase addition 4 file edits (1 is optional but recommended) 4 SQLs to run Downsides: = You have to disable the ajax in-line editing, or the error message gets really messy for people who are on the "can't edit or delete" list. OR There is one extra query per showthread. = There is one more query on every initial edit post request, and 3 more if that post is saved. Note that people in the list who can't edit do still see the edit button. This was deliberate as when clicked it will supply them with a message. I thought this better than confusion over where it is. I'm not a great coder and my knowledge of vB is what I can pick up as I go. I have successfully got this hack working on my board and I think I've covered all the angles and so far as I can tell, it will work on any board. However, make sure you have a backup of your database, and backups of the files you're editing, just in case, and at this time I still consider the hack as beta. I'll try to give support where I can but I'm not "officially" supporting it. UPDATES 1.01: Minor update 1. Added TABLE_PREFIX to my queries. 2. In editpost.php, PHP Code:
PHP Code:
Previously php moaned there was no 2nd parameter for the set_recipients function, now there is and the fact it's blank doesn't matter in this hack. 1.02: Fixed the AJAX problem. Using one query per showthread, vb will determine if the user is on the can't edit list. If they are, it will disable the ajax inline editor meaning if they click edit, they'll be shown the error message as it's supposed to look. It won't execute if the inline editor is switched off. Fix (which is in the updated txt attachment): Open includes/class_postbit.php Find (line ~913): PHP Code:
PHP Code:
Show Your Support
|
Comments |
#2
|
||||
|
||||
Good Job! But I cant use it. Im not going to disable AJAX nor do file edits
However, ill keep checking back for a plugin. |
#3
|
|||
|
|||
You don't have to disable the whole of AJAX, just the in-thread editing (when you click edit, it's the text box that comes up).
You don't even have to disable that if you don't want to, it's just that anyone who happens to trigger the limiter will have the warning phrase appear, header n all within the thread, which looks really horrible. If anyone knows a way to force a page refresh and then show the error message when you click "save" on the in-line editor, I'll stick it in. At the moment I don't know how I could disable AJAX for those members. As for vB plugins, you're outta luck. The places I've edited don't have hooks anywhere near them. |
#4
|
|||
|
|||
Why not just disable the feature where users can delete their own posts, and have it so they cant edit them after a certain amount of time?
|
#5
|
||||
|
||||
Quote:
|
#6
|
|||
|
|||
I did think about not allowing editing after a certain amount of time, but then I looked at the timestamps on the edit logs and found that a lot of people were editing days and even weeks after the original posts, usually to add a new photo of themselves or something.
It was an option but not ideal enough. This solution, although fiddly and not without drawbacks, was much more ideal (for me, at least) With the deleting I personally feel users should be able to delete their own threads if they like. |
#7
|
||||
|
||||
This is a GREAT modificatioN! I hope you get some help over the AJAX problem so this wil become a better hack without those downsides.
Good luck! Ill install just to keep track of updates. |
#8
|
||||
|
||||
Nice work man!
|
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|