PDA

View Full Version : Administrative and Maintenance Tools - Per user Edit/Deletion flood control (plugin)


bairy
23 Sep 2006, 23:51
What does it do
There are two parts to this.
1. Allows you to specify users who cannot edit or delete their posts.
2. Has an optional trigger to catch people who delete or edit too many of their posts in too short a time. You specify the limits.

Why?
If you haven't had them already you probably will at some point: The tantrumers.
These are people who one day decide they hate you and/or your board, usually just after you've deleted one of their posts or pissed them off some how, and they'll want out. Instead of leaving quietly and gracefully they'll go on a mad rampage to edit/delete/both all their posts.
With 3.5/3.6's ajax, this is made very easy so they can do a fair bit of damage before you're able to stop them.

How does it work?
When a member goes to edit their post, either via the inline editor or the "full" editor, a check is made to see if they actually can. If they can't, they're shown an error message of your choice.
If they can, a check is made to see how many edits and/or deletions they have done recently. If it's "too many too fast" (the limits are specified by you), then they are stopped and an optional PM is sent to a member of your choice (probably to you) saying so, this is so the edits and/or deletions can be investigated.

Features

You can turn the whole system on/off
You can manually add users to the list.
Automatic trigger can be turned on/off. If it's on, you can specify the limits.
You can specify the message they recieve when they are disallowed.
You (or any member) can be sent a PM notifying you off a trigger being set off. The PM contains useful links by default.
You can exclude usergroups and individual users from the check.
Just one plugin.


Caveats

Thread Tools Dropdown > Thread Delete is not checked meaning if you allow a usergroup to utilise that feature, they can do it all they like.
Hard Deletions (physically removed) posts are not checked against. To do this would mean making a new table, and since I assume you trust people you give such power to, I have no desire to add such a check.
Adds one query every time edit is pressed. Adds between 1 and 4 more to the edit post script, dependant on what happens.
Private Message counts don't seem to be updating properly on my test board when a PM is sent. I'm using vB's own datamanager so I can only guess there's a bug with that.


To do

As soon as I figure out how, allow the messages to be phrased.
As soon as I figure out how, allow the optional PM to be sent to more than one member, e.g. two or more admins.
Possibly make a way for moderators to control who can and can't edit. Depends if there's enough demand.
Throw 'Thread Delete' into the check. There isn't a hook in an ideal place but it's possible. Depends if there's enough demand.


Support
Not much.
If there's a bug, I'll try and fix it.
If there's a way to edit or delete posts that I missed, I'll try and plug it.
If it clashes with another mod, I'll look at fixing it if it's an easy fix.
No "it doesn't work" support given. It works just fine on a clean install of 3.6.0 gold.

Screens
There's not really much to screenshot, so I've just taken a sample few.
options.png is the admincp options
Image1.png is the default "you can't" message for those who can't edit/delete.
Image2.png is the same message but in the inline editor (vB feature)
Image3.png is the default PM you get when someone sets off the trigger.

KoC
24 Sep 2006, 00:09
Nice Modification. Installed

bairy
24 Sep 2006, 00:47
Thanks.
There's no update, I just upped some screenies.

shadowevil
24 Sep 2006, 01:45
Mod Nice. Installed :)

Kihon Kata
24 Sep 2006, 04:17
omg, way pimp mod. will install later. NICE WORK!

I had issues of malicious ex mods that thought it would be cool to edit many threads. MAN did I need this.

Basboss
24 Sep 2006, 15:06
Just wow ... brilliant idea

Thanks for sharing

[Installed]

YLP1
25 Sep 2006, 06:09
Awesome! This should be standard in vb!

OKIHost
26 Sep 2006, 19:24
Would it be possible for you to add an option to only allow users to edit posts before a certain amount of time? say 20 minutes?

bairy
26 Sep 2006, 19:34
There is a vB setting that does that, under
vB Options > 'Message Posting and Editing Options' > 'Time Limit on Editing of Posts' though it does apply to everyone (not certain if it applies to site staff)

Hornstar
27 Sep 2006, 05:57
Nice work, I was also wondering if you would be able to add an extra feature in which will allow a certain member to edit in a specified thread because my edit time outs after a day or two, which is what i like, but on the odd occastion there is a member which I would like to be able to keep editing and adding information to their thread.

all the other features are really good tho.

nice work.

bairy
27 Sep 2006, 08:33
This hack is kinda designed to replace the editing time limit.

The time limit check is done before this plugin is reached, so it'd have to be flipped over so that everyone can edit any aged post but you can input usergroups that are limited by time.

It's a possibility but not something I'm planning at the moment. Perhaps in future.

FleaBag
04 Oct 2006, 12:55
I missed this one until I saw it in your sig. Very nice, thanks for the contribution!

Keyser Soze
12 Oct 2006, 07:10
Very nice mod. Is it compatible with vB 3.5.x or is there a version for this vBulletin-Version?

bairy
12 Oct 2006, 12:47
I haven't tested it with 3.5 though for some reason I'm thinking it's not compatible. I'm not sure why, must have been a thought that came to me when I was coding it.

I did do a 3.5 version. It's much more complicated and requires file edits but does practically the same thing: http://www.vbulletin.org/forum/showthread.php?t=110918

scan-pa
17 Oct 2006, 16:25
Would it be possible to add a per forum on / off feature?

luroca
11 Nov 2006, 09:50
Nice. Thanks.

klaush
27 Nov 2006, 08:52
I haven't tested it with 3.5 though for some reason I'm thinking it's not compatible. I'm not sure why, must have been a thought that came to me when I was coding it.

I did do a 3.5 version. It's much more complicated and requires file edits but does practically the same thing: http://www.vbulletin.org/forum/showthread.php?t=110918

Yes, it will work for 3.5.x if you delete in the product the line:

executionorder="2"

Thanks, good stuff!

Edit:

Aaarggll..., on issue left:

Invalid SQL:

SELECT dateline
FROM vb3_deletionlog
WHERE userid = 4549
UNION ALL
SELECT dateline
FROM vb3_editlog
WHERE userid = 4549
ORDER BY dateline DESC
LIMIT 4, 1;

MySQL-Fehler : Unknown column 'dateline' in 'field list'
Fehler-Nr. : 1054
Datum : Monday, November 27th 2006 @ 11:06:05 AM

Any idea bairy?

bairy
27 Nov 2006, 16:42
Yes. 3.5's deletionlog doesn't have a dateline field.
I don't think the deletion date is recorded at all in 3.5.

a) You can't use this 3.6 product.
b) You can edit the code so it doesn't left join the deletionlog table, though that means that the "how many deletions have they done in the last x mins" won't work (meaning people can delete all they want), and makes the "how many edits and deletions have they done in the last x mins" more unreliable. However it will still be acceptable if people only edit, e.g. if you don't allow people to delete their posts.
Even with that fixed there may be other problems on 3.5

tirol07
03 Apr 2008, 01:22
Thanks.

mahsazn
03 Apr 2008, 23:41
doesn't work for 3.6.8?...

vithorius
27 Apr 2008, 00:40
doesn't work for 3.6.8?...
I would like to know that too!

I have 3.6.8 now (will upgrade soon to 3.6.10)

th3beast
15 May 2009, 13:48
doesn't work for 3.7.3 ??

there is something else ?