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)
-   -   Allow Mods a temporary ban of users (https://vborg.vbsupport.ru/showthread.php?t=39584)

Smoothie 06-10-2002 03:05 AM

In the banuser.php file, I think its around line 10, where it says userid 1. If thats your userid, that no one else will be able to run the script.

Boofo 06-10-2002 05:54 AM

What about the ismod part in that same line? I just want to make it so the admin and the supermod and whichever userid I want to enter can use it. That code they gave me in the earlier post doesn't work. :)

Quote:

Originally posted by Smoothie
In the banuser.php file, I think its around line 10, where it says userid 1. If thats your userid, that no one else will be able to run the script.

Smoothie 06-10-2002 08:18 AM

It would be great if the person who created this hack could lend some assistance. :) I would like for my mods to be able to temp ban without the risk of one of them banning me. :(

Smoothie 06-11-2002 02:37 AM

^bump^

Boofo 06-11-2002 03:22 AM

What does the "bump" mean? I have always wondered that every time I see it. :)

Quote:

Originally posted by Smoothie
^bump^

Hotte 06-11-2002 03:39 PM

Quote:

Originally posted by Smoothie
This hack I just learned can be quite harmful. What stops a mod, super mod, from banning an admin?
Nothing. But what stops a mod, super mod or admin from un-banning himself? The temp-ban doesn?t work on files in the mod oder adminfolder, so they are still able to access the banuser.php to unban.

Lesane 06-12-2002 08:13 AM

Quote:

Originally posted by Smoothie
It would be great if the person who created this hack could lend some assistance. :) I would like for my mods to be able to temp ban without the risk of one of them banning me. :(
Not tested but it should work:

Find in banuser.php:

PHP Code:

if ($action=="admininsert") { 

Add under it:

PHP Code:

$noadmin=$DB_site->query_first("SELECT * FROM user WHERE userid=$userid");
  if (
$noadmin[usergroupid]=="6") {
    echo 
"Oops, you try to ban an admin wich is not allowed!";
    echo 
"<br>Try again by clicking <a href=\"banuser.php?action=adminadd\" target=\"_blank\"><u>here</u></a>.";
cpfooter();
   exit();
  } 


Smoothie 06-12-2002 08:26 AM

I'll give it a go...thanks bro.

Smoothie 06-12-2002 08:37 AM

Works! thanks Lasane. :)

Boofo 06-12-2002 09:32 AM

Can it also be set up to not allow the super moderator or fellow moderators to be banned by one another but the Admin can still ban whomever he/she wants?

And how about having it send an e-mail notifiation to the Admin when someone attempts to ban the Admin, Supermod or Moerators (unless the Admin themselves did it), can that be done too?

(Wait a minute! What am i saying here, "can it be done"? This is Lesane we're talking to. As long as he's around, OF COURSE it can be done!) :)

Quote:

Originally posted by Lesane


Not tested but it should work:

Find in banuser.php:

PHP Code:

if ($action=="admininsert") { 

Add under it:

PHP Code:

$noadmin=$DB_site->query_first("SELECT * FROM user WHERE userid=$userid");
  if (
$noadmin[usergroupid]=="6") {
    echo 
"Oops, you try to ban an admin wich is not allowed!";
    echo 
"<br>Try again by clicking <a href=\"banuser.php?action=adminadd\" target=\"_blank\"><u>here</u></a>.";
cpfooter();
   exit();
  } 




All times are GMT. The time now is 07:42 PM.

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.01124 seconds
  • Memory Usage 1,750KB
  • 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
  • (4)bbcode_php_printable
  • (5)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