Advertisement:

Author Topic: Enhancements to purge inactive members  (Read 65317 times)

Offline davidhs

  • Sophist Member
  • *****
  • Posts: 1,055
  • Gender: Male
Re: Enhancements to purge inactive members, 1.1.2 (SMF 2.0*-RC5)
« Reply #20 on: February 27, 2011, 05:31:54 PM »
I would be nice to have a mod that does something like that.
Sorry, but now I have no plans to do this :( . Perhaps there is another mod that does this, I do not know.

This mod is so awesome! Totally what i could have used years ago, although i would make a request for a 1.1.13 compatible version, PLEASE! :)

It is very useful, as i regularly delete inactive members on my forums, and i have to do that manually all the time.
A few weeks ago I upgraded my other mods with SMF 1.x support and I asked in board "SMF 1.0 Support" http://www.simplemachines.org/community/index.php?board=9.0 about "Purge inactive members" section in order to make this mod for this section, but in SMF 1.x do not exists this section (see http://www.simplemachines.org/community/index.php?topic=418529.0 ).

I have to do it from scratch and that is not my intention: This mod is an improvement smf function, not a new function.

I have no plans to support SMF 1.x in this mod, unless in a future version 1.1.x smf adding "Purge inactive members" section.

Offline teamvtec

  • Jr. Member
  • **
  • Posts: 110
Re: Enhancements to purge inactive members, 1.1.2 (SMF 2.0*-RC5)
« Reply #21 on: March 11, 2011, 06:32:08 PM »
Great mod but what about the posts the deleted members made?

I want them gone as well with deletion of the selected members. Is this even possible?

Offline davidhs

  • Sophist Member
  • *****
  • Posts: 1,055
  • Gender: Male
Re: Enhancements to purge inactive members, 1.1.2 (SMF 2.0*-RC5)
« Reply #22 on: March 11, 2011, 07:36:41 PM »
Great mod but what about the posts the deleted members made?
They become of guest user (but username does not change). This is made by SMF, not by my MOD.

I want them gone as well with deletion of the selected members. Is this even possible?
Sorry, I do not understand. Can you explain more?

Offline sharks

  • Sr. Member
  • ****
  • Posts: 891
  • Gender: Male
  • There's always a way.
Re: Enhancements to purge inactive members, 1.1.2 (SMF 2.0*-RC5)
« Reply #23 on: March 12, 2011, 03:12:15 AM »
What teamvtec means is that when deleting the inactive members, there should also be an option where all the members' topics and posts can also be removed entirely. This is also what i am looking for, as i do not want to leave clutter all over my forum after removing some inactive members. When manually deleting a member from the forum, you can see that option, so i think it should be possible for you to integrate that function into your modification.
SMF 2.0 Theme Color Editor
http://www.colorizeit.com/browse/24/smf-20-themes.html

SMF Package Parser to view all edits made by any modification package:
http://resourcez.biz/PackageParser/

Firefox is the best browser for SMF!
http://www.mozilla.com/en-US/firefox/fx/

Offline davidhs

  • Sophist Member
  • *****
  • Posts: 1,055
  • Gender: Male
Re: Enhancements to purge inactive members, 1.1.2 (SMF 2.0*-RC5)
« Reply #24 on: March 12, 2011, 07:52:46 AM »
I want them gone as well with deletion of the selected members. Is this even possible?
What teamvtec means is that when deleting the inactive members, there should also be an option where all the members' topics and posts can also be removed entirely. This is also what i am looking for, as i do not want to leave clutter all over my forum after removing some inactive members. When manually deleting a member from the forum, you can see that option, so i think it should be possible for you to integrate that function into your modification.

Thanks, now I understand. You want an option to delete the posts of deleted members.

I can add one checkbox Delete posts of removed members. I will see how I can do it...

It is dangerous because they could become meaningless topics when you delete those post. When I delete one member, there are two cases:

1. There is a topic with all posts of this member => No problem, I delete the whole topic.
Quote
Topic:
Post 1 of member 1
Post 2 of member 1
Post 3 of member 1
Post 4 of member 1

   delete member 1 
==============>


Topic is deleted

2. There is a topic with some posts of this member and others posts of others members => I can do one of these:
2.1. Delete whole topic => Problem, in this case I delete posts of others members.
Quote
Topic:
Post 1 of member 2
Post 2 of member 1
Post 3 of member 1

Post 4 of member 2

   delete member 1 
==============>


Topic is deleted
2.2. Delete only posts of deleted member  => Problem, in this case the topic could become meaningless.
Quote
Topic:
Post 1 of member 2
Post 2 of member 1
Post 3 of member 1

Post 4 of member 2

   delete member 1 
==============>
Topic without member 1:
Post 1 of member 2
Post 4 of member 2
2.3. No delete this topic.
Quote
Topic:
Post 1 of member 2
Post 2 of member 1
Post 3 of member 1

Post 4 of member 2

   delete member 1 
==============>
Topic with guest member:
Post 1 of member 2
Post 2 of member guest 1
Post 3 of member guest 1

Post 4 of member 2
2.4. I can add one select buttom with options and do option 2.1, 2.2 or 2.3.
When removed member has posts in topic,
- delete whole topic
- delete only its posts
- delete nothing


What do you think?
« Last Edit: March 12, 2011, 08:10:31 AM by davidhs »

Offline sharks

  • Sr. Member
  • ****
  • Posts: 891
  • Gender: Male
  • There's always a way.
Re: Enhancements to purge inactive members, 1.1.2 (SMF 2.0*-RC5)
« Reply #25 on: March 13, 2011, 03:23:51 AM »
OK, it is important to keep things simple and easy. There is no need to allow too many options, as the purpose of this last suggestion is to prevent the "Guest" posts all over the forum after those members are deleted by the modification.

A simple algorithm or logic that follows this:

IF member = topic starter, then whole topic is deleted.
ELSE member is not topic starter, then delete the replies only.

I think you should be able to work this logic into PHP (sorry, i don't know yet how to do any of that with PHP) but my point is that there is no need to have so many options. The only checkbox option should be "Delete posts of removed member(s)" and the rest should be done in the background with the script itself. I hope you get my meaning? I think this is a similar system as used by SMF when you manually delete a member from the latter's profile, and then select "Delete all topics and posts" from the drop-down list. The SMF default script checks systematically starting from the first condition IF member = topic starter, then whole topic is deleted. and then immediately follows ELSE member is not topic starter, then delete the replies only.
« Last Edit: March 13, 2011, 03:28:09 AM by sharks »
SMF 2.0 Theme Color Editor
http://www.colorizeit.com/browse/24/smf-20-themes.html

SMF Package Parser to view all edits made by any modification package:
http://resourcez.biz/PackageParser/

Firefox is the best browser for SMF!
http://www.mozilla.com/en-US/firefox/fx/

Offline davidhs

  • Sophist Member
  • *****
  • Posts: 1,055
  • Gender: Male
Re: Enhancements to purge inactive members, 1.1.2 (SMF 2.0*-RC5)
« Reply #26 on: March 13, 2011, 08:41:05 AM »
I think this is a similar system as used by SMF when you manually delete a member from the latter's profile, and then select "Delete all topics and posts" from the drop-down list.
I did not notice this feature (remove members from their account). I will do similarly.

Offline teamvtec

  • Jr. Member
  • **
  • Posts: 110
Re: Enhancements to purge inactive members, 1.1.2 (SMF 2.0*-RC5)
« Reply #27 on: March 23, 2011, 04:27:25 PM »
I want them gone as well with deletion of the selected members. Is this even possible?
What teamvtec means is that when deleting the inactive members, there should also be an option where all the members' topics and posts can also be removed entirely. This is also what i am looking for, as i do not want to leave clutter all over my forum after removing some inactive members. When manually deleting a member from the forum, you can see that option, so i think it should be possible for you to integrate that function into your modification.

Thanks, now I understand. You want an option to delete the posts of deleted members.

I can add one checkbox Delete posts of removed members. I will see how I can do it...

It is dangerous because they could become meaningless topics when you delete those post. When I delete one member, there are two cases:

1. There is a topic with all posts of this member => No problem, I delete the whole topic.
Quote
Topic:
Post 1 of member 1
Post 2 of member 1
Post 3 of member 1
Post 4 of member 1

   delete member 1 
==============>


Topic is deleted

2. There is a topic with some posts of this member and others posts of others members => I can do one of these:
2.1. Delete whole topic => Problem, in this case I delete posts of others members.
Quote
Topic:
Post 1 of member 2
Post 2 of member 1
Post 3 of member 1

Post 4 of member 2

   delete member 1 
==============>


Topic is deleted
2.2. Delete only posts of deleted member  => Problem, in this case the topic could become meaningless.
Quote
Topic:
Post 1 of member 2
Post 2 of member 1
Post 3 of member 1

Post 4 of member 2

   delete member 1 
==============>
Topic without member 1:
Post 1 of member 2
Post 4 of member 2
2.3. No delete this topic.
Quote
Topic:
Post 1 of member 2
Post 2 of member 1
Post 3 of member 1

Post 4 of member 2

   delete member 1 
==============>
Topic with guest member:
Post 1 of member 2
Post 2 of member guest 1
Post 3 of member guest 1

Post 4 of member 2
2.4. I can add one select buttom with options and do option 2.1, 2.2 or 2.3.
When removed member has posts in topic,
- delete whole topic
- delete only its posts
- delete nothing


What do you think?

This is what i need David! but sharks makes a very good suggestion

Offline davidhs

  • Sophist Member
  • *****
  • Posts: 1,055
  • Gender: Male
Re: Enhancements to purge inactive members, 1.1.2 (SMF 2.0*-RC5)
« Reply #28 on: March 23, 2011, 07:10:30 PM »
I will add a select button with options like select button of remove account:

Delete posts of removed members:
- None -- Delete nothing
- All posts -- Delete only posts, no topic (no delete first post of topic)
- Topics and posts -- Delete all

In some days...

Offline teamvtec

  • Jr. Member
  • **
  • Posts: 110
Re: Enhancements to purge inactive members, 1.1.2 (SMF 2.0*-RC5)
« Reply #29 on: March 24, 2011, 01:54:07 PM »
Great, that sounds like a good addition to a nice mod ;)
Can't wait to try it....

Offline teamvtec

  • Jr. Member
  • **
  • Posts: 110
Re: Enhancements to purge inactive members, 1.1.2 (SMF 2.0*-RC5)
« Reply #30 on: March 25, 2011, 08:41:36 AM »
I just thought of this...
Would it also be possible to set an automated message for members that are for example over 150 days of last being active?
Like:
Hey Member,

Please note that your account will be suspended in about 2 days. Due to long inactivity (150 days) Log into your account to keep your settings.

Regards, forum team

Offline davidhs

  • Sophist Member
  • *****
  • Posts: 1,055
  • Gender: Male
Re: Enhancements to purge inactive members, 1.1.2 (SMF 2.0*-RC5)
« Reply #31 on: March 25, 2011, 09:08:45 AM »
I just thought of this...
Would it also be possible to set an automated message for members that are for example over 150 days of last being active?
Like:
Hey Member,

Please note that your account will be suspended in about 2 days. Due to long inactivity (150 days) Log into your account to keep your settings.

