Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
#228138 11/22/2002 2:38 AM
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Mod Name / Version - Private Moderation 1.3
     Version 1.1 blocks the users ability to edit their profile if they are in private moderation. 1/23/03
     Version 1.2 offers the option to block the sending of Private Messages. 1/28/03
     Version 1.3 adds in the functionality to be able to search and find users who are in private moderation - thanks Raconteur

Description - This allows you to put a user into "Private Moderation" where all their posts will require approval from an admin or mod. An alternative to banning...allowing their good posts to get through. Almost like a probation.

Working Under - UBB.Threads 6.2, 6.2.1

Pre-requisites - none

Author - JoshPet - www.joshuapettit.com
     for discussions and bug reports come to www.ubbdev.com

Credits - Raconteur

Files Altered - addpost.php, ubbthreads.php, /admin/selectoption.php, admin/selectusers.php, admin/showusers.php, includes/selectusers.js

Database Altered - 1 field added to the w3t_Users table (U_PrivateModeration) with a yes/no value.

New Files - /admin/moderateuser.php, /admin/unmoderateuser.php

Any other info - Only Admins can enter or remove a user from private moderation. Edit their profile, and you'll see the option right below the "ban this user" option. Remove them from moderation the same way. The User and All Admins/Mods receive a PM when they are added or removed from Moderation.

Backup your files and database before doing any modifing of you code.

Haven't done much testing yet myself. But all seems to be OK with initial testing.
Attachments
60856-PrivateModeration1.3.zip (0 Bytes, 334 downloads)

Sponsored Links
Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
Great work, this will be a popular mod I should think!

Joined: Aug 2002
Posts: 1,191
Kahuna
Kahuna
Joined: Aug 2002
Posts: 1,191
Thanks Josh!

Nice one!

Warm regards

Nikos


Nikos
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
There are some tweaks to this mod, that I could see useful, and would write up if anyone was interested.

As an alternative to approving user registrations.. you could set it up that New Users are in the Private Moderation for their first X posts...or until the Admin "approves" them for live posting.... Let people start there and earn their trust.

Joined: Feb 2002
Posts: 295
Member
Member
Offline
Joined: Feb 2002
Posts: 295
Hi,

Great mod.

I do have a request though

Could this be modified to work on a forum by forum basis and then allowing not just the Admin, but also the moderators to approve posts?

Reason for asking is that I have one area on my board in which tensions seem to flare up at times, yet the same poster that would need moderating in there might be well behaved in other areas.

Sanuk!

Sponsored Links
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Moderators are allowed to approve posts in their forum. Currently only admins can put a user in, or take a user out of private moderation. But anyone who can normally approve posts can approve them.

This isn't fancy... but if you wanted it to work in a specific board only....

Where you normally add this in addpost.php:
code:

// -------------------------
// Private Moderation - by JoshPet
if ($user['U_PrivateModeration'] == "yes") {
$Approved = "no";
}



Try changing it to this:
code:

// -------------------------
// Private Moderation - by JoshPet
if (($user['U_PrivateModeration'] == "yes") && ($Board =="keywordofboardhere")) {
$Approved = "no";
}



I think that'll do it.

Joined: Feb 2002
Posts: 295
Member
Member
Offline
Joined: Feb 2002
Posts: 295
Hi,

Thanks. Will give this a go.

Sanuk!

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Updated the main post to version 1.1

Version 1.1 will block a user in Private Moderation from editing their profile.

Joined: Jul 2002
Posts: 79
Power User
Power User
Offline
Joined: Jul 2002
Posts: 79
This is an awesome idea for a mod!!!
Does anyone know if it works with 6.2?

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Ah yes... sorry.

I forgot to update the text in the first post to indicate that this is for 6.2 and 6.2.1.

Enjoy!

Sponsored Links
Joined: Jul 2002
Posts: 79
Power User
Power User
Offline
Joined: Jul 2002
Posts: 79
Thanks - great news!!!

Joined: Jul 2002
Posts: 79
Power User
Power User
Offline
Joined: Jul 2002
Posts: 79
Ok - I think I have a little problem
Made all the edits required and can see the new link when I edit a user.
The problem is that I don't think the username is getting passed on properly. I tried to put a user in Private Moderation and got the following PM:

"Webmaster has put into Private Moderation. All their posts will require approval."

Username missing I assume? Any help or suggestions would be great!

p.s. forgot to say that if you go back to edit that user again the option to put them into moderation is still there. It doesn't say click to remove them as I assume it should?

Last edited by pootlecat; 01/25/2003 10:49 PM.
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Hmmmm.....

In the moderateuser and unmoderateuser.php files.... try adding this below the require main.inc.php line near the top:

Code
<br />// -------------<br />// Get the input<br />   $Cat  = get_input("Cat","get");<br />   $User	= get_input("User","get");<br />


See if that solves it.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Let me know if it does, and I'll update the files.

Joined: Jul 2002
Posts: 79
Power User
Power User
Offline
Joined: Jul 2002
Posts: 79
Thanks Josh - it is working perfectly now

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
OK - cool.... it has to do with Register Globals.

The fix I posted for the contact form will fix you too.

I will update the Zip on the first post.

Joined: Apr 2002
Posts: 56
Power User
Power User
Joined: Apr 2002
Posts: 56
Is it possible to disable an 'on probation' members ability to pm during this period?

Joined: Jul 2002
Posts: 79
Power User
Power User
Offline
Joined: Jul 2002
Posts: 79
That is a really good question!
I am also interested to know if it would be possible to stop them posting on the Shout Box (though i am probably asking too much there lol)

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
I will post some instructions to do that tonight.

Hmm.. have to check on the shoutbox. Not 100% sure how that works.... but I will check it out.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
I haven't test this yet... .but this should disable the Private Message ability (sending) if they are in Private Moderation.

Please let me know how it works.
Code
 <br />OPTIONAL STEPS - To restrict the Sending of Private Messages: <br /> <br />########################## <br />## Open sendprivate.php ## <br />########################## <br /> <br />######################################## <br /># Find this: <br /># <br /> <br />   $user = $userob -> authenticate("U_TextCols,U_TextRows,U_Preview"); <br /> <br /> <br /> <br /># <br /># Change to this: <br /># <br /> <br />   $user = $userob -> authenticate("U_TextCols,U_TextRows,U_Preview,U_PrivateModeration"); <br /> <br />	// ----------------------------------- <br />	// Block if they are in Private Moderation <br />      if ($user['U_PrivateModeration'] == "yes") { <br />		   $html = new html; <br />	       $html -> not_right('You cannot send Private Messages while you are in Private Moderation.',$Cat); <br />	  } <br /> <br /> <br /> <br />########################### <br />## Open mess_handler.php ## <br />########################### <br /> <br />######################################## <br /># Find this: <br /># <br /> <br />   $user = $userob -> authenticate("U_Groups,U_EReplies,U_TextCols,U_TextRows,U_Preview"); <br />   $Username = $user['U_Username']; <br />   $Password = $user['U_Password']; <br /> <br /> <br /># <br /># Change to this: <br /># <br /> <br />   $user = $userob -> authenticate("U_Groups,U_EReplies,U_TextCols,U_TextRows,U_Preview,U_PrivateModeration"); <br />   $Username = $user['U_Username']; <br />   $Password = $user['U_Password']; <br /> <br />	// ----------------------------------- <br />	// Block if they are in Private Moderation <br />      if ($user['U_PrivateModeration'] == "yes") { <br />		   $html = new html; <br />	       $html -> not_right('You cannot send Private Messages while you are in Private Moderation.',$Cat); <br />	  } <br />

Last edited by JoshPet; 01/28/2003 2:25 PM.
Joined: Jul 2002
Posts: 79
Power User
Power User
Offline
Joined: Jul 2002
Posts: 79
Hi Josh

The sendprivate.php part works perfectly but not the mess_handler.php bit.

I get the following error message:

"SQL ERROR: Tue, Jan 28 2003 12:11:45 -0700 Database error only visible to forum administrators

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/sites/site2/web/neohelp/mysql.inc.php on line 130"

Thanks

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Ah I made a typo

U_PrivateModeraton

Should be:

U_PrivateModeration



It was late. I need sleep.

I will fix my post above.

Joined: Jul 2002
Posts: 79
Power User
Power User
Offline
Joined: Jul 2002
Posts: 79
Thanks lol - should have spotted that myself

Joined: Aug 2002
Posts: 218
Member
Member
Offline
Joined: Aug 2002
Posts: 218
One more question Josh.

