View Thread
All MODs and their Supported Threads goes here in this Section.
 Print Thread
[MOD]Messages.php no limits for user groups
Wanabo
I have some webcare teams on my sites. For granting rights in the forum I have placed them in a group.
Unfortunately the post limit from the Personal Messages system is limited to non admins. (limit setting adjustable in admin panel).

Webcare gets a lot of PM's from a lot of members so I needed a way around the PM limit.

No limits in PM system for groups (and groupmembers)

Here it is:
Open message.php and find around line 28
Download source  GeSHi: PHP
  1. if (iADMIN || $userdata['user_id'] == 1) {
  2.  
Parsed in 0.009 seconds, using GeSHi 1.0.8.10


Replace with
Download source  GeSHi: PHP
  1. if (iADMIN || $userdata['user_id'] == 1 || iUSER_GROUPS) /* Mod Wanabo, no limits for groups */ {
  2.  
Parsed in 0.008 seconds, using GeSHi 1.0.8.10


Remember, this mod will grant all groups no limits in PM system like the admins have.

When you just want to grant 1 group no limits change;
iUSER_GROUPS
in
$userdata['user_groups'] == .X

Where X is the group number. The dot before the number is necessary!!
See code;
Download source  GeSHi: PHP
  1. if (iADMIN || $userdata['user_id'] == 1 || $userdata['user_groups'] == .X) /* Mod Wanabo, no limits for groups */ {
  2.  
Parsed in 0.008 seconds, using GeSHi 1.0.8.10

Edited by Wanabo on 08-03-2011 20:49
Cool
 
Ankur
.....and when we want two or more groups, then we will add more OR after the condition and hence it will allow them... hmm Smile

Thanks for this useful info ... Wink
Be What you want to be...Wink
 
www.php-fusion.in
Jump to Forum
New Thread Post Reply
Use BBcode or HTML to refer to; '[MOD]Messages.php no limits for user groups'
BBcode:
HTML: