Ok,
This is what I have so far.
In admin/index.php look for:
<p><b>Threads</b><br>
<a href="thread.php?action=prune">Prune</a><br>
<a href="thread.php?action=move">Move</a><br>
and below this add:
<a href="thread.php?action=remove">Remove</a><br>
<a href="thread.php?action=joindates">Join Date</a></p>
Then in thread.php
look for:
Code:
// ###################### Start move by user selected #######################
if ($action=="domoveuser") {
echo "<p>Deleting...</p>";
while (list($key,$val)=each($movethread)) {
if ($val==1) {
$DB_site->query("UPDATE thread SET forumid=$destforumid WHERE threadid=$key");
}
}
echo "<p>Posts moved successfully! It is recommend that you <a href=\"misc.php\">update counters</a> now.</p>";
}
and below this put.
Code:
// ###################### Start Remove by Account Date #######################
if ($action=="remove") {
echo "<p>Remove members by number of posts</p>\n";
echo doformheader("thread","doremoveposts");
echo "<table border=0>";
echo makeinputcode("Delete member by number of posts :","postsremove","");
echo doformfooter("Submit");
exit;
}
if ($action=="doremoveposts") {
echo "<p>Deleting...</p>";
if ($postsremove==0) {
$DB_site->query("DELETE FROM user WHERE posts=0");
}
elseif ($postsremove>=1) {
$DB_site->query("DELETE FROM user WHERE posts<=$postsremove");
}
echo "<p>Posts deleted successfully! It is recommend that you <a href=\"misc.php\">update counters</a> now.</p>";
}
// ###################### Start Remove by Join Date #######################
if ($action=="joindates") {
echo "<p>Remove by length of membership</p>\n";
echo doformheader("thread","doremovejoindate");
echo "<table border=0>";
echo makeinputcode("Delete accounts older than x days:","joindateremove","");
echo makeinputcode("Number of Posts:","joinpostsremove","");
echo doformfooter("Submit");
exit;
} #end joindates
if ($action=="doremovejoindate") {
echo "<p>Deleting...</p>";
$datecut=time()-($joindateremove*86400);
if($cuts=$DB_site->query("SELECT username,userid FROM user WHERE (joindate<=$datecut AND posts<=$joinpostsremove)")) {
while($user=$DB_site->fetch_array($cuts)) {
$DB_site->query("DELETE FROM user WHERE userid=$user[userid]");
echo "$user[username] deleted...<BR>";
}
echo "<p>Accounts removed successfully! It is recommend that you <a href=\"misc.php\">update counters</a> now.</p>";
} else {
echo "<p>No Members match this criteria. Click <a href=\"index.php\">here</a> to return to the admin index page.</p>";
}
} #end doremovejoindate
This will delete the member by the number of posts or by the time they have been a member and the number of posts they have.
Be sure to back up your original files before using this. I am really new at this stuff and I would use any of this with caution. It worked ok on my test board.
Ed:
If there is anything that you think should be added please feel free to add what you think is necessary.
Parker
[Edited by Parker Clack on 08-02-2000 at 02:02 AM]