PDA

View Full Version : Delete Moderator from all forums he moderates


flup
12-28-2002, 01:21 PM
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:
DELETE FROM moderator WHERE userid=xx

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:

$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:


//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
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

flup
12-30-2002, 10:26 AM
Ok, you may release it. it's now your hack :'(

flup
12-30-2002, 10:34 AM
Actually there are still some things to do =)
But I will call you and Xenon in Credits ;)

Chris M
12-30-2002, 05:36 PM
@flup - It's your idea;)

Satan