Version: 1.00, by James Cridland
Developer Last Online: Mar 2022
Version: 2.2.x
Rating:
Released: 06-08-2002
Last Update: Never
Installs: 19
No support by the author.
Based on an original hack by wluke (included in bira's thread here), which...
- Allows you to place a user under moderation, whereby his posts and threads will be queued until an admin/moderator validates them
...this adds...
- Make all new users moderated automatically
- Allow moderators to see all unmoderated posts
- Enhances control panel to give a better view of posts, and give further information about the user
This is great for stopping people who just want to spam or troll, and monitoring what new users write before the rest of the board sees them.
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
It seems that in your last upload that the initial part of the text file no longer reads as I would expect it should ...
Quote:
if (!$bbuserinfo['posts'] AND $bbuserinfo[usergroupid]!=13) {
$DB_site->query("UPDATE user SET usergroupid=12 WHERE userid='$u'");
} else {
$DB_site->query("UPDATE user SET usergroupid=2 WHERE userid='$u'");
}
-----
...where XX is the new, Under Moderation, user group you've just made.
As you can see, there is no xx in the code as referred to in you comment...
EDIT: forgot to mention ... my Under Moderation usergroupid = 13 ... how should I edit the above section of code to suit my needs?
if (!$bbuserinfo['posts'] AND $bbuserinfo[usergroupid]!=XX) {
$DB_site->query("UPDATE user SET usergroupid=XX WHERE userid='$u'");
} else {
$DB_site->query("UPDATE user SET usergroupid=2 WHERE userid='$u'");
}
This is to add to the text file when I've a moment...
Quote:
DanFlynnUPC: hey r u there?
cridland james: Hi Dan
DanFlynnUPC: you've left a couple things outta the install instructions still
DanFlynnUPC: i worked them out and fixed them on our forum
cridland james: Oh, I'm sorry...
cridland james: Have you posted what they are?
DanFlynnUPC: nope .... i'll tell you now
DanFlynnUPC: let you do the update
DanFlynnUPC: in moderate.php there is a query just before the labels bit ... you gotta get the number of posts a user has made in that query
DanFlynnUPC: that's the 1st problem
DanFlynnUPC: the other prob is that the way your install instructions are, you will never make use of the postbit_unmod template because the unmoderated posts are never taken from the db
DanFlynnUPC: this is what i changed
DanFlynnUPC: in showthread.php
DanFlynnUPC: find
DanFlynnUPC: $getpostids=$DB_site->query("
SELECT post.postid FROM post
WHERE post.threadid='$threadid' AND post.visible=1
ORDER BY dateline $postorder LIMIT ".($limitlower-1).",$perpage
");
DanFlynnUPC: and replace it with
DanFlynnUPC: if (ismoderator($thread['forumid'])) {
$ismod=1;
} else {
$ismod=0;
}
if ($ismod)
{
$getpostids=$DB_site->query("
SELECT post.postid FROM post
WHERE post.threadid='$threadid'
ORDER BY dateline $postorder LIMIT ".($limitlower-1).",$perpage
");
} else {
$getpostids=$DB_site->query("
SELECT post.postid FROM post
WHERE post.threadid='$threadid' AND post.visible=1
ORDER BY dateline $postorder LIMIT ".($limitlower-1).",$perpage
");
}
DanFlynnUPC: did you get all that?
DanFlynnUPC: r u there?
DanFlynnUPC: and you can then simplify the bit in functions.php
DanFlynnUPC: replace everything between
// do posts from ignored users
AND
// ###################### Start gettextareawidth #######################
WITH
if ($post[visible]<1) {
eval("\$retval = \"".gettemplate("postbit_unmod")."\";");
} else if ($ignore[$post[userid]]) {
eval("\$retval = \"".gettemplate("postbit_ignore")."\";");
} else {
eval("\$retval = \"".gettemplate("postbit")."\";");
}
return $retval;
}
DanFlynnUPC: works like a charm
cridland james: I've got all that, Dan, thanks
DanFlynnUPC: great thanx .... hopefully it'll help someone
DanFlynnUPC: cause it's a really nice hack ... I also extended it just a tiny bit to moderate attachments made by ppl in that usergroup also
DanFlynnUPC: cause we've had a few ppl posting porn on our forum
cridland james: Good idea
DanFlynnUPC: btw ... it's worth making a note that the moderation usergroup should not be allowed to edit their posts or they can just wait till the post is approved then make it nasty and it wont get caught