vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   3 Admin Tools: Remove Redirect, Edit Posts, & Moderate User (https://vborg.vbsupport.ru/showthread.php?t=14075)

Jawelin 02-14-2002 09:23 PM

Excuse.
Is it possible to create a Warning group and, instead of actually moderating user posts, simply to be notified via email of their new posts ?
(just like an automatic subscription to their threads)

??

Thanks

ladyfyre 02-15-2002 05:54 PM

does it work with 2.2.2???

James Cridland 02-18-2002 08:57 PM

Quote:

Originally posted by Joshua Clinard
This looks like a cool hack. I'm not installing it until 2.2.2 is out. Can someone tell me if mods can add a user to the moderation que? Also, do you have to create a moderation usergroup for this to work?
Adding a user to moderation is easy - just change their user type to "Moderated User" or whatever you've set as your category. But yes, you do have to create a usergroup for it.

James Cridland 02-21-2002 08:54 PM

If you've used my addendum to this hack earlier (to automatically make new users moderated), you might like a rather more useful-looking moderation queue screen.

This version shows how many posts a user has made, how many replies the existing thread currently has, and has an easy "de-moderate this user" link which takes you to their admin member profile.

Instructions are:

In /mod/moderate.php...

find maketableheader("Posts awaiting validation");

replace this block (down to restarttable();) with:

PHP Code:

maketableheader("Posts awaiting validation");

  
$posts=$DB_site->query("SELECT postid,pagetext,post.dateline,userid,thread.title as title,thread.forumid as forumid,forum.title as forumtitle,thread.replycount as replycount FROM post,thread,forum WHERE thread.threadid=post.threadid AND thread.forumid=forum.forumid AND post.visible=0 AND (1=0 $sql) ORDER BY dateline");
  while (
$post=$DB_site->fetch_array($posts)) {

    
$user=$DB_site->query_first("SELECT userid,username,posts FROM user WHERE userid='$post[userid]'");
    
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=\"http://forums.mediauk.com/admin/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=\"/forumdisplay?s=$session[sessionhash]&forumid=$post[forumid]\">$post[forumtitle]</a>");
    
makeinputcode("Thread: ($post[replycount] replies)","title[$thread[threadid]]",$post[title]);
    
maketextareacode("Message:","postpagetext[$post[postid]]",$post[pagetext],4,80);
    
makeyesnocode("Validate:","validatepost[$post[postid]]",1);
    
makeyesnocode("Delete:","deletepost[$post[postid]]",0);
    
maketableheader("&nbsp;","",0);

    
$done=1;
  }
  
restarttable(); 

Tested with 2.2.1 - not 2.2.2.

Jawelin 02-24-2002 01:21 PM

Quote:

Originally posted by bira
Eva it's from the mass-prune-redirects hack:

That's cos there are two "control panels" -- one in admin and one in mod :)

Excuse: should be necessary to modify the index.php to link the thread.php?action=prunered or that function is included elsewhere in the existing code ?
I didn't found.

Thanks.


P.S.: I'll push up even my question on Post #51 about a slight modification to 'moderate user'. Simply, instead of setting his posts 'visible=0', I would that post be reported to the webmaster with an email...
I tried following a path similar to 'email this page' (i.e. sendtofriend.php) but didn't managed to make the process hidden.
Simply I would create a new template with the thread link and the userid moderated posting here and send everything via mail() to the webmaster.
Someone could give me any hint about ?

Thanks for both answers.
Bye

James Cridland 02-24-2002 02:59 PM

Incidentally, I've furthered this hack to also add "moderators can see unmoderated messages", and an enhanced control panel moderation section.

I've not documented this, but if anyone wants me to have a go, I'll certainly add it to The Big List.

heidit 03-07-2002 04:39 PM

Can someone confirm that it works on 2.2.2?

ZiRu$ 03-25-2002 09:03 PM

very, very nice......

will add......

Harvey 03-26-2002 01:00 PM

Hi,

great hack. But I only installed massprune redirects for admins.

There is one problem: If there are to much redirects to delete I get a time out and the script terminates.

My suggestion: Because I can't find any table that points to a redirect-thread and imho it's not nessesary to update counters delete all threads at once.

I have not tested, but the following should work:
in admin-thread-php-addition replace
PHP Code:

  while ($thread=$DB_site->fetch_array($threads)) {
    
deletethread($thread[threadid],0);
  } 

by
PHP Code:

  $threadlist "";
  while (
$thread=$DB_site->fetch_array($threads)) {
    if (
$threadlist == "") {
      
$threadlist $thread[threadid];
    } else {
      
$threadlist .= "," $thread[threadid];
    }
  }
  if (
$threadlist != "") {
    
$DB_site->query("DELETE FROM thread WHERE threadid in (".$threadlist.")");
  } 

and
PHP Code:

  while (list($key,$val)=each($delete)) {
    if (
$val==1) {
      
deletethread($key,0);
    }
  } 

by
PHP Code:

  $threadlist "";
  while (list(
$key,$val)=each($delete)) {
    if (
$val==1) {
      if (
$threadlist == "") {
        
$threadlist $key;
      } else {
        
$threadlist .= "," $key;
      }
    }
  }
  if (
$threadlist != "") {
    
$DB_site->query("DELETE FROM thread WHERE threadid in (".$threadlist.")");
  } 


admiralapril 03-26-2002 08:20 PM

Quote:

Originally posted by babak
i just installed the
install-mderate-user-posts.txt
hack alone and put a user into
the moderated group. but when
this user logs in and press the "new thread"
button, he gets the message-page:

"You are not logged in or you do not have permission to access this page. This could be due to one of several reasons:
1
2
3
..."

what is the reason?

I am getting the same error after installing the user moderated hack. I'm using 2.2.3. Any ideas?? :(


All times are GMT. The time now is 11:07 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01738 seconds
  • Memory Usage 1,776KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete