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)

trainer 12-07-2001 06:01 PM

Quote:

Originally posted by julius
To prevent a user register himself only to spam throw emails and messages to other users, it would be useful to put one more option in the usergroup:

Email Permissions:

Can Use Send Email to Other Members? yes ---- no


When you're shure that the new member has written on the forum, you can switch him to the group with all permissions enabled.


yes that option to allow members to email using the bb system would be great

also does this work with 2.2.1 ??? anyone tried it

Tommy Boy 12-07-2001 08:45 PM

Yeah, I installed it on 2.2.1. The instructions do not always match, but if you know PHP, you should be fine. It is working smoothly for me.

James Cridland 12-08-2001 06:09 PM

Me too, I think "moderate users" is great.

And now, an extra bit of code.

To make posts from all new users to be "under moderation", you can do the following...

---
Open register.php
Search for the following
// activate account
$DB_site->query("UPDATE user SET usergroupid=2 WHERE userid='$u'");


Replace the usergroupid (2) with the new, Under Moderation, user group you've just made.

You might also wish to replace your redirect_postthanks template to let users know that "your post may not appear immediately".
---

You're free to add this to the documentation of the main hack.

James Cridland 12-12-2001 04:47 PM

Note that the above hack places current users onto moderation if they change their e-mail address. I don't think there's a way round it, to be honest, and I'll not spend much time trying.

FWC 12-12-2001 05:47 PM

Quote:

Originally posted by James Cridland
Note that the above hack places current users onto moderation if they change their e-mail address. I don't think there's a way round it, to be honest, and I'll not spend much time trying.
Intersting, that hasn't happened to me.

James Cridland 12-12-2001 07:52 PM

Ah, of course. Let me re-write that...

Note that the above hack places current users onto moderation if they change their e-mail address and you have e-mail verification on. I don't think there's a way round it, to be honest, and I'll not spend much time trying.

Well spotted! :)

Martz 12-16-2001 09:50 PM

Sorry to bump this, but does the "Moderated User" part of this hack work with 2.2.0 or 2.2.1 - does anyone know? :)

Thanks

FWC 12-16-2001 10:14 PM

Quote:

Originally posted by Martz
Sorry to bump this, but does the "Moderated User" part of this hack work with 2.2.0 or 2.2.1 - does anyone know? :)

Thanks

Yes, it does. I'm using it on 2.2.1.

Joshua Clinard 01-22-2002 05:28 AM

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?

Joshua Clinard 01-25-2002 05:46 AM

*Bump*

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?? :(

dnd 03-27-2002 01:46 AM

Quote:

Originally posted by admiralapril


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?? :(

any update ??????

LouChipher 05-01-2002 02:34 PM

Quote:

Originally posted by bira
Fourth Admin Tool added at Eva2000's request :D

Prune Redirects in Moderators CP

i'm looking for this hack.. where can i find it, somebody an idea?

dkilburn 05-04-2002 12:13 AM

I just installed the moderate users part of this hack on version 2.2.1 . I then created a new user and put him in the moderated group. When I tried to post a message to the board as this user, I got the usual "if admin has chosen to moderate..." message. So far so good.

Now where do I go as admin to see the posts that need approval? In the control panel home page it shows how many new members are awaiting moderation, but I don't see anywhere to find messages that need moderation.

Thanks!!

FWC 05-04-2002 05:50 AM

Quote:

Originally posted by dkilburn
Now where do I go as admin to see the posts that need approval? In the control panel home page it shows how many new members are awaiting moderation, but I don't see anywhere to find messages that need moderation.

In the left column of the Admin CP there is a header for Moderation and New Posts is under it. You can also moderate new messages from the Moderators CP.

dkilburn 05-04-2002 06:00 AM

I'm using version 2.0.3 and I don't see that option. I'm waiting to upgrade until my classes are over in 3 weeks. Is there something I can hack into the code for the control panel to moderate the messages?

FWC 05-04-2002 07:03 AM

Quote:

Originally posted by dkilburn
I'm using version 2.0.3 and I don't see that option. I'm waiting to upgrade until my classes are over in 3 weeks. Is there something I can hack into the code for the control panel to moderate the messages?
I think you can add this in admin/index.php:
PHP Code:

<tr><td>
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<?php maketableheader("Moderate New Posts"); ?>
</table>
<a href="../mod/moderate.php?s=<?php echo $session[sessionhash]; ?>&action=posts"> Moderate New Posts </a><br>
<a href="../mod/moderate.php?s=<?php echo $session[sessionhash]; ?>&action=attachments"> Moderate New Attachments </a>
</td></tr>

Or, you can always use the Mod CP.

dkilburn 05-04-2002 12:17 PM

Perfect! Thank you :cool:

FWC 05-04-2002 06:46 PM

You're welcome. :)

dkilburn 05-05-2002 03:10 PM

Uh oh, I just went to moderate several messages and got the following error:

Fatal error: Call to undefined function: sendnotification() in /home/kilburn/public_html/forums/mod/moderate.php on line 128

I don't have a forum/mod/moderate.php file in this version. It appears that the one message I approved went through, and the ones I didn't approve did not, so things seem to be working. Is the mod directory in the newer version of vBulletin or is it referring to a different hack that I don't have installed?

FWC 05-05-2002 05:08 PM

Quote:

Originally posted by dkilburn
I don't have a forum/mod/moderate.php file in this version. It appears that the one message I approved went through, and the ones I didn't approve did not, so things seem to be working. Is the mod directory in the newer version of vBulletin or is it referring to a different hack that I don't have installed?
:confused: You should have a forum/mod/moderate.php file. Its part of the standard vB 2.0.3 release.

dkilburn 05-05-2002 05:21 PM

:knockedout: I was looking at my local copy and not the server copy. Apparently I didn't have all the files locally. Anyway, I DO have the mod folder, and here is what is shown around line 128:

PHP Code:

          // send notification
          
if (!$notified["$thread[threadid]"]) {
            
$message $postpagetext[$key];
            
sendnotification($thread['threadid'], $thread['userid'], $key);
            
$notified["$thread[threadid]"] = 1;
          } 


FWC 05-05-2002 06:06 PM

That's weird. sendnotification is defined in admin/functions.php. I've never gotten that error.

Dark Shogun 08-19-2002 03:12 PM

I have 2.2.6. and am trying to remove the redirects. This is the file I am working with now: install-massprune-redirects

In that file there is some code that I can't find.
PHP Code:

3. Open mod/index.php.

Find: 

    <a href="thread.php?s=<?php echo $session[sessionhash]; ?>&action=prune"> Mass Prune </a>

Is mod/index.php even the right file to find that code?

Dark Shogun

NTLDR 08-19-2002 03:46 PM

Quote:

Originally posted by Dark Shogun
Is mod/index.php even the right file to find that code?
Yes! The CPs have changed alot since then, the code you need to find is:

PHP Code:

makenavoption("Mass Prune","thread.php?action=prune"); 

And you need to add the code in the same format, so:

PHP Code:

makenavoption("Mass Prune Redirects","thread.php?action=prunered"); 


Dark Shogun 08-19-2002 03:57 PM

Last question is about:

This code is what I am supposed to find in admin/index.php but as above things have change but I don't know how to convert it.

PHP Code:

<a href="thread.php?s=<?php echo $session[sessionhash]; ?>&action=move"> Move </a>

Dark Shogun

NTLDR 08-19-2002 04:52 PM

Find, and add the same as above for /mod/index.php

Dark Shogun 08-19-2002 05:07 PM

I put it where it was supposed to go but I don't see the link in the admin center.

Dark Shogun

neocorteqz 09-16-2002 07:31 AM

I Installed the delete redirects one.. I will give the other ones a go later.. Nice work.

Thanks.

mtha 11-03-2002 05:30 PM

I just install the Mass Redirects Deletion Hack in vB2.7.7 (same in 2.7.8)

some changes need to be made in this hack:

Quote:

3. Open mod/index.php.
Find:
<a href="thread.php?s=<?php echo $session[sessionhash]; ?>&action=prune"> Mass Prune </a>
Below it add:
<br> <a href="thread.php?s=<?php echo $session[sessionhash]; ?>&action=prunered"> Mass Prune Redirects</a>

change to
Quote:

3. Open mod/index.php.

Find:

makenavoption("Mass Prune","thread.php?action=prune");

Below it add:

makenavoption("Mass Prune Redirects","thread.php?action=prunered");
Change

Code:

5. Open admin/index.php.
Find:
    <a href="thread.php?s=<?php echo $session[sessionhash]; ?>&action=move"> Move </a>
Below it add:
    <br> <a href="thread.php?s=<?php echo $session[sessionhash]; ?>&action=prunered"> Mass Prune Redirects</a>

to

Code:

5. Open admin/index.php.

Find:

makenavoption("Mass Move","thread.php?action=move","<br />");


Below it add:

makenavoption("Mass Prune Redirects","thread.php?action=prunered","<br />");


in thread-php-addition.txt, change

PHP Code:

// ###################### Start Prune Redirects #######################
if ($action=="prunered") {

  
$perms=getpermissions();
  if (!
$perms[ismoderator] and !$ismod=$DB_site->query_first("SELECT * FROM moderator WHERE userid=$bbuserinfo[userid] AND canmassprunered=1")) {
    echo 
"<p>You do not have permission to do this!</p>";
    exit;
  }

  
doformheader("thread","prunereddate");
  
maketableheader("Prune redirects by date");
  
makeinputcode("Delete redirects older than x days:","daysdelete","");
  
makemodchoosercode(-1,-1,'','All forums','In forum',0);

  
doformfooter();



to

PHP Code:

// ###################### Start Prune Redirects #######################
if ($action=="prunered") {

  
$perms=getpermissions();
  if (!
$perms[ismoderator] and !$ismod=$DB_site->query_first("SELECT * FROM moderator WHERE userid=$bbuserinfo[userid] AND canmassprunered=1")) {
    echo 
"<p>You do not have permission to do this!</p>";
    exit;
  }

  
doformheader("thread","prunereddate");
  
maketableheader("Prune redirects by date");
  
makeinputcode("Delete redirects older than x days:","daysdelete","");
  
makeforumchooser("forumid",-1,-1,"","----- all -----","Forum:");
  
makeyesnocode("Include sub forums","subforums");

  
doformfooter();




julius 04-14-2003 06:55 AM

It works with 2.3.0?
Thansk


All times are GMT. The time now is 04:19 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.01544 seconds
  • Memory Usage 1,900KB
  • 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
  • (2)bbcode_code_printable
  • (13)bbcode_php_printable
  • (14)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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