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: 25373
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: 25373
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: 25373
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


Top Posters Last 30 Days
AllenAyres 58
Gizmo 25
sirdude 25
Zarzal 17
blaaskaak 10
willing 3
tackaberry 3
Who's Online
0 Registered (), 32 Guests and 7 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
Auto repair table
by blaaskaak
Yesterday at 06:16 PM
User Authentication Class
by swebs
07/18/08 06:19 PM
[7.3.x] ubb.links
by AllenAyres
07/18/08 05:09 PM
Team UBBDev Rides Again!
by AllenAyres
07/18/08 05:08 PM
ubb.social
by willing
07/17/08 06:29 PM
Multiple Identity Detector
by Detangler
07/16/08 05:59 AM
how do I change textcolor in shoutbox
by sirdude
07/14/08 05:14 PM
New Mods
[7.3+] CustomTag - Photobucket Slideshow
by Gizmo
07/12/08 11:14 AM
[7.3.x] Copy forum permissions
by blaaskaak
07/09/08 02:37 PM
Protect users emails
by Basil Fawlty
06/29/08 08:44 AM
[7.3.x] Scheduled board close for backup
by blaaskaak
06/26/08 04:01 AM
[7.3+] CustomTag - Audo Embedding
by Gizmo
06/24/08 07:52 PM
Newest Members
Stanley, NazzaN, mmem700, Tyler, nunny
13309 Registered Users

 

 

 
fusionbb message board php hacks