PDA

View Full Version : Message Editing Hierarchy


Xenon
01-10-2004, 10:00 PM
Hi,

Have you ever noticed that Admins and Super Moderators can edit/delete/peak everyone's messages in your forum? This also applies to Moderators for the board they are assigned.

Normally this shouldn't be a problem, but on bigger sites with a lot of Mod's it could lead to problems sometimes, so that's the reason, why i ported over Logicians vb2 hack, changed it to use actual vb3 variables and permission systems.
So great Thanks to my Pal Logician, who's intro post has been rewritten by me as well ;)

After applying the hack default editing permissions in your board will be changed like this:

Moderators: Can edit everyone's posts in the forum they're assigned, UNLESS author is another Moderator, SuperMod or Admin.
SuperModerators: Can edit everyone's post in all boards UNLESS author is another SuperMod or Admin.
Admins: Can edit eveyone's post in all boards UNLESS user is another Admin
SuperAdmins: Can edit eveyone's post in all boards (Superadmins are defined in config.php)

So the hack will apply a "message editing hierarchy" in your board and everyone will be able to edit messages for ones who are below him and cant touch messages of his superiors..If they try, they'll get no permission page. This will apply for editing the messages, deleting the message via edit message or just peaking inside it. But be warned: messages can still be deleted via "Delete Thread / Posts" menu..

The hack is VERY EASY to install with 1 single modification and will work in any vbulletin3 versions I know..

If you install the hack, please click install, thank you..

Enjoy!
Xenon

Boofo
01-11-2004, 04:26 PM
Since I seem to be having a lot better luck getting your hacks to work on vB3 than I did on vB2 (without a lot of coaching and re-modifications from you, sir ;)), I will give this a shot. ;)

Xenon
01-11-2004, 04:34 PM
:)
well vb3 hacks are a lot easier to write, once you got familar to it's system :)

Boofo
01-11-2004, 04:37 PM
Yes, sir, they are. I have to admit, as first I was really hesitant to move up to vB3, but it is the best thing I ever did. ;)

With this hack, is there a way to have it display a message instead of just the no-permissions page? Might save a lot of pms asking what is going on from other mods and admins (if your board has more than one admin, that is).

Zelda-King
01-11-2004, 04:39 PM
Installed! I'll just have a little editing contest with my staff and inform you of anything interesting. :D

FleaBag
01-11-2004, 04:49 PM
Very handy hack, especially for Mods who might not like each other very much!

Zachery
01-11-2004, 05:26 PM
Very handy hack, especially for Mods who might not like each other very much!
so out of wondering, does this include edits? ive had problems with posts that i edit, then a member will redit the post >.<

Zelda-King
01-11-2004, 05:37 PM
My results are positive. Everything seems in order. Also people can't edit posts of those of the same rank. ie, supermod VS supermod or admin VS admin. Super admins can do anything though. I like it like this. :)

I'm not exactly requesting this but I thought I'd throw it in as feedback anyway: It'd be nice if there was a section where we could set up the original admin as all-powerful so no other super admins could touch him/her.

Xenon
01-11-2004, 08:28 PM
so out of wondering, does this include edits? ive had problems with posts that i edit, then a member will redit the post >.<
nope faranth, this is just based on post-author.
But i also have plans to port over my more functions in editpost when admin hack, and such things were possible with that hack :)

@Zelda: i've thought of this myself, and actually it's not hard to add (just one if clause added, but normally superadmins are those, wo can edit files as well normally, so this would be useless ;)

Zachery
01-11-2004, 08:28 PM
nope faranth, this is just based on post-author.
But i also have plans to port over my more functions in editpost when admin hack, and such things were possible with that hack :)

@Zelda: i've thought of this myself, and actually it's not hard to add (just one if clause added, but normally superadmins are those, wo can edit files as well normally, so this would be useless ;)
ah give me a ring when you get the otherone going then :D

Xenon
01-11-2004, 08:29 PM
Yes, sir, they are. I have to admit, as first I was really hesitant to move up to vB3, but it is the best thing I ever did. ;)

With this hack, is there a way to have it display a message instead of just the no-permissions page? Might save a lot of pms asking what is going on from other mods and admins (if your board has more than one admin, that is).
hmm, it's possible of course :)

You have to replace the print_no_perm with standarterror and create a new phrase for this error :).
But as editpost uses standard no permission i choosed the same.
Just tell your mods what was happening, it's easier ;)

Zelda-King
01-11-2004, 11:29 PM
@Zelda: i've thought of this myself, and actually it's not hard to add (just one if clause added, but normally superadmins are those, wo can edit files as well normally, so this would be uselessHmm, I hadn't thought of that. Yeah.

trinitym
01-12-2004, 11:33 PM
Yay it's here! *L* I was really looking forward to this hack since I was rather uncomfortable with other admins/mods being able to edit my posts. Excellent job Xenon and Logician for the original. :)

*bounces*

Ryan Ashbrook
01-17-2004, 12:32 AM
Thanks! This looks like a great hack. :)

gmarik
01-17-2004, 07:24 AM
This is huge

Bulent Tekcan
02-09-2004, 01:13 PM
Is is compatible for RC4 ?

Xenon
02-09-2004, 01:33 PM
as you don't have to change code, just add code, yes it is

Oblivion Knight
03-25-2004, 10:27 PM
Thanks Xenon,
Once again, an excellent and useful hack :)

teksigns
04-09-2004, 11:54 PM
hmmmm


what good is it if this is so ?

But be warned: messages can still be deleted via "Delete Thread / Posts" menu..



does that not defeat the purpose of having the hack ....
if moderators can still use the delete thread in the menu to delete
a administrators post then i dont see the point.....


please correct me if im reading this wrong

Xenon
04-11-2004, 03:07 PM
the main point of this hack is prevent editing of Admins posts, as the title already states.

the deletion prevention is just a automatic thing which belongs to it as edit and delete are on the same screen when clicking on edit.

Loyalty4Life
04-14-2004, 06:43 AM
Xenon - Great hack. I'm using it as we speak.

* Loyalty4Life clicked install some time ago :)

Majik?
04-15-2004, 07:03 PM
Will this apply to user note editing as well or just to post editing?

Xenon
04-15-2004, 07:58 PM
Just Post editing.

Majik?
04-15-2004, 09:07 PM
Just Post editing.
Okay, I'll just have a look at the usernote file and add the code in the right place. ;)

Xenon
04-15-2004, 10:11 PM
:)

it should work there as well :)

Majik?
04-15-2004, 11:45 PM
After a quick look.. I decided ther permision would only need to be checked within the editpost action (as the other relevant actions are POST). So, here's what I came up with quickly..

Message Edit Hierarchy Add-On :: User Notes
Version: 1.0
vBulletin Version: 3.0.0 'Gold' (Should Work w/Others, But That's WHat I Have)
Developer: Majik?



File Changes: 1/usernote.php


Find in "/usernote.php":// ############################### Start Edit User Note ##########################

if ($_REQUEST['do'] == 'editnote')
{
if ($noteinfo['posterid'] == $bbuserinfo['userid'] AND $permissions['genericpermissions'] & CANEDITOWNUSERNOTES)
{
// User has permissions to edit any notes that have posted no matter what the other manage permissions are set to..
}
else
{
if ($viewself AND !($permissions['genericpermissions'] & CANMANAGEOWNUSERNOTES))
{
print_no_permission();
}
else if (!$viewself AND !($permissions['genericpermissions'] & CANMANAGEOTHERSUSERNOTES))
{
print_no_permission();
}

And Add The Following Below That: else if (!in_array($bbuserinfo['userid'], preg_split('#\s*,\s*#s', $superadministrators, -1, PREG_SPLIT_NO_EMPTY)))
{
$noteuser = $DB_site->query_first("SELECT usergroupid FROM " . TABLE_PREFIX . "user WHERE userid='$noteinfo[posterid]'");
if (in_array($noteinfo['posterid'], preg_split('#\s*,\s*#s', $superadministrators, -1, PREG_SPLIT_NO_EMPTY)))
{
print_no_permission();
}
else if ($noteuser['usergroupid']==6)
{
print_no_permission();
}
else if (($noteuser['usergroupid']==5 OR $noteuser['usergroupid']==7) AND $bbuserinfo['usergroupid']!=6)
{
print_no_permission();
}
}

The permisison checking can be changed as desired and is only checked provided that the other standard permissions have passed.. These new settings won't have an effect on those without permission currently.

I have it setup so that SuperAdmins can edit anyone's notes, SuperAdmins'/Admins' notes can only be edited by SuperAdmins, and Mods'/SuperMods' notes can only be edited by Admins/SuperAdmins. If desired, you can change the last elseif statement and add others as needed (or any of them for that matter). ;)

Xenon
04-16-2004, 11:21 AM
not bad :)

i will modify it a bit, so it won't user usergroupid's but use the correct permissions and then edit the hack itself :)

you'll be mentioned :)

Majik?
04-16-2004, 04:01 PM
not bad :)

i will modify it a bit, so it won't user usergroupid's but use the correct permissions and then edit the hack itself :)

you'll be mentioned :) Ya, that's just what I did the first time quickly. I was going to make some changes to it, but yep.. do whatever you like with it. ;)

the Sandman
04-21-2004, 05:54 PM
Any problem installing this hack if the Advanced Editing Options For Mods & Admins hack is already installed (vB 3.0.1)?

