The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Comments |
#2
|
|||
|
|||
![]()
Yup - I'll have a think about that one!
John |
#3
|
|||
|
|||
![]()
[B]Mass Delete old users/Mass Email inactive users.
I need this feature too for my classes which change every semester |
#4
|
|||
|
|||
![]()
Has anyone worked on this? I would love to see a feature like this.
|
#5
|
|||
|
|||
![]()
I like this idea!
![]() |
#6
|
|||
|
|||
![]()
has anyone come up with this yet?
|
#7
|
|||
|
|||
![]()
Ok,
I have been working on the remove old members hack but I know I am doing something wrong here. Here is what I have: 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; } if ($action=="doremovejoindate") { echo "<p>Deleting...</p>"; $datecut=time()+($joindateremove*86400); $postcut=$DB_site->query("SELECT joindate FROM user WHERE joindate=$datecut"); $postcuts=$postcut[joindate]; if ($joinpostsremove<=2 AND $postcuts=$datecut) { $DB_site->query("DELETE FROM user WHERE joindate=$datecut"); $DB_site->query("DELETE FROM user WHERE posts<=$joinpostsremove"); 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>"; } } What I am trying to do is to remove only those members that are the number of days old that you input into the text box and also meet the number of posts requirement. I set this to <=2 but would like for the script to look at the $joinpostsremove input and work off that. The above is just where I got to and would like for some of you code warriors to look it over and add anything that you think is necessary so that you can put in correct code to delete members that are over X number of days old and have X number of posts. They should meet both criteria or you get the "No Members match......." message. Thanks, Parker |
#8
|
|||
|
|||
![]()
Hmm.. this is completely untested, and I dunno if it'll work:
Code:
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>"; if (!is_int($joinpostsremove) and !is_int($joindateremove)) { echo "Invalid entries."; exit; } $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 |
#9
|
|||
|
|||
![]()
Ed:
Thanks for looking at this. I keep getting the "Invalid Entries" line whenever I put any number in either place. So if I put in 365 for the number of days and 1 for the number of posts then I get the "Invalid Entries" line. Also, I am not sure now that the script uses 86,400 as the number to use for calculation of the sign up date. In the import.php file it uses: if ( ereg( "([0-9]{1,2})-([0-9]{1,2})-([0-9]{2,4})", $userinfo[datejoined], $regs ) ) { $datejoined=mktime(0,0,0,$regs[1],$regs[2],$regs[3])-($timeoffset)*3600; } else { $datejoined=time(); } Any ideas? BTW, what does this do?: if (!is_int($joinpostsremove) and !is_int($joindateremove)) Thanks, Parker [Edited by Parker Clack on 07-31-2000 at 11:34 PM] |
#10
|
|||
|
|||
![]()
Hmm... not sure why that invalid entries thing wasn't working. It was just to make sure the user entered an integer in both fields. Oh well, I just changed it up a little, but not it does a little bit different function
![]() Code:
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>"; if (!$joinpostsremove and !$joindateremove) { echo "You didn't fill in a required field."; exit; //Another note since I'm thinking about it: this might not work either. I'm not sure if a "0" returns as false - try it. } $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 |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|