I added this hack and its working fine but how do I know as admin that a user has posted a new thread which needs to be approved?

In the adminmenu I see it only If I choose - APPROVE POSTS and then the right forum. But how to know?

Kind regards...

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
If you are using "Full new post tracking" in your config file... then on the main index, you'll see a number of posts with a N/A (for Not Approved) next to it. Like this:

(3 N/A) would be 3 non approved posts.

Also.... the unapproved posts will have (N/A) in the title.

You can also approve them by clicking edit next to the post.

Joined: Oct 2000
Posts: 238
Enthusiast
Enthusiast
Offline
Joined: Oct 2000
Posts: 238
Josh--

Would this work with 5.4.4php?

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Probably not. As it's based on user numbers..... and 5.4.4 was username based.

You might try the version that's posted somewhere here for the 6.0 series. But I'm not too familiar with that early a version anymore to know if it would work.

Joined: Oct 2000
Posts: 238
Enthusiast
Enthusiast
Offline
Joined: Oct 2000
Posts: 238
Thanks, Josh!

Joined: Feb 2003
Posts: 174
Member
Member
Joined: Feb 2003
Posts: 174
Hey, Just installed this hack and get the following error when trying to put a user in moderation:

Parse error: parse error in /var/www/vodatones.com/html/ubb/admin/moderateuser.php on line 28

Also there's a file called ".DS_Store" in the zip file. There's no referance to this file in the instructions, what do I do with it? Is this whats causing the problem?

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Don't know what the DS_Store file is... perhaps it was somethign your systm created when you unzipped?

Don't know about the error either. That's right at the begining of the code. Make sure that you uploaded the scripts in ASCII mode....otherwise they'll get corrupted.

Joined: Feb 2003
Posts: 174
Member
Member
Joined: Feb 2003
Posts: 174
Great, lol
Just re-uploaded the files and it's still happening. I have cuteFTP in auto detect mode for uploading which has NEVER cuased a problem si it cnt be that.
Any chance you can have a look? your admin on my board and also have FTP access.
I'd appreciate it.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Reuploaded in text (ASCII) mode and it works fine. Best to use ASCII or TEXT rather than automatic when uploading scripts to prevent corruption.

Joined: Feb 2003
Posts: 174
Member
Member
Joined: Feb 2003
Posts: 174
Ok thanks very much....I'll send you that cape as soon as paypal do deliveries lol

Thats a first though, i've NEVER had to do that before.

Cheers m8, once again lightning support

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
OR - since you had that wierd file in the zip... I wonder if something got corrupt either during download from here.... or during uncompression on your end. Anything is possible.... but the parse error was at the very first line of code in the file... so most likely the file that was there had some bizarre characters in it.

Joined: Feb 2003
Posts: 174
Member
Member
Joined: Feb 2003
Posts: 174
yea weird ehhh, thanks though

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Updated to version 1.3.

Version 1.3 adds the functionality to be able to search and find users who are in private moderation. Thanks to Raconteur for this addition.

Joined: Mar 2002
Posts: 305
Enthusiast
Enthusiast
Offline
Joined: Mar 2002
Posts: 305
[]Don't know what the DS_Store file is... [/]

I get this in every one of your zips Josh. Even the stylesheet zips. I don't get them in anything else though. I just ignore it. Everything else has been fine, just an extra little file.


[:"red"]Lisa[/]
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Maybe it's because I zip them on my Mac?

Joined: Mar 2002
Posts: 305
Enthusiast
Enthusiast
Offline
Joined: Mar 2002
Posts: 305
It's possible - but they didn't used to do it. I only noticed the new file within the last couple weeks or so. When I try to view it, it's obviously not something that can be viewed with just a text editor. I try to view it in WinRAR and I can make out a few words, but the rest is just "|" and a few other characters. The words I can make out are always relevant to whatever the hack is, so it's not just an odd file that is added on.


[:"red"]Lisa[/]
Joined: Jan 2002
Posts: 674
Junior Member
Junior Member
Offline
Joined: Jan 2002
Posts: 674
Josh got a list of what changed in the upgrade? Just broke out beyond compare and can see its all on the end of the post. Off to upgrade

Last edited by Smilesforu; 02/26/2003 4:26 AM.
Page 1 of 2 1 2

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
isaac
isaac
California
Posts: 1,157
Joined: July 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
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)