Previous Thread
Next Thread
Print Thread
Rating: 5
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Mod Name / Version: Restrict PMs by Group 1.0 & 2.0

Description: Allows you to restrict (or Allow) Private Messages to a specific user group.

Working Under: UBB.Threads 6.2-6.3-6.4

For Version 6.4 use the 2.0 instructions posted in a reply below!!!

Mod Status: Beta

Any pre-requisites: none

Author(s): JoshPet

Date: 05/12/03

Credits: Eugene & Coloradok5 for requesting it

Files Altered: sendprivate.php, mess_handler.php

New Files: none

Database Altered: none

Info/Instructions: NOTE - I give instructions to use this one of two ways.
To either only allow a specific group to use private messages and the other to only block a specific group from using private messages. Read the directions
carefully. If you wish to switch the way it works, you will need to comment out the "if" line, and uncomment the other one.
<img src="/forum/images/graemlins/wink.gif" alt="" />

Disclaimer: Please backup every file that you intend to modify.
If the modification modifies the database, it's a good idea to backup your database before doing so.

Note: If you modify your UBB.Threads code, you may be giving up your right for "official" support from Infopop.If you need official support, you'll need to restore unmodified files.


Attachments
79874-restrictPMsbyGroup.txt (0 Bytes, 344 downloads)

Last edited by JoshPet; 01/06/2004 7:47 PM.
Sponsored Links
Joined: Jul 2001
Posts: 442
Enthusiast
Enthusiast
Offline
Joined: Jul 2001
Posts: 442
Works awesome.

Joined: May 2002
Posts: 362
Junior Member
Junior Member
Offline
Joined: May 2002
Posts: 362
Josh, I'm trying to implement this hack on a friend's board.... Though, I keep getting:

"Fatal error: Call to a member function on a non-object in /home/breaking/public_html/forums/mess_handler.php on line 158"

I copied/pasted exactly what you have, it's actually even group 5 that I want to only have access to pms... Not sure what's happening though.... Any ideas?

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Hmm....

Might have missed something. In mess_handler, try putting this:

$html = new html;

Before the "if" statements.

Joined: May 2002
Posts: 362
Junior Member
Junior Member
Offline
Joined: May 2002
Posts: 362
Thanks Josh. That worked like a charm!

Sponsored Links
Joined: Jan 2002
Posts: 674
Junior Member
Junior Member
Offline
Joined: Jan 2002
Posts: 674
Great idea was this tried in 6.4 yet?

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Haven't tested - the code tidbits may have changed, but the basic code to check the group etc... should be the same.

Joined: Jan 2002
Posts: 674
Junior Member
Junior Member
Offline
Joined: Jan 2002
Posts: 674
Working good on 6.4 but needed to do some fancy stepping for the private moderation and new coppa stuff. But not to bad with Beyond compare. Of course I didn't read directions and banned everybody from sending private messages on the first try ... doh

Joined: Aug 2002
Posts: 111
Journeyman
Journeyman
Offline
Joined: Aug 2002
Posts: 111
If a usergroup is banned from sending PMs, can they still PM an Admin? I'd like to use this mod, but know that new users (the ones I'd be restricting) often like to reply to the Welcome PM and ask questions.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
[]
--------------------
I miss my Joshie-pie <sigh>
[/]

LOL Thank you - nice to be missed.

If you only applied this to sendprivate.php (then it would prohibit new Private Messages) but they could still reply to PMs that they receive. Although that's not exactly air tight. Beyond that, I'd need to go a bit deeper, as the restriction is done before the script loads.

If you did it after words, they could compose a whole PM, but only allow it to be sent if they are sending it to an Admin. I'd have to play with that a bit.

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
did this get updated for 6.4?


- Allen wavey
- What Drives You?
Joined: Jul 2001
Posts: 442
Enthusiast
Enthusiast
Offline
Joined: Jul 2001
Posts: 442
I am using it in 6.4 , if someone in a non-PM group needs to PM me they can email me or post in the feedback forum.

Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
any major changes to the code?


- Allen wavey
- What Drives You?
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
No, just a tiny bit of difference in regard to the "coppa user" code.

Attached updated instructions for 6.4 to THIS post.
Attachments
104193-restrictPMsbyGroup2.0.txt (0 Bytes, 203 downloads)

Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
muchas gracias


- Allen wavey
- What Drives You?
Joined: Jul 2002
Posts: 79
Power User
Power User
Offline
Joined: Jul 2002
Posts: 79
I was using this invaluable mod in 6.4 and was wondering if there are any changes needed to get it to work in 6.5?

Joined: Aug 2000
Posts: 1,609
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,609
No changes needed all the way through 6.5.1.1. The best way to figure something like that out, is to try it. If you'll look at the instructions, you'll notice the code is all exactly the same.


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
JAISP
JAISP
PA
Posts: 449
Joined: February 2008
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)