Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Beta Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Find, Optionally Email and Optionally Delete Inactive Members Details »»
Find, Optionally Email and Optionally Delete Inactive Members
Version: 1.00, by amykhar amykhar is offline
Developer Last Online: Nov 2013 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 02-15-2003 Last Update: Never Installs: 17
Is in Beta Stage  
No support by the author.

This hack is designed to allow you to:

a) Find users who have not logged in to your board in X days. X is configurable by you in the control panel.

b) Email the inactive users. When the email is set, the date is recorded so that you will not email them again within X days

c) Delete the inactive users. This can happen in two ways:
1) If you don't have email users set, it will simply delete users who have not logged in to your forums in the past X days.
2) If you have emails turned on, it will delete users who have not logged in during the past X days AND who were sent the warning email more than 15 days before.

The email is a template configurable by you.

Here is how this hack will behave:

If you have email on and delete off, it will email inactive users every X days.

If you have email on and delete on, it will email a warning then delete 15 days later.

If you have emails off and delete on, it will delete users who have been incactive for X days.

If you have email off and delete off, it will list the inactive users for you in a very crude plain text list.

This is not a hack for newbies. If you don't know how to run Queries, don't touch this hack. It is still In Beta. If I get bored and ambitious, I will write an install script and make it idiot-proof.

Screen Shots to Follow

I will Support this hack for users with some hacking experience. I will fix bugs. I will not teach hacking basics though.

!Important - After You Install the hack, go to your Control Panel and Set the Options! Otherwise it will NOT work.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #52  
Old 03-07-2003, 09:55 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by djr
Hi Amy,

It's me again.. in a few days (Tuesday, 11th of March) I'll be losing approx. 1750 users They are inactive for over a year (my setting), I know, but is it possible to adjust the hack so they will be getting one last e-mail warning a day before the actual pruning?

Thanks for considering and the great updates!

@ hypedave: nice idea, updated the hack!

- djr
Here is how I would do it.

1. Create a new usergroup for those who are about to be deleted. Note the usergroupid.

2. In manageInactive.php Find:

Code:
?>
Add above:

Code:
       //Final Warning
       $finalWarning = time() - 1036800;
       $finalArray=$DB_site->query("SELECT username,userid,usergroupid,email,adminemail,emailDate FROM user WHERE lastactivity<$cutoffdate and    emailDate<$finalWarning ORDER BY username");
   while ($users=$DB_site->fetch_array($finalArray)) {
        if ($emailInactive AND $user[adminemail] AND $user[usergroupid]!=X ){
         eval("\$subject = \"".gettemplate("inactiveFinalWarningSubject")."\";");
         eval("\$message = \"".gettemplate("inactiveFinalMessage")."\";");
         mail ($user[email],$subject,$message,"From: \"$bbtitle Mailer\" <$webmasteremail>");
         $DB_site->query("UPDATE user set usergroupid=X WHERE userid='$user[userid]'");
         echo("Emailed ". $user[username]."<br>");
   }
(Change X in both places to the new usergroupid that you just created.)

3. Create two new templates:inactiveFinalWarningSubject and inactiveFinalMessage. Put whatever message and subject you choose in them.

Please note: THIS ADDON IS UNTESTED.
Reply With Quote
  #53  
Old 03-07-2003, 10:15 PM
djr's Avatar
djr djr is offline
 
Join Date: Nov 2001
Location: Amsterdam
Posts: 220
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You're AWESOME! Wow, that was REAL quick. I'll let you know how it goes!

When will you be moving this out of beta? The hack is superb as is, or are you waiting for the first user who's got his board pruned

- djr
Reply With Quote
  #54  
Old 03-07-2003, 10:28 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am waiting for you to report sucess

Amy
Reply With Quote
  #55  
Old 03-09-2003, 04:54 PM
TheEDIGuy TheEDIGuy is offline
 
Join Date: Jul 2002
Location: Buffalo, NY
Posts: 79
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This has been working extremely well for me, Amy.

My only "complaint" is that the first time I ran it, I had (obviously) an extremely large group of people e-mailed. Now, every day I run it, I only have 8-10. But when it hits the 31st day since the first time I ran it, it's going to grab that huge list again, minus the people who actually came back.

Since I don't use the delete option...If you use it, you don't have that problem

It's too bad I didn't plan ahead, and slowly decrease the number of "inactive days" when I first ran it.
Reply With Quote
  #56  
Old 03-09-2003, 04:56 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Glad it's working for you The first delete one has me interested cause it's probably going to be rather query intensive. After the first one for larger boards though, I am not expecting any problems.

Amy
Reply With Quote
  #57  
Old 03-14-2003, 06:11 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
03-07-03 at 07:15 PM djr said this in Post #52
You're AWESOME! Wow, that was REAL quick. I'll let you know how it goes!

When will you be moving this out of beta? The hack is superb as is, or are you waiting for the first user who's got his board pruned

- djr
So, how did the first prune go? I'm dying of curiosity.

Amy
Reply With Quote
  #58  
Old 03-18-2003, 05:21 PM
subu1 subu1 is offline
 
Join Date: Sep 2002
Location: Germany
Posts: 189
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hi amy,

i have install your Hack and its work, but now i have a aktiv User there have gotten a email in 15 Days he is deleted.

why?

i dont want delete a aktiv user, he have 30 Postings and the last today

subu1
Reply With Quote
  #59  
Old 03-18-2003, 05:39 PM
djr's Avatar
djr djr is offline
 
Join Date: Nov 2001
Location: Amsterdam
Posts: 220
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
03-14-03 at 09:11 PM amykhar said this
So, how did the first prune go? I'm dying of curiosity.
Hi Amy,

Sorry, been away to CEBIT in Hannover to see new cool gadgets. The first prune went without any flaw at all, though I lost approx 1750 members. OUCH! Well, there's over 3000 left, and more joining day in day out.
I had problems with the Final Warning addon, so I removed that one again. I was getting parse errors, and due to being extremely busy didn't have the time to give it another try.

All in all I'm extremely happy with the hack. Tme to move it out of beta! :banana:
Reply With Quote
  #60  
Old 03-18-2003, 05:42 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Glad it worked for you djr Losing so many members must have been painful though.

Amy
Reply With Quote
  #61  
Old 03-18-2003, 05:42 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Today at 02:21 PM subu1 said this in Post #57
hi amy,

i have install your Hack and its work, but now i have a aktiv User there have gotten a email in 15 Days he is deleted.

why?

i dont want delete a aktiv user, he have 30 Postings and the last today

subu1
Look and see what the value for his last activity is. Also, how many days do you have it set for? If he becomes active again after the email is sent, he won't be deleted.

Amy
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:01 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04842 seconds
  • Memory Usage 2,317KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete