vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Message Editing Hierarchy (https://vborg.vbsupport.ru/showthread.php?t=60066)

Xenon 01-10-2004 10:00 PM

Message Editing Hierarchy
 
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

Quote:

Originally Posted by FleaBag
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

Quote:

Originally Posted by Faranth
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

Quote:

Originally Posted by Xenon
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

Quote:

Originally Posted by Boofo
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

Quote:

Originally Posted by Xenon
@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

Hmm, 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 ?

Quote:

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.

[high]* Loyalty4Life clicked install some time ago :)[/high]

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

Quote:

Originally Posted by Xenon
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":
PHP Code:

// ############################### 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:
PHP Code:

 else if (!in_array($bbuserinfo['userid'], preg_split('#\s*,\s*#s'$superadministrators, -1PREG_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, -1PREG_SPLIT_NO_EMPTY)))
{
    
print_no_permission();
}
else if (
$noteuser['usergroupid']==6)
{
    
print_no_permission();
}
else if ((
$noteuser['usergroupid']==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

Quote:

Originally Posted by Xenon
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


All times are GMT. The time now is 04:50 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01493 seconds
  • Memory Usage 1,837KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete