{REQ} any hack to ban new user from PM until XX posts ?

Looking for a MOD? Have a MOD request? Post here for help. (Note: This forum is community supported; phpBB does not have official MOD authors)
Suggested Hosts
Locked
User avatar
FaresNB
Registered User
Posts: 271
Joined: Tue May 22, 2007 11:50 am
Location: Syria
Name: Fares Alnaeb
Contact:

{REQ} any hack to ban new user from PM until XX posts ?

Post by FaresNB »

Hi

as you see .... any hack to ban new user from PM until XX posts ?

User avatar
kam009
Registered User
Posts: 76
Joined: Wed Dec 19, 2007 3:37 am

Re: {REQ} any hack to ban new user from PM until XX posts ?

Post by kam009 »

make a new user group and edit the premissions so they can't email. then when they reach so many posts, automatically move them to the new rank/group. piece of cake.

User avatar
FaresNB
Registered User
Posts: 271
Joined: Tue May 22, 2007 11:50 am
Location: Syria
Name: Fares Alnaeb
Contact:

Re: {REQ} any hack to ban new user from PM until XX posts ?

Post by FaresNB »

kam009 wrote:make a new user group and edit the premissions so they can't email. then when they reach so many posts, automatically move them to the new rank/group. piece of cake.
I'm sorry but I didn't get it ... How can I make the user move automatically to another group according to post count ? :roll:

jalaln
Registered User
Posts: 1076
Joined: Tue Jul 05, 2005 5:05 am

Re: {REQ} any hack to ban new user from PM until XX posts ?

Post by jalaln »

FaresNB wrote:Hi

as you see .... any hack to ban new user from PM until XX posts ?
Try this:

Open: includes/ucp/ucp_pm_compose.php

Find:

Code: Select all

if (!defined('IN_PHPBB'))
{
    exit;
} 
After, add:

Code: Select all

if ($user->data['user_posts'] < 10 )
{
trigger_error('Sorry, your postcount must be 10 or greater in order to compose PMs!');
} 
No more spambots for phpBB2 and phpBB3.

demon327
Registered User
Posts: 847
Joined: Thu Nov 16, 2006 2:16 pm

Re: {REQ} any hack to ban new user from PM until XX posts ?

Post by demon327 »

FaresNB wrote: I'm sorry but I didn't get it ... How can I make the user move automatically to another group according to post count ? :roll:
try this mod:
http://www.phpbb.com/community/viewtopi ... 9&t=770205

thats just what you needed :)

User avatar
FaresNB
Registered User
Posts: 271
Joined: Tue May 22, 2007 11:50 am
Location: Syria
Name: Fares Alnaeb
Contact:

Re: {REQ} any hack to ban new user from PM until XX posts ?

Post by FaresNB »

jalaln wrote:
FaresNB wrote:Hi

as you see .... any hack to ban new user from PM until XX posts ?
Try this:

Open: includes/ucp/ucp_pm_compose.php

Find:

Code: Select all

if (!defined('IN_PHPBB'))
{
    exit;
} 
After, add:

Code: Select all

if ($user->data['user_posts'] < 10 )
{
trigger_error('Sorry, your postcount must be 10 or greater in order to compose PMs!');
} 

Thanx alot for that ..... it's so easy and usefull .... but one thing ... I'm using the Arabic language .... How can I add this line to the language files ? :roll:

jalaln
Registered User
Posts: 1076
Joined: Tue Jul 05, 2005 5:05 am

Re: {REQ} any hack to ban new user from PM until XX posts ?

Post by jalaln »

Open: includes/ucp/ucp_pm_compose.php

Find:

Code: Select all

if ($user->data['user_posts'] < 10 )
{
trigger_error('Sorry, your postcount must be 10 or greater in order to compose PMs!');
}
Replace with:

Code: Select all

if ($user->data['user_posts'] < 10 )
{
	trigger_error('PM_LOCK');
}
Open language/ar/ucp.php

Find:

Code: Select all

