View Thread
 Print Thread
[MOD]Messages.php no limits for user groups
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) {
Parsed in 0.046 seconds, using GeSHi

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

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;
$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 */ {
Parsed in 0.025 seconds, using GeSHi

Edited by Wanabo on 09-03-2011 02:19
.....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
Jump to Forum
New Thread Post Reply
Use BBcode or HTML to refer to; '[MOD]Messages.php no limits for user groups'