Regards, forum team
Sorry, but now I have no plans to do this :(

This request already been asked before in this topic
http://www.simplemachines.org/community/index.php?topic=383900.msg2651125#msg2651125
http://www.simplemachines.org/community/index.php?topic=383900.msg2970631#msg2970631

Offline teamvtec

  • Jr. Member
  • **
  • Posts: 110
Re: Enhancements to purge inactive members, 1.1.2 (SMF 2.0*-RC5)
« Reply #32 on: March 26, 2011, 06:41:27 AM »
I see, well sorry for that.

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,859
  • Mod King
    • XPtsp.com Community
Re: Enhancements to purge inactive members, 1.1.2 (SMF 2.0*-RC5)
« Reply #33 on: March 27, 2011, 10:01:45 AM »
I just thought of this...
Would it also be possible to set an automated message for members that are for example over 150 days of last being active?
Like:
Hey Member,

Please note that your account will be suspended in about 2 days. Due to long inactivity (150 days) Log into your account to keep your settings.

Regards, forum team
You might look at this mod: Auto Email Inactive Ordinary Users.

Offline teamvtec

  • Jr. Member
  • **
  • Posts: 110
Re: Enhancements to purge inactive members, 1.1.2 (SMF 2.0*-RC5)
« Reply #34 on: March 28, 2011, 04:16:28 AM »
thanks!

Offline davidhs

  • Sophist Member
  • *****
  • Posts: 1,055
  • Gender: Male
Re: Enhancements to purge inactive members, 1.2 (SMF 2.0*-RC5)
« Reply #35 on: April 03, 2011, 03:13:00 PM »
New version:

Code: [Select]
1.2     2011-04-03
------------------
+ Select button for delete posts of removed members.

Offline teamvtec

  • Jr. Member
  • **
  • Posts: 110
Re: Enhancements to purge inactive members, 1.2 (SMF 2.0*-RC5)
« Reply #36 on: April 04, 2011, 07:18:52 AM »
Great! Thank you for your time and effort ;)

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,859
  • Mod King
    • XPtsp.com Community
Re: Enhancements to purge inactive members, 1.2 (SMF 2.0*-RC5)
« Reply #37 on: June 15, 2011, 03:26:51 PM »
Thank you for the wonderful mod!  I thought I'd let everybody know that when I updated my forum from 2.0 RC5 to 2.0 Gold, I had to reinstall all my mods.  This mod refused to install without some modification using 2.0 RC5 emulation.   

In ./Sources/ManageMaintenance.php, the first and second operation failed.

The first operation looks for for:
Code: [Select]
$where_vars = array(
'last_login' => $time_limit,
);
$where = 'mem.last_login < {int:last_login}';
and the second operation looks for:
Code: [Select]
$where_vars = array(
'last_login' => $time_limit,
);
$where = 'mem.last_login < {int:last_login}';
For 2.0, the first and second operation should be combined because the file now reads:
Code: [Select]
$where_vars = array(
'time_limit' => $time_limit,
);
if ($_POST['del_type'] == 'activated')
{
$where = 'mem.date_registered < {int:time_limit} AND mem.is_activated = {int:is_activated}';
$where_vars['is_activated'] = 0;
}
else
$where = 'mem.last_login < {int:time_limit}';

Hope this info helps someone!

EDIT: Edited which operations failed cause I forgot one....
« Last Edit: June 15, 2011, 08:51:43 PM by dougiefresh »

Offline davidhs

  • Sophist Member
  • *****
  • Posts: 1,055
  • Gender: Male
Re: Enhancements to purge inactive members, 1.2 (SMF 2.0*-RC5)
« Reply #38 on: June 17, 2011, 07:40:14 AM »
In few days, I will update my MODs for SMF 2.0.

Offline davidhs

  • Sophist Member
  • *****
  • Posts: 1,055
  • Gender: Male
Re: Enhancements to purge inactive members, 1.2.1 (SMF 2.0*-2.0)
« Reply #39 on: June 21, 2011, 08:35:17 AM »
New version:

Code: [Select]
1.2.1   2011-06-17
------------------
! Position of operation search in modification.xml.
+ SMF compatibility: Adds 2.0.