|
Joined: Feb 2001
Posts: 16
Newbie
|
Newbie
Joined: Feb 2001
Posts: 16 |
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!
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
hmm.. I had a client with that. Let me see if I can dig up the code for you 
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
OK, the code I had wasn't like this, so I wrote it. Here you go, only minimally tested  I have it set for 50 posts, you'll need to adjust that to whatever number you like. mess_handler.phpFind: $user = $userob -> authenticate("U_Groups,U_EReplies,U_TextCols,U_TextRows,U_Preview"); $Username = $user['U_Username']; $Password = $user['U_Password'];
Replace with: $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.phpFind: $user = $userob -> authenticate("U_Language,U_TextCols,U_TextRows"); $Username = $user['U_Username'];
Replace with: $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.phpFind: $user = $userob -> authenticate("U_TextCols,U_TextRows,U_Preview,U_CoppaUser"); $Username = $user['U_Username'];
Replace with: $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); }
|
|
|
|
Joined: Feb 2001
Posts: 16
Newbie
|
Newbie
Joined: Feb 2001
Posts: 16 |
Allen, Thanks a bunch! I just added it  (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  That's how I learned UBB Classic and Actually picked up Perl 8 years ago  Thanks again.
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
You are welcome, it does take some time to learn. I'm glad it worked for you 
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 1,157
Joined: July 2001
|
|
Forums63
Topics37,575
Posts293,931
Members13,823
|
Most Online6,139 Sep 21st, 2024
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|