php forum
php mysql forum
php mysql smarty
 
Topic Options
#311387 - 08/31/06 08:27 AM Enabling PM for Established Members
aalhait Offline
Junior Member

Registered: 02/18/01
Posts: 15
Does anybody have a hack or mod to allow only existing Members (Let's say with post count > 30 for example) to use PM, otherwise disallow?

I had that hack in my UBB Classic before since I understand the code, but I just upgraded to UBB Threads recently, and I'm slow to understand the code still...

This could cut on what I call the selfish users who want to solve their problems, but do not wish to share it!

Top
#311388 - 08/31/06 01:09 PM Re: Enabling PM for Established Members [Re: aalhait]
AllenAyres Administrator Offline
I type Like navaho

Registered: 03/10/00
Posts: 25448
Loc: Texas
hmm.. I had a client with that. Let me see if I can dig up the code for you smile
_________________________
- Allen wavey
- What Drives You?

Top
#311395 - 09/01/06 05:28 PM Re: Enabling PM for Established Members [Re: AllenAyres]
AllenAyres Administrator Offline
I type Like navaho

Registered: 03/10/00
Posts: 25448
Loc: Texas


OK, the code I had wasn't like this, so I wrote it. Here you go, only minimally tested smile I have it set for 50 posts, you'll need to adjust that to whatever number you like.


mess_handler.php

Find:

Php Code:

$user = $userob -> authenticate("U_Groups,U_EReplies,U_TextCols,U_TextRows,U_Preview");
$Username = $user['U_Username'];
$Password = $user['U_Password'];
 

Replace with:
Php Code:

$user = $userob -> authenticate("U_Groups,U_EReplies,U_TextCols,U_TextRows,U_Preview,U_Totalposts");
$Username = $user['U_Username'];
$Password = $user['U_Password'];

	if ($user['U_Totalposts'] < "50" ) {
		$html = new html;
		$html -> not_right("You need 50 posts in the forum to send a private message,",$Cat);
	}
 





send_message.php


Find:
Php Code:

$user = $userob -> authenticate("U_Language,U_TextCols,U_TextRows");
$Username = $user['U_Username'];
 




Replace with:
Php Code:

$user = $userob -> authenticate("U_Language,U_TextCols,U_TextRows,U_Totalposts");
$Username = $user['U_Username'];

	if ($user['U_Totalposts'] < "50" ) {
		$html = new html;
		$html -> not_right("You need 50 posts in the forum to send a private message,",$Cat);
	}
 



send_private.php

Find:
Php Code:

$user = $userob -> authenticate("U_TextCols,U_TextRows,U_Preview,U_CoppaUser");
$Username =  $user['U_Username'];
 


Replace with:
Php Code:

$user = $userob -> authenticate("U_TextCols,U_TextRows,U_Preview,U_CoppaUser,U_Totalposts");
$Username =  $user['U_Username'];

	if ($user['U_Totalposts'] < "50" ) {
		$html = new html;
		$html -> not_right("You need 50 posts in the forum to send a private message,",$Cat);
	}
 

_________________________
- Allen wavey
- What Drives You?

Top
#311482 - 09/12/06 10:26 AM Re: Enabling PM for Established Members [Re: AllenAyres]
aalhait Offline
Junior Member

Registered: 02/18/01
Posts: 15
Allen, Thanks a bunch!

I just added it smile (It took me a while to do it, but it works great)

I think only through hacking the board will I learn how to do this well smile

That's how I learned UBB Classic and Actually picked up Perl 8 years ago smile

Thanks again.

Top
#311488 - 09/12/06 05:18 PM Re: Enabling PM for Established Members [Re: aalhait]
AllenAyres Administrator Offline
I type Like navaho

Registered: 03/10/00
Posts: 25448
Loc: Texas
You are welcome, it does take some time to learn. I'm glad it worked for you smile
_________________________
- Allen wavey
- What Drives You?

Top


Who's Online
1 registered (arentzen), 26 Guests and 8 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
Forum 'Trader Ratings'.
by blaaskaak
11/20/08 08:27 AM
Problems reading a lot of old posts here
by Ruben Rocha
11/18/08 04:33 PM
PhotoPost BB Code Popup
by Iann128
11/15/08 01:24 PM
Customization needed
by Gizmo
11/12/08 12:28 PM
Team UBBDev Rides Again!
by AllenAyres
11/11/08 02:16 PM
Active Topics.
by AllenAyres
11/11/08 02:13 PM
Looking for a simple upload script
by AllenAyres
11/11/08 02:12 PM
New Mods
Forum 'Trader Ratings'.
by McLemore
11/19/08 02:14 PM
[7.4] Keep log of custom title changes
by blaaskaak
10/27/08 07:51 AM
User Authentication Class
by
01/19/07 02:59 PM
Multiple Identity Detector
by
12/30/06 06:39 PM
PhotoPost BB Code Popup
by
11/06/06 05:43 PM
Newest Members
nick1, Begbie, cenk, MATTO, DougMMcts
13362 Registered Users
Top Posters
AllenAyres 25448
JoshPet 11330
Rick 8372
LK 7396
Lord Dexter 6503
Greg Hard 5533
Charles Capps 5438

 

 

 
fusionbb message board php hacks