mirror of
https://github.com/e107inc/e107.git
synced 2025-01-17 20:58:30 +01:00
Private Messaging - VIP Class feature added.
This commit is contained in:
parent
1e44928e1f
commit
a8f658283f
@ -127,6 +127,7 @@ class private_msg_ui extends e_admin_ui
|
||||
'pm_class' => array('title'=> ADLAN_PM_23, 'tab'=>0, 'type' => 'userclass', 'data' => 'int', 'help'=>'', 'writeParms'=>array('size'=>'xlarge', 'classlist'=>'nobody,main,member,admin,classes')),
|
||||
'sendall_class' => array('title'=> ADLAN_PM_29, 'tab'=>1, 'type' => 'userclass', 'data' => 'int', 'help'=>'', 'writeParms'=>array('size'=>'xlarge', 'classlist'=>'nobody,main,member,admin,classes')),
|
||||
'send_to_class' => array('title'=> ADLAN_PM_83, 'tab'=>0, 'type' => 'method', 'data' => 'str', 'help'=>''),
|
||||
'vip_class' => array('title'=> ADLAN_PM_86, 'tab'=>0, 'type' => 'userclass', 'data' => 'int', 'help'=>ADLAN_PM_87, 'writeParms'=>array('size'=>'xlarge', 'classlist'=>'nobody,main,admin,classes')),
|
||||
'multi_class' => array('title'=> ADLAN_PM_30, 'tab'=>0, 'type' => 'userclass', 'data' => 'int', 'help'=>'', 'writeParms'=>array('size'=>'xlarge', 'classlist'=>'nobody,main,member,admin,classes')),
|
||||
'opt_userclass' => array('title'=> ADLAN_PM_31, 'tab'=>0, 'type' => 'userclass', 'data' => 'int', 'help'=>'', 'writeParms'=>array('size'=>'xlarge', 'classlist'=>'nobody,main,member,admin,classes')),
|
||||
|
||||
@ -143,6 +144,8 @@ class private_msg_ui extends e_admin_ui
|
||||
'pm_max_send' => array('title'=> ADLAN_PM_81, 'tab'=>1, 'type' => 'number', 'data' => 'int', 'help'=>''),
|
||||
'perpage' => array('title'=> ADLAN_PM_24, 'tab'=>0, 'type' => 'number', 'data' => 'int', 'help'=>''),
|
||||
'maxlength' => array('title'=> ADLAN_PM_84, 'tab'=>1, 'type' => 'number', 'data' => 'int', 'help'=>ADLAN_PM_85, 'writeParms'=>array('post'=>'chars.')),
|
||||
|
||||
|
||||
);
|
||||
|
||||
|
||||
|
@ -79,5 +79,5 @@ define("ADLAN_PM_83", "Users may only send messages to users in this class");
|
||||
define("ADLAN_PM_84", "Maximum message length");
|
||||
define("ADLAN_PM_85", "0 = unlimited");
|
||||
|
||||
|
||||
?>
|
||||
define("ADLAN_PM_86", "VIP Class");
|
||||
define("ADLAN_PM_87", "Users in this class can only receive messages from others in this class. Overrides the above preference.");
|
||||
|
@ -676,6 +676,15 @@ class private_message
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!empty($this->pmPrefs['vip_class']))
|
||||
{
|
||||
if(check_class($this->pmPrefs['vip_class'],null,$uid) && !check_class($this->pmPrefs['vip_class']))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$user = e107::user($uid);
|
||||
|
||||
$uclass = explode(",", $user['user_class']);
|
||||
|
Loading…
x
Reference in New Issue
Block a user