vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Delete Moderator from all forums he moderates (https://vborg.vbsupport.ru/showthread.php?t=47064)

flup 12-28-2002 01:21 PM

Delete Moderator from all forums he moderates
 
Hi,,

when i edit one of my moderators to normal member,
I've to delete him everywhere he is moderator.

Now, i would prefer a hack that deletes a moderator on all forums he moderators!!!
Or, a hack that makes you able to specify @ wich forums
he has to be deleted wich check boxes.

Thx in Advanced,

flup 12-28-2002 03:34 PM

^bump^

Xenon 12-28-2002 08:19 PM

run this query:
[sql]DELETE FROM moderator WHERE userid=xx[/sql]

change xx into his userid, and he will be deleted from all forums he was moderator

flup 12-28-2002 08:44 PM

Ok thx!

flup 12-29-2002 02:17 PM

I'm goin' to make a full hack of this!

flup 12-29-2002 02:18 PM

Hmm, dat won't go, i guess i can;t add SQL commands to a PHP script without logging into SQL database first:/

Chris M 12-29-2002 04:47 PM

Try using:

Code:

$DB_site->query("DELETE FROM moderator WHERE userid=$scriptname[userid]");
Then create an Admin Script that you can enter a Value ($scriptname[userid]);)

Satan

flup 12-29-2002 04:53 PM

Hmm, and i don't need to use any usernames or passwords?

flup 12-29-2002 07:32 PM

Hmmz, i've got this for now:

Code:

//vB Mod Del Start
<html>
<form>
<input type="text" name="$moddel[userid]">
<input type="submit" name="Submit" value="Submit">
</form>
</html>
<?php
$DB_site->query("DELETE FROM moderator WHERE userid=$moddel[userid]");
?>
//vB Mod Del End

And i don't know how to say:
On hit SUMBIM->db query

Chris M 12-29-2002 09:54 PM

Create a file named "moddel.php" with content:

PHP Code:

<?php
error_reporting
(7);

require(
"./global.php");

cpheader();

if (isset(
$action)==0) {
  
$action="go";
}

// ###################### Start go #######################
if ($action=="go") {

  
doformheader("moddel","dogo");

  
maketableheader("Remove Mods");
  
makeinputcode("Userid","$moddel[userid]");

  
doformfooter("Go");
}

// ###################### Start dogo #######################
if ($HTTP_POST_VARS['action']=="dogo") {

  
$DB_site->query("DELETE FROM moderator WHERE userid=$moddel[userid]");

  
$action="go";

  echo 
"<p>Moderator Deleted</p>";

}

cpfooter();
?>

:)

Satan


All times are GMT. The time now is 03:03 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.01009 seconds
  • Memory Usage 1,735KB
  • 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
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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