Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Pre-screen / moderate users' posts Details »»
Pre-screen / moderate users' posts
Version: 1.00, by James Cridland James Cridland is offline
Developer Last Online: Mar 2022 Show Printable Version Email this Page

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.

Comments
  #12  
Old 01-04-2003, 12:36 PM
Dan_UPC Dan_UPC is offline
 
Join Date: Dec 2002
Posts: 49
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hi james,

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?
Reply With Quote
  #13  
Old 03-03-2003, 06:01 AM
James Cridland James Cridland is offline
 
Join Date: Nov 2001
Location: London, UK
Posts: 121
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So, I screwed up there.

The correct code should read...
PHP Code:
    // activate account

    
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'");
    } 
Reply With Quote
  #14  
Old 03-03-2003, 06:05 AM
James Cridland James Cridland is offline
 
Join Date: Nov 2001
Location: London, UK
Posts: 121
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

...and the missing bit of moderate.php that I missed out is, I think, this...

Search for "makelabelcode" and replace the bits that follow with this...

PHP Code:
    makelabelcode("<b>Posted by:</b>","<a href=\"user.php?s=$session[sessionhash]&action=viewuser&userid=$user[userid]\">$user[username]</a> ($user[posts] posts) - [<a href=\"XXXPATHTOYOURADMINDIRECTORYXXX/user.php?s=$session[sessionhash]&action=edit&userid=$user[userid]\" target=_blank>un-moderate</a>] (in new window)");
    
makelabelcode("<b>Located in:</b>","<a href=\"XXXPATHTOYOURFORUMSXXX/forumdisplay?s=$session[sessionhash]&forumid=$thread[forumid]\">$thread[forumtitle]</a>");
    
makeinputcode("<font color='red'>New thread</font>:","title[$thread[threadid]]",$thread[title]);
    
maketextareacode("Message:","threadpagetext[$thread[threadid]]",$post[pagetext],15,80);
    
makeyesnocode("Validate:","validatethread[$thread[threadid]]",1);
    
makeyesnocode("Delete:","deletethread[$thread[threadid]]",0);
    
makeinputcode("Thread notes:","notes[$thread[threadid]]",$thread[notes],50);
    
maketableheader("&nbsp;","",0); 
Reply With Quote
  #15  
Old 03-03-2003, 03:51 PM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Welcome back James. Nice site btw and thanks for the fix

- miSt
Reply With Quote
  #16  
Old 03-07-2003, 02:42 PM
James Cridland James Cridland is offline
 
Join Date: Nov 2001
Location: London, UK
Posts: 121
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #17  
Old 03-07-2003, 02:44 PM
James Cridland James Cridland is offline
 
Join Date: Nov 2001
Location: London, UK
Posts: 121
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In case you're wondering, I'm waiting to evaluate v3 before I work on more hacks, hence my quietness here.

I may, or may not, be using vBulletin v3 - I might even (gasp!) write my own.
Reply With Quote
  #18  
Old 04-11-2003, 02:52 AM
Bhollywood Bhollywood is offline
 
Join Date: Mar 2003
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I wanted to find out if anyone has used this on 2.3.0 successfully. I would love to try it out if its ok to use on 2.3.0

Thanks
Reply With Quote
  #19  
Old 04-19-2003, 08:42 PM
Yappi Yappi is offline
 
Join Date: Aug 2002
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm interested in whether it works on 2.3.0 also. I'm updating to the latest version and would like to install this hack.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:26 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04373 seconds
  • Memory Usage 2,310KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (8)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete