News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Enhancements to purge inactive members

Started by davidhs, May 28, 2010, 10:16:26 PM

Previous topic - Next topic

davidhs

Quote from: mtechama on February 27, 2011, 04:19:10 PMI 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.

Quote from: sharks on February 27, 2011, 04:43:36 PMThis 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.

teamvtec

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?

davidhs

Quote from: teamvtec on March 11, 2011, 06:32:08 PMGreat 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.

Quote from: teamvtec on March 11, 2011, 06:32:08 PMI want them gone as well with deletion of the selected members. Is this even possible?
Sorry, I do not understand. Can you explain more?

sharks

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.

davidhs

Quote from: teamvtec on March 11, 2011, 06:32:08 PMI want them gone as well with deletion of the selected members. Is this even possible?
Quote from: sharks on March 12, 2011, 03:12:15 AMWhat 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?

sharks

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.

davidhs

Quote from: sharks on March 13, 2011, 03:23:51 AMI 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.

teamvtec

Quote from: davidhs on March 12, 2011, 07:52:46 AM
Quote from: teamvtec on March 11, 2011, 06:32:08 PMI want them gone as well with deletion of the selected members. Is this even possible?
Quote from: sharks on March 12, 2011, 03:12:15 AMWhat 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

davidhs

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...

teamvtec

Great, that sounds like a good addition to a nice mod ;)
Can't wait to try it....

teamvtec

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

davidhs

Quote from: teamvtec 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
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


dougiefresh

Quote from: teamvtec 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
You might look at this mod: Auto Email Inactive Ordinary Users.


davidhs

New version:

1.2     2011-04-03
------------------
+ Select button for delete posts of removed members.

teamvtec


dougiefresh

#37
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: $where_vars = array(
'last_login' => $time_limit,
);
$where = 'mem.last_login < {int:last_login}';
and the second operation looks for: $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: $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....


davidhs

New version:

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

Advertisement: