Follow vBSEO on Twitter
vBulletin Modifications
  • Forums
  • Add-Ons
  • Template Modifications
  • Styles
  • Graphics
  • Tutorials
  • Support Center
  • Register
  • vBulletin SEO

Member Log In

Site Navigation

  • Register
  • Members List
  • Social Groups
  • Search
  • Today's Posts
  • Mark Forums Read

Latest Modifications

  • [vB 3.8.4] THX - Hack for VB. 3.8.4
    By: bluedog
  • [vB 3.8.4] Cyb - Chatbox V.2.3
    By: bluedog
  • [vB 4.0.x] PHPKD - Advanced Quick...
    By: PHPKD
  • [vB 3.6.x] StopSpam
    By: flappi282
  • [vB 3.8.x] vBulletin Chat Addon for...
    By: 123flashchat

Latest Template Mods

  • [vB 4.0.x] Remove My Profile Link...
    By: Ak Worm
  • [vB 3.8.x] Images DownloadBox...
    By: cRs!MP
  • [vB 3.8.x] Adviertise Mod On Forum...
    By: MG4
  • [vB 3.8.4] Images PassWordBox...
    By: cRs!MP
  • [vB 3.8.4] Footer Follow Ups
    By: Ak Worm

Latest Styles

  • [vB 4.0.x] 4.0.3 - VB4STYLE-TWEETA...
    By: Belon
  • [vB 4.0.x] [4.0.3] vbdesigns.de...
    By: Belon
  • [vB 3.8.4] CompletevB - Skylight
    By: DreadKnight
  • [vB 3.8.3] [vB 3.8.4] Barcelona...
    By: hoiquantinhoc.com
  • [vB 3.8.3] Natures Walk by vBSkin...
    By: Chri5

Latest Graphics

  • [vB ] [anim.]Team Ranks
    By: cRs!MP
  • [vB ] Abstract Circles (3...
    By: cRs!MP
  • [vB ] PlayStation Rank Images
    By: cRs!MP
  • [vB 3.6.12] Heavy Stroked Button...
    By: Shelley
  • [vB ] Minature Ranks.
    By: Shelley
vBulletin Modifications » General vBulletin Section » vBulletin Modification Requests » Users Only Allowed to Send PMs to Staff (staff excluded)
Reply

 

  • Thread Tools
Old 08-26-2005, 10:53 AM   #1
firas
Charter Member

Activity Longevity
0/20 19/20
Today Posts
0/3 ssssssss7
firas is on a distinguished road
Status: Offline Default Users Only Allowed to Send PMs to Staff (staff excluded)
Hi..

i have a hack on my 2.3 and i've been looking for it for 3.0 and now for 3.5 and it is the only thing that prevents me from upgrading my forum. i already have it and i am wondering if i upgrade my forum to 3.5 what are the modification that i should do to my forum and/or to the code so that it works perfectly.

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

and it was like that:

Instructions

Run the following query:
SQL Query:
PHP Code:
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'); 
which means that i already have this done on my forum.

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'] != 5 and $bbuserinfo['usergroupid'] != 6 and $bbuserinfo['usergroupid'] != 7) and ($touserinfo['usergroupid'] != 5 and $touserinfo['usergroupid'] != 6 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!)
Reply With Quote
Old 09-05-2005, 05:04 AM   #2
firas
Charter Member

Activity Longevity
0/20 19/20
Today Posts
0/3 ssssssss7
firas is on a distinguished road
Status: Offline Default
anyone please?
Reply With Quote
Old 09-07-2005, 08:24 PM   #3
Hakkie
Charter Member

Activity Longevity
0/20 20/20
Today Posts
0/3 sssssss33
Hakkie is on a distinguished road
Status: Offline Default
Don't know if you still need it, but this is what I could code for you in a few minutes:

PHP Code:
$touserid = trim(addslashes(htmlspecialchars_uni($_GET['u'])));

if ((
$vbulletin->userinfo[usergroupid] != 5 and $vbulletin->userinfo[usergroupid] != 999 and $vbulletin->userinfo[usergroupid] != 7) AND ($touserid != 961))
{
    
print_no_permission();
} 
Put that in hook private_start

You will need to hardcode the specific staffmembers, since I don't think I can use a $touser[usergroupid].
Reply With Quote
Old 09-08-2005, 08:04 AM   #4
firas
Charter Member

Activity Longevity
0/20 19/20
Today Posts
0/3 ssssssss7
firas is on a distinguished road
Status: Offline Default
thanx alot for your help but this will be verry difficult as we have a very large number..

thanx anyway
Reply With Quote

Reply

« Show all releases | viewing users pass »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page

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
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Rules

Similar Threads
Thread Thread Starter Forum Replies Last Post
Admin Read User's PMs ngaiox vBulletin Modification Requests 2 08-16-2006 06:12 PM



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

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.
Transverse Styles
  • Top
  • Archive
  • vBSEO
  • Contact Us
LinkBack
LinkBack URL LinkBack URL
About LinkBacks About LinkBacks
Bookmark & Share
Digg this Thread! Digg this Thread!
Add Thread to del.icio.us Add Thread to del.icio.us
Bookmark in Technorati Bookmark in Technorati
Furl this Thread! Furl this Thread!