Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Feb 2001
Posts: 16
Newbie
Newbie
Offline
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!

Sponsored Links
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 smile


- Allen wavey
- What Drives 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 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?
Joined: Feb 2001
Posts: 16
Newbie
Newbie
Offline
Joined: Feb 2001
Posts: 16
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.

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 smile


- Allen wavey
- What Drives You?
Sponsored Links

Link Copied to Clipboard
Donate Today!
Donate via PayPal

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.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Bill B
Bill B
Issaquah, WA
Posts: 87
Joined: December 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)