$lang = array_merge($lang, array(
After, add:

Code: Select all

'PM_LOCK'	=> '<strong style="color:#FF0000;">عذراً, لا يمكنك إرسال رسائل خاصة إلا بعد وصول عدد مشاركاتك إلى 10 مشاركات</strong>',
;)
No more spambots for phpBB2 and phpBB3.

User avatar
FaresNB
Registered User
Posts: 271
Joined: Tue May 22, 2007 11:50 am
Location: Syria
Name: Fares Alnaeb
Contact:

Re: {REQ} any hack to ban new user from PM until XX posts ?

Post by FaresNB »

jalaln wrote:Open: includes/ucp/ucp_pm_compose.php

Find:

Code: Select all

if ($user->data['user_posts'] < 10 )
{
trigger_error('Sorry, your postcount must be 10 or greater in order to compose PMs!');
}
Replace with:

Code: Select all

if ($user->data['user_posts'] < 10 )
{
	trigger_error('PM_LOCK');
}
Open language/ar/ucp.php

Find:

Code: Select all

$lang = array_merge($lang, array(
After, add:

Code: Select all

'PM_LOCK'	=> '<strong style="color:#FF0000;">عذراً, لا يمكنك إرسال رسائل خاصة إلا بعد وصول عدد مشاركاتك إلى 10 مشاركات</strong>',
;)
That's soooooooooo great ..... you should post it as a complete MOD :roll:


thank you جلال ;)

jalaln
Registered User
Posts: 1076
Joined: Tue Jul 05, 2005 5:05 am

Re: {REQ} any hack to ban new user from PM until XX posts ?

Post by jalaln »

FaresNB wrote:That's soooooooooo great ..... you should post it as a complete MOD :roll:


thank you جلال ;)
Yes, I think I will make a phpBB3 version of my phpBB2 MOD (Minimum posts to view certain pages).
No more spambots for phpBB2 and phpBB3.

molgan
Registered User
Posts: 86
Joined: Tue Dec 18, 2007 5:41 pm

Re: {REQ} any hack to ban new user from PM until XX posts ?

Post by molgan »

How can I use "user_regdate" instead ?
I would like to check if a user has been a member for more than a year

mtrs
Registered User
Posts: 2049
Joined: Sat Sep 22, 2007 2:39 pm

Re: {REQ} any hack to ban new user from PM until XX posts ?

Post by mtrs »

molgan wrote:How can I use "user_regdate" instead ?
I would like to check if a user has been a member for more than a year
Find

Code: Select all

if ($user->data['user_posts'] < 10 )
{
   trigger_error('PM_LOCK');
}
Replace

Code: Select all

if ( (time() - $user->data['user_regdate']) < 31536000 )
{
   trigger_error('PM_LOCK');
}
I abandoned all of my mods.

molgan
Registered User
Posts: 86
Joined: Tue Dec 18, 2007 5:41 pm

Re: {REQ} any hack to ban new user from PM until XX posts ?

Post by molgan »

[quote="mtrs"][/quote]

Great, thanks !

molgan
Registered User
Posts: 86
Joined: Tue Dec 18, 2007 5:41 pm

Re: {REQ} any hack to ban new user from PM until XX posts ?

Post by molgan »

mtrs wrote:
molgan wrote:How can I use "user_regdate" instead ?
I would like to check if a user has been a member for more than a year
Find

Code: Select all

if ($user->data['user_posts'] < 10 )
{
   trigger_error('PM_LOCK');
}
Replace

Code: Select all

if ( (time() - $user->data['user_regdate']) < 31536000 )
{
   trigger_error('PM_LOCK');
}
How do change this to 1 month, instead of secconds ?
if ( (time() - $user->data['user_regdate']) < 2628000 )

mtrs
Registered User
Posts: 2049
Joined: Sat Sep 22, 2007 2:39 pm

Re: {REQ} any hack to ban new user from PM until XX posts ?

Post by mtrs »

molgan wrote:How do change this to 1 month, instead of secconds ?
if ( (time() - $user->data['user_regdate']) < 2628000 )
1 minute = 60 seconds
60 minutes = 3600 seconds
1 day = 24 x 3600 = 86400 seconds
30 days = 30 x 86400 = 2592000 seconds,
So,

Find

Code: Select all

31536000
Replace with

Code: Select all

2592000
I abandoned all of my mods.

Locked

Return to “[3.0.x] MOD Requests”