vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Disable Supermoderator Pruning & Physical Delete (https://vborg.vbsupport.ru/showthread.php?t=71827)

radwulf 11-16-2004 04:49 PM

Disable Supermoderator Pruning & Physical Delete
 
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

Quote:

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

//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, -1PREG_SPLIT_NO_EMPTY)), truefalse);
//hack end 

search for: $show['physicaldeleteoption']
editpost.php
PHP Code:

    //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, -1PREG_SPLIT_NO_EMPTY)), truefalse);
    
//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...

PHP Code:

if (!can_moderate(0'canmassmove') AND !can_moderate(0'canmassprune')) 

Above it add...

PHP Code:

// 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

Quote:

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

//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, -1PREG_SPLIT_NO_EMPTY)), truefalse);
//hack end 

search for: $show['physicaldeleteoption']
editpost.php
PHP Code:

    //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, -1PREG_SPLIT_NO_EMPTY)), truefalse);
    
//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?


All times are GMT. The time now is 03:04 AM.

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.01054 seconds
  • Memory Usage 1,762KB
  • 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
  • (6)bbcode_php_printable
  • (2)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
  • (10)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