Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Users Only Allowed to Send PMs to Staff (staff excluded) Details »»
Users Only Allowed to Send PMs to Staff (staff excluded)
Version: 1.00, by Gary King Gary King is offline
Developer Last Online: Jun 2020 Show Printable Version Email this Page

Version: 2.3.x Rating:
Released: 12-13-2003 Last Update: Never Installs: 4
 
No support by the author.

Requested here: https://vborg.vbsupport.ru/showthread.php?t=59131

What does this hack do?

It restricts the user's usage of private messages, so that they can only send/receive private messages from administrators, supermoderators or moderators.

You are also able to turn this on or off at will, in the settings area of the admincp.

Instructions

Run the following query:[sql]INSERT INTO `setting` ( `settingid` , `settinggroupid` , `title` , `varname` , `value` , `description` , `optioncode` , `displayorder` ) VALUES ('', '19', 'Only allow staff to send PMs/users to send PMs to staff?', 'staffsendspms', '0', 'Do you want to only allow staff (moderators, supermoderators and administrators) to be allowed to send PMs, and only allow users to send PMs to staff?', 'yesno', '25');[/sql]

Open private.php and find
PHP Code:
  $signature=iif($signature=="yes",1,0); 
Above, add
PHP Code:
    // [Gary W] only allow staff to send / only allow users to send to staff
    
if ($staffsendspms and ($bbuserinfo['usergroupid'] != and $bbuserinfo['usergroupid'] != and $bbuserinfo['usergroupid'] != 7) and ($touserinfo['usergroupid'] != and $touserinfo['usergroupid'] != and $touserinfo['usergroupid'] != 7))
    {
        eval(
"standarderror(\"".gettemplate("error_canonlypmstaff")."\");");
        exit;
    } 
Create a new template named error_canonlypmstaff with the following content
HTML Code:
You can only send PMs to a member of the forum staff (administrator, supermoderator or moderator!)

Enjoy!

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 12-15-2003, 10:35 AM
Dan's Avatar
Dan Dan is offline
 
Join Date: Dec 2002
Location: Titusville, Florida
Posts: 1,787
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice hack Gary Won't use it though since it is for vB2
Reply With Quote
  #3  
Old 12-15-2003, 03:46 PM
MindTrix's Avatar
MindTrix MindTrix is offline
 
Join Date: Apr 2002
Location: United Kingdom
Posts: 1,833
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice idea mate! Thanks alot
Reply With Quote
  #4  
Old 12-26-2003, 11:39 PM
Shell Geeks's Avatar
Shell Geeks Shell Geeks is offline
 
Join Date: Dec 2003
Location: Southern California
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

wow that was an easy install great hack, this will be great to fight off all the lamers who register at boards just to blanket it with PM's
Reply With Quote
  #5  
Old 12-27-2003, 12:39 AM
Gary King's Avatar
Gary King Gary King is offline
 
Join Date: Jan 2002
Posts: 2,046
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Could people please click on Install if you installed it, just for courtesy, thanks
Reply With Quote
  #6  
Old 12-28-2003, 03:58 PM
BabesAndStuff BabesAndStuff is offline
 
Join Date: Jun 2003
Location: Ireland
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

can u use this with permissions to give some people normal rights and others the hacks limited to staff rights only
Reply With Quote
  #7  
Old 01-23-2004, 01:11 PM
midnightz midnightz is offline
 
Join Date: Jan 2003
Location: Inside the Velvet Tunnel
Posts: 159
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there away, to have it where only accepted groups numbers can PM admins. I get a lot of PM's from newbies and groups and just don't want them. But I would like to kep in touch with the usergroups i feel choice.. ?

Possible,

Thanks
Reply With Quote
  #8  
Old 01-23-2004, 02:44 PM
Gary King's Avatar
Gary King Gary King is offline
 
Join Date: Jan 2002
Posts: 2,046
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by midnightz
Is there away, to have it where only accepted groups numbers can PM admins. I get a lot of PM's from newbies and groups and just don't want them. But I would like to kep in touch with the usergroups i feel choice.. ?

Possible,

Thanks
Modify
PHP Code:
    if ($staffsendspms and ($bbuserinfo['usergroupid'] != and $bbuserinfo['usergroupid'] != and $bbuserinfo['usergroupid'] != and $bbuserinfo['usergroupid'] != X) and ($touserinfo['usergroupid'] != and $touserinfo['usergroupid'] != and $touserinfo['usergroupid'] != 7))

Replace the X with whatever usergroupid you want to allow to send PMs
Reply With Quote
  #9  
Old 01-23-2004, 03:03 PM
midnightz midnightz is offline
 
Join Date: Jan 2003
Location: Inside the Velvet Tunnel
Posts: 159
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great thanks

If I'm not mistaken before installing this will still block users from sending pms to other users?
and also allow myself to PM'ed by shosen usergroups.

Will the above code (i'm not sure) allow Pm's to fully operate as normal, meaning all users can pm all users, except admins (unless the usergroup is listed)

Thanks again for such a quick response
Reply With Quote
  #10  
Old 01-23-2004, 06:40 PM
Gary King's Avatar
Gary King Gary King is offline
 
Join Date: Jan 2002
Posts: 2,046
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by midnightz
Great thanks

If I'm not mistaken before installing this will still block users from sending pms to other users?
and also allow myself to PM'ed by shosen usergroups.

Will the above code (i'm not sure) allow Pm's to fully operate as normal, meaning all users can pm all users, except admins (unless the usergroup is listed)

Thanks again for such a quick response
This will allow one extra usergroup to send PMs freely to anyone they want.
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 04:02 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.04392 seconds
  • Memory Usage 2,308KB
  • Queries Executed 23 (?)
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)bbcode_html
  • (3)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)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