vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Beta Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=5)
-   -   Find, Optionally Email and Optionally Delete Inactive Members (https://vborg.vbsupport.ru/showthread.php?t=48964)

amykhar 03-07-2003 09:55 PM

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.

djr 03-07-2003 10:15 PM

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

- djr

amykhar 03-07-2003 10:28 PM

I am waiting for you to report sucess :D

Amy

TheEDIGuy 03-09-2003 04:54 PM

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.

amykhar 03-09-2003 04:56 PM

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

amykhar 03-14-2003 06:11 PM

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

- djr

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

Amy

subu1 03-18-2003 05:21 PM

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

djr 03-18-2003 05:39 PM

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:

amykhar 03-18-2003 05:42 PM

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

amykhar 03-18-2003 05:42 PM

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

Amy


All times are GMT. The time now is 11:04 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01104 seconds
  • Memory Usage 1,746KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete