| :: |
| Author |
Message |
nims phpBB SEO Team

Joined: 11 Oct 2006 Posts: 243 Location: New Delhi, India
|
Posted: Thu Nov 30, 2006 8:03 am Post subject: Private Message restriction |
|
|
Is there any MOD that can control the number of allowed PMs for users depending on the number of posts they have made.
I am facing a problem of users discussing and promoting their companies thru PM without taking part in the discussions on the main forum. I cannot disable the PMs altogether bcos there are certain genuine things that need to be discussed thru PM only.
It wud be great to know if there is a MOD that restricts the number of PMs a user can send depending on the number of posts he has made in the main forum. |
_________________ Audio Ads - Earn from every visitor to your site
Buy Latest mobiles *** SEO India |
|
| Back to top |
|
 |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 15127
|
Posted: Thu Nov 30, 2006 8:33 am Post subject: Re: Private Message restriction |
|
|
This is simple
Open :
find :
| Code: | //
// Has admin prevented user from sending PM's?
//
if ( !$userdata['user_allow_pm'] )
{
$message = $lang['Cannot_send_privmsg'];
message_die(GENERAL_MESSAGE, $message);
} |
replace with :
| Code: | // www.phpBB-SEO.com SEO TOOLKIT BEGIN
// Set here the limit before PM Sending is made possible
// 0 for always
$min_posts = 25;
//
// Has admin prevented user from sending PM's?
//
if ( !$userdata['user_allow_pm'] || (intval($userdata['user_posts']) < $min_posts) )
{
$message = $lang['Cannot_send_privmsg'];
message_die(GENERAL_MESSAGE, $message);
}
// www.phpBB-SEO.com SEO TOOLKIT END |
You could as well edit the $lang['Cannot_send_privmsg'] in lang_main.php, to tell something about the limit
You can set the limit on this line :
++ |
_________________ Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________
Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche |
|
| Back to top |
|
 |
nims phpBB SEO Team

Joined: 11 Oct 2006 Posts: 243 Location: New Delhi, India
|
Posted: Thu Nov 30, 2006 9:30 am Post subject: Re: Private Message restriction |
|
|
Thanks for that, but actually my requirement is to control the number of PMs a person can send in all. | Quote: |
It wud be great to know if there is a MOD that restricts the number of PMs a user can send depending on the number of posts he has made in the main forum. |
Example : say we can have | Code: | | number_of_pms_allowed = number_of_posts * 3 |
So if someone has posted a total of 10 posts he will be authorised to send 10*3=30 PMs in all. For every one post he gets to send 3 PMs. |
_________________ Audio Ads - Earn from every visitor to your site
Buy Latest mobiles *** SEO India |
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 15127
|
|
| Back to top |
|
 |
nims phpBB SEO Team

Joined: 11 Oct 2006 Posts: 243 Location: New Delhi, India
|
Posted: Thu Nov 30, 2006 10:59 am Post subject: Re: Private Message restriction |
|
|
I think you can surely do some editing to the above code and accomplish that.
You only need to know how many PMs that user has sent like you have | Code: | | $userdata['user_posts'] |
PHPBB must be storing the number of PMs sent somewhere or if not then we can add a column in appropriate table to have a count of number of PMs sent and then it wud be really simple. What do you say ? |
_________________ Audio Ads - Earn from every visitor to your site
Buy Latest mobiles *** SEO India |
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 15127
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 15127
|
|
| Back to top |
|
 |
|
|