the Sandman
04-21-2004, 06:26 PM
Hmm - I went ahead and installed it without waiting for a reply since it's so simple and elegant. I'm a SuperAdmin and am able to edit everyone's posts. However, I made a SuperModerator testuser and with that account I cannot edit any post made by a Moderator or higher? Is this a conflict between the two hacks, and is there a solution?

Xenon
04-21-2004, 07:34 PM
hmm, yeah there could be a conflict between both hacks.

i have not tested them on the same board.

maybe i have to do so when i get more time :)

the Sandman
04-21-2004, 08:49 PM
OK - thanks. I uninstalled the Message Editing Hierarchy Hack for now - lemme know when you have a chance to look at it. :)

the Sandman
05-02-2004, 07:09 PM
I posted in the Advanced Editing Options For Mods & Admins Thread that I had resolved my problem with Message Edit Hierarchy but I never updated this Thread. The reason my Super Moderators can not edit my Moderator's Posts is that I gave my Moderator Usergroup the permission "Can Moderate All Forums (is Super Moderator)" - so my Moderators are Super Moderators. It was never a problem with either hack - they work fine together.

Xenon
05-02-2004, 07:32 PM
*gg*

thx so :)

House_of_Crazed
07-22-2004, 11:57 PM
Xenon -

Can you verify that this will work with 3.0.3 for me please? :)

Because one of my Admins cannot delete a post made by a SuperMod, so, this is the only hack I've added in regards to editing permissions.

HoC

Xenon
07-23-2004, 07:40 AM
as it is just an additional piece of code, there shouldn't be problems with 3.0.3, just make sure you placed the code on the correct place.

House_of_Crazed
07-23-2004, 04:26 PM
I think I know why.

I realized it like hours after I posted this, lol

Tell me this tho :)

If a supermod has access to the admincp, it would prevent the admin from altering any of the supermod's posts, right?? Just verifying what i think it is. lol

Cuz I'm in the middle of rewriting the modcp before I close down access to admincp to the supermods.

HoC

Malacia
07-24-2004, 05:09 AM
Very nice hack, just the thing i need. I will be installing when i get my new forum set up

Xenon
07-25-2004, 08:59 PM
@House: exactly, if you give your supermod acces to the admincp my hack will consider his posts as admin posts, and therefore just super admins can edit those posts ;)

House_of_Crazed
07-26-2004, 01:46 AM
*laughs*

Okay, just what I thought. *laughs*

I modified it a bit :) Cuz I hate it when people just go off editing my posts. So, I removed some code from that to only prevent them from editing my posts. :)

So, I'm happy now :) *laughs*

HoC

Anette
10-09-2004, 06:33 AM
Very nice! :D

Ocean
01-03-2005, 09:09 PM
Hi!

Xenon, are there any problems running this hack on vB 3.0.4?
:)

Xenon
01-03-2005, 09:17 PM
i don't think so as code just gets added, but right now i didn't have the time to upgrade my testboards, so i cannot say for sure

laborer75
03-25-2005, 04:42 PM
Clicked install. Sweet Hack!!!!! Thanx for sharing bro....:)

Xenon
03-26-2005, 01:05 PM
:)

thx

ehjay
04-06-2005, 04:27 AM
Hi!

Xenon, are there any problems running this hack on vB 3.0.4?
:)
To ease any concerns, I've readded this hack to every installation between 3.0.1, and the most recent 3.0.7, with zero issues. : )

ehjay
04-15-2005, 09:10 PM
Oddly enough, I've just lost the use of this as a moderator edited one of my posts the other day.

Is there a problem I overlooked earlier?

Xenon
04-17-2005, 03:36 PM
there shouldn't be a problem, as i made every possible testscenario.
are you sure, everything is set up correctly?

the Sandman
05-28-2005, 01:57 PM
Can this hack be modified to prevent staff from replying to threads closed by higher ranking staff?

Xenon
05-31-2005, 11:16 AM
uhm, sorry nope.

that would require to make DB changes to store WHO closes a thread and so on.

There is a super close hack out there, maybe that one can help you

Mikecp421
01-02-2006, 04:28 PM
awesome mod, thanks man!!

valdet
08-14-2007, 11:34 AM
This is almost what I was looking for, but too bad it does not completely work for 3.6.x

I used it in conjuction with the other plugin from Xenon
https://vborg.vbsupport.ru/showthread.php?t=82599

I tested it in my forum (3.6.5) and came out with partial results.

The quick edit is well covered as moderators were not allowed to edit or delete threads by superior users(admins, supermods etc..)

But there were two problems
- The first was with the post Moderation dropdown menu. When you select an Admins post/thread, you can delete/move/copy/merge it with no problems.

- The second is the Thread Tools. A moderator is still able to delete/edit/move... an Admins thread..

Can anyone make a port of this beautiful hack for 3.6.x

Clicked install and waiting for some updates.. :)

acegames
08-14-2007, 11:35 AM
This would be awesome for 3.6.x :)