View Full Version : Disable Supermoderator Pruning & Physical Delete
radwulf
11-16-2004, 04:49 PM
I would like to disable the Supermoderator's ability to Prune anything (from Modcp as well as from the Thread tools) and the ability to physically delete and posts or threads. I'd like to do it with as little code changes as possible, ideally. Any help would be appreciated!
BamaStangGuy
11-17-2004, 05:48 PM
I would like this as well
radwulf
11-25-2004, 04:17 AM
bump
tnguy3n
11-25-2004, 05:18 AM
bump
ain't there an option allowing you to enable or disable Smod to physically delete threads/posts in Admin CP?
the_sisko
01-10-2005, 07:00 PM
OK, I did this for my forum today.
I altered it so only superadmin can physical delete in the front-end.
search for: $show['harddelete']
posting.php//hack start
//$show['harddelete'] = iif(can_moderate($threadinfo['forumid'], 'canremoveposts'), true, false);
$show['harddelete'] = iif(in_array($bbuserinfo['userid'], preg_split('#\s*,\s*#s', $superadministrators, -1, PREG_SPLIT_NO_EMPTY)), true, false);
//hack endsearch for: $show['physicaldeleteoption']
editpost.php //hack start
//$show['physicaldeleteoption'] = iif (can_moderate($threadinfo['forumid'], 'canremoveposts'), true, false);
$show['physicaldeleteoption'] = iif(in_array($bbuserinfo['userid'], preg_split('#\s*,\s*#s', $superadministrators, -1, PREG_SPLIT_NO_EMPTY)), true, false);
//hack end
hope this could help you.
noppid
01-10-2005, 07:06 PM
Couldn't a clever mod just navigate there by hand though?
noppid
01-10-2005, 07:23 PM
Here's what I've been using, this is just a pure lockout...
in forums/modcp/thread.php find...
if (!can_moderate(0, 'canmassmove') AND !can_moderate(0, 'canmassprune'))
Above it add...
// hack
if (1)
{
print_stop_message('no_permission');
}
// end hack
You can modify the if() should you choose to make this conditional.
Admins are sent to the ACP, so you are not locked out from these functions.
noppid
01-10-2005, 07:36 PM
I don't tell my mods about stuff like this, but now that it's in the open, that blocks the menu, not the functions. So maybe a clever person could still submit a form and do damage. So I'll be looking up those functions to block them from that now. I'm not sure if vB blocks remote submissions or not. Best to be very paranoid and lock it all IMO if you lock it at all.
noppid
01-10-2005, 07:49 PM
There is no need to be in thread.php at all. Just moving the hack code up four lines will stop thread.php's use completely it seems. I adjusted my post above with the code.
wackbag
02-01-2005, 01:57 PM
OK, I did this for my forum today.
I altered it so only superadmin can physical delete in the front-end.
search for: $show['harddelete']
posting.php//hack start
//$show['harddelete'] = iif(can_moderate($threadinfo['forumid'], 'canremoveposts'), true, false);
$show['harddelete'] = iif(in_array($bbuserinfo['userid'], preg_split('#\s*,\s*#s', $superadministrators, -1, PREG_SPLIT_NO_EMPTY)), true, false);
//hack endsearch for: $show['physicaldeleteoption']
editpost.php //hack start
//$show['physicaldeleteoption'] = iif (can_moderate($threadinfo['forumid'], 'canremoveposts'), true, false);
$show['physicaldeleteoption'] = iif(in_array($bbuserinfo['userid'], preg_split('#\s*,\s*#s', $superadministrators, -1, PREG_SPLIT_NO_EMPTY)), true, false);
//hack end
hope this could help you.
I tried this and it works great .. However, the option to physically delete is still there if a supermod hits "manage" on a soft deleted thread (not Post) Anyone have any ideas?
the_sisko
02-01-2005, 05:34 PM
I rechecked this for manage deleted posts. It uses the same var $show['harddelete'] on posting.php. So it should work the same way, without extra code modification.
Do you have a test user with mod rights or did you checked the manage deleted post site as admin? As admin it should work anyway.
wackbag
02-01-2005, 09:17 PM
I checked logged in as a supermoderator. the option for "physically delete" was not available in "manage post" yet it was available in "Manage Thread"
if anyone can post what I would have to do to get that fixed I would be eternally greatful.
Sha Platinum?
07-30-2006, 01:05 AM
usefull thanks
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.