Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 11-16-2004, 04:49 PM
radwulf radwulf is offline
 
Join Date: Mar 2003
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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!
Reply With Quote
  #2  
Old 11-17-2004, 05:48 PM
BamaStangGuy's Avatar
BamaStangGuy BamaStangGuy is offline
 
Join Date: Mar 2004
Location: Alabama
Posts: 521
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I would like this as well
Reply With Quote
  #3  
Old 11-25-2004, 04:17 AM
radwulf radwulf is offline
 
Join Date: Mar 2003
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

bump
Reply With Quote
  #4  
Old 11-25-2004, 05:18 AM
tnguy3n's Avatar
tnguy3n tnguy3n is offline
 
Join Date: May 2003
Location: U of I, Iowa
Posts: 846
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #5  
Old 01-10-2005, 07:00 PM
the_sisko's Avatar
the_sisko the_sisko is offline
 
Join Date: Oct 2001
Location: Hamburg,Germany
Posts: 132
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #6  
Old 01-10-2005, 07:06 PM
noppid noppid is offline
 
Join Date: Mar 2003
Location: Florida
Posts: 1,875
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Couldn't a clever mod just navigate there by hand though?
Reply With Quote
  #7  
Old 01-10-2005, 07:23 PM
noppid noppid is offline
 
Join Date: Mar 2003
Location: Florida
Posts: 1,875
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #8  
Old 01-10-2005, 07:36 PM
noppid noppid is offline
 
Join Date: Mar 2003
Location: Florida
Posts: 1,875
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #9  
Old 01-10-2005, 07:49 PM
noppid noppid is offline
 
Join Date: Mar 2003
Location: Florida
Posts: 1,875
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #10  
Old 02-01-2005, 01:57 PM
wackbag wackbag is offline
 
Join Date: Sep 2003
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:16 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.08079 seconds
  • Memory Usage 2,276KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (6)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete