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 12-13-2014, 04:32 PM
Skyrider Skyrider is offline
 
Join Date: Feb 2006
Location: Netherlands
Posts: 1,392
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Remove users ability to remove private messages

Anyone happens to know if this one exists? If not, would someone fancy creating one?
Reply With Quote
  #2  
Old 12-13-2014, 04:39 PM
Dave Dave is offline
 
Join Date: May 2010
Posts: 2,583
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

private_managepm_start hook:

PHP Code:
if($vbulletin->GPC['dowhat'] == 'delete'){
  
$vbulletin->GPC['dowhat'] = 'nothing';

Untested, but should do the trick. Will prevent everyone from deleting PM's.
Reply With Quote
  #3  
Old 12-13-2014, 06:03 PM
Skyrider Skyrider is offline
 
Join Date: Feb 2006
Location: Netherlands
Posts: 1,392
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Awesome, appears to be working with a message:

Quote:
Invalid Action specified. If you followed a valid link, please notify the administrator
Any idea how to include this code to specific usergroups? And perhaps a custom text? <3 Really appreciate it btw!
Reply With Quote
  #4  
Old 12-13-2014, 06:46 PM
ForceHSS ForceHSS is offline
 
Join Date: Apr 2008
Posts: 6,357
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So when a user gets to their max allowed pms and can't delete any what are you going to do did you ever think about that problem
Reply With Quote
  #5  
Old 12-13-2014, 06:57 PM
Dave Dave is offline
 
Join Date: May 2010
Posts: 2,583
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The array is an array of usergroupid's which are allowed to delete PM's.

Code:
if($vbulletin->GPC['dowhat'] == 'delete' && !in_array($vbulletin->userinfo['usergroupid'], array(6))){ 
  eval(standard_error('You may not delete private messages. <a href="private.php">Return</a>'));
}
Reply With Quote
  #6  
Old 12-13-2014, 06:59 PM
Skyrider Skyrider is offline
 
Join Date: Feb 2006
Location: Netherlands
Posts: 1,392
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ForceHSS View Post
So when a user gets to their max allowed pms and can't delete any what are you going to do did you ever think about that problem
I highly doubt that'll be a problem with tons of PM space.

Quote:
Originally Posted by Dave View Post
The array is an array of usergroupid's which are allowed to delete PM's.

Code:
if($vbulletin->GPC['dowhat'] == 'delete' && !in_array($vbulletin->userinfo['usergroupid'], array(6))){ 
  eval(standard_error('You may not delete private messages. <a href="private.php">Return</a>'));
}
Appears to be working perfectly, thanks!
Reply With Quote
  #7  
Old 12-13-2014, 07:24 PM
ForceHSS ForceHSS is offline
 
Join Date: Apr 2008
Posts: 6,357
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Skyrider View Post
I highly doubt that'll be a problem with tons of PM space.


Appears to be working perfectly, thanks!
Even if you allow each member 1000's it will one day fill up and if it takes years by then you will forget that you added this code. You would be best to fix the code now for that problem in the future
Reply With Quote
  #8  
Old 12-15-2014, 09:13 AM
Skyrider Skyrider is offline
 
Join Date: Feb 2006
Location: Netherlands
Posts: 1,392
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ForceHSS View Post
Even if you allow each member 1000's it will one day fill up and if it takes years by then you will forget that you added this code. You would be best to fix the code now for that problem in the future
The thing is that the banned users can't send private messages either way, but they were able to remove them due to our changes in the banned usergroup(s). So this code fits perfectly with what we actually want .
Reply With Quote
  #9  
Old 12-15-2014, 01:58 PM
squidsk's Avatar
squidsk squidsk is offline
 
Join Date: Nov 2010
Posts: 969
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just because they can't send them doesn't mean they can't receive them, either way one day their inbox will fill up.
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 09:51 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.04307 seconds
  • Memory Usage 2,242KB
  • 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
  • (2)bbcode_code
  • (1)bbcode_php
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete