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

   Enabling PM for Established Members to Del.icio.us Add to del.icio.us
  Digg Enabling PM for Established Members Digg it
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: 25408
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: 25408
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: 25408
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 18
Gizmo 12
sirdude 6
GEN 3
tackaberry 2
Philipp 2
willing 2
Who's Online
0 Registered (), 36 Guests and 9 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
Team UBBDev Rides Again!
by Gizmo
08/28/08 11:45 PM
Multiple Identity Detector
by MattUK
08/28/08 04:10 PM
[7.3.x] ubb.links
by AllenAyres
08/26/08 09:57 AM
Installing FlashChat with 7.3
by Gizmo
08/23/08 05:36 AM
[7.2.1] - Naked shoutbox
by Iann128
08/22/08 07:27 PM
Nice Ajax Chat
by M4D
08/21/08 10:02 PM
51-card NVIDIA folding rig cranks out 265,200 ppd
by AllenAyres
08/13/08 10:10 PM
New Mods
Installing FlashChat with 7.3
by Paug
08/23/08 12:14 AM
[7.x] AddThis - Social Networking
by Gizmo
08/01/08 01:30 AM
[7.3.x] ubb.links
by AllenAyres
06/20/08 11:50 PM
[7.3] Dissallow quotes more then 3 levels deep
by blaaskaak
06/09/08 09:01 AM
[7.2.1] - Naked shoutbox
by sirdude
08/17/07 10:36 PM
Newest Members
welcomeback1, Paug, Tim Keating, anscers, Murphdog
13324 Registered Users

 

 

 
fusionbb message board php hacks