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)
-   -   Disable PMs for single user(s) (https://vborg.vbsupport.ru/showthread.php?t=82378)

Andreas 06-01-2005 10:00 PM

Disable PMs for single user(s)
 
Ever wanted to disable the PMs for 1 or 2 users without having to create a new usergroup for them?

Then this hack is for you!

1) Go to ACP and turn off PM reception for the user(s) causing trouble.

2) Then put the following code (replace X, Y and Z with the userids) in template phpinclude_start to make sure they won't turn it back on again:

PHP Code:

if (in_array($bbuserinfo['userid'], array(XYZ)))
{
    
$permissions['pmquota'] = 0;
    unset(
$_POST['options']['receivepm']);


Done.

This was developed and tested with 3.0.6, but should work with all 3.0.X-Versions.

Lionel 06-02-2005 02:40 AM

why not make it a vboptions so it will be easy to add/remove users from that list?

Andreas 06-02-2005 02:42 AM

Because that would make things a bit more complicated ;)

Brent H 06-02-2005 02:59 AM

Won't this make members who disable PMs themselves unable to turn them back on?

Andreas 06-02-2005 03:15 AM

No. The code only gets executed for the userids listed.

Brent H 06-02-2005 04:03 AM

Ohhh I'm sorry... I didn't read the code carefully enough. Sorry about that :)

Great idea man, I'll be able to use this in the next few weeks.

Marco van Herwaarden 06-02-2005 06:28 AM

@Kirby

Could you please provide the instructions also as a textfile, so people who use this hack can have it as a reference for upgrading. :D :D

Andreas 06-02-2005 10:59 AM

Hmm, a textfile for 4 lines which will not be lost during an upgrade (as it is phpinclude code) sounds like overkill.
But neverthlesss: attached :)

almqdad 07-27-2005 10:18 AM

Hi

there is such option

Quote:

1) Go to ACP and turn off PM reception for the user(s) causing trouble

Andreas 07-27-2005 10:28 AM

Quote:

Originally Posted by almqdad
Hi

there is such option

???
Sorry, I don't understand what you want?


All times are GMT. The time now is 06:24 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.01189 seconds
  • Memory Usage 1,728KB
  • 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
  • (1)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