View Full Version : 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,
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
I'm goin' to make a full hack of this!
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
Hmm, and i don't need to use any usernames or passwords?
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
Ok, you may release it. it's now your hack :'(
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
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.