[BETA] Prune Inactive Users

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
Gib...
Registered User
Posts: 65
Joined: Tue Sep 19, 2006 4:15 pm

Post by Gib... »

Martin Truckenbrodt wrote: 1. Autoprunning would be great!

2. IMO it would be better not to build customized queries. IMO it would be better to set permenant settings for standard wishes:
  • delete not activated users - settings: delete after x days or weeks
  • delete zero posters - settings: delete after x weeks, months or years
  • delete old or inactive users - settings: last login x months or years ago - optional minimum count of posts to prevent from deleting
Put these settings into a config table for your MOD or into the phpbb_config table and into the ACP page board configuration.

If these things are optional OK, but not if you remove the current content of the MOD. I do not want autopruning. I do not want "standard settrings" I even added one field with it's query to this MOD to give me more flexibility which is what I like in this mod. Do not remove that flexibility, you might add standard queries though.

I don't really see the point of PM count in relation to this Mod. But I can't be against more information on my users. But if I want to see who has many PM taking space in the database which is a minor thing I can look in PHPmyAdmin.
kkroo
Registered User
Posts: 729
Joined: Sat Dec 03, 2005 4:49 pm
Contact:

Post by kkroo »

Although I think autopruning is an excellent idea, there are a few problems with it.

It would really suck if somebody misconfigured the mod or if there was a bug in the mod, then many users would be deleted.

If it checks through each user and looks at their data and notifies or deletes them, it would for sure overload a server that has 500+ users.

There isn't really a need for this to be done automatically, just fix up the query, and run it and it will fetch all the users that match what you selected. With a hit of a single button, you can notify or delete all of the users, so it is just as easy.

About the default query. I used to have that in the very first version of the MOD. I found that it wasn't too flexible and doesn't suit everybody's forum. It is better for them to choose. That way it is more user friendly. What I could do is have a feature that remembers what query you typed in. You select your settings and before you hit submit, you can check a box saying "Remember this query". If that box is selected it will remember the last query you saved and it will load it each time and highlight the boxes and check/uncheck boxes.

About the PM column, I don't really see its purpose. A user can have 50 private messages and 0 posts. That doesn't really make the user active for nobody knows that they exist. The only person that knows them is the person they are PMing. A active user is one who vists and posts frequently.

Let me know what you think.
My MODs

Need a coder?

Enjoy my Mods? - Image
Gib...
Registered User
Posts: 65
Joined: Tue Sep 19, 2006 4:15 pm

Post by Gib... »

I could not agree more, your comments are exactly in line with mine. A remember query feature is a great idea. For now, I just changed the checked status of the form in the template to get the query by default the way I use it the most.

As I wrote in previous post I have added two things to this mod. A field to insert the date I send a notify message and a field to note I want to keep a user even if the user never connects (in case after the notification I get an email telling me the user wants to keep an open account). I also added a query on that "keep inactive users" flag so I can exclude them from my queries. So what I do is send notification, wait one or two weeks, flag people if I get an email, then query notified people in the last few weeks and erase them. Easy and efficient. These additions makes that mod perfect for me.
kkroo
Registered User
Posts: 729
Joined: Sat Dec 03, 2005 4:49 pm
Contact:

Post by kkroo »

The date of the last sent notification message already exists in the current version. I like your flag users feature though. It makes it easier to remember who notified you. I might just add a link next to notify saying flag or something. or maybe a picture of a flag.
My MODs

Need a coder?

Enjoy my Mods? - Image
User avatar
Martin Truckenbrodt
Registered User
Posts: 3045
Joined: Sun Mar 23, 2003 6:22 pm
Location: Franconia
Name: Martin Truckenbrodt
Contact:

Post by Martin Truckenbrodt »

Hello,
IMO the PM count is a good optional information for zero posters.

I'm not interested in manual administration work. So I need the autoprunning feature.

You fear that site admin could delete too much users? This is possible with your MOD withou autoprunning too. So I don't understand your point.
So I will say, that some standard queries with usefull selectable options would be a must secure solution.

Well, you are not interested in this features. So I will program it as an new MOD.

Bye Martin
Free tutorial: Installing MODs in phpBB 3.0
Advanced Block MOD - Prevent spam on your phpBB 3.0 board with Stop Forum Spam, BotScout, Akismet, Project Honey Pot and several IP-RBL and Domain-RBL DNS blacklists!
My MODs
Use the official phpBB Ideas to vote missing core features!!!
Gib...
Registered User
Posts: 65
Joined: Tue Sep 19, 2006 4:15 pm

Post by Gib... »

kkroo wrote: The date of the last sent notification message already exists in the current version. I like your flag users feature though. It makes it easier to remember who notified you. I might just add a link next to notify saying flag or something. or maybe a picture of a flag.

Ya. If I recall well you added the notify date after a comment I made on a previous version. I added that feature on my version. I added a "to keep" flag inside Admin Toolkit and in the user databse / user admin profile, before finding this prune MOD. What I used to do was to manually search with Admin toolkit what user did not connect since X months, then email them, then flag those who answered back if they want to keep their account. I started with an Excel sheet!! Then, I added that flag in the user database and finally I added the same flag in your MOD with a query on it to exclude these "old inactive account that are to be kept for whatever reason". If you include that feature in your MOD that would be nice. If other users find it useful.
kkroo
Registered User
Posts: 729
Joined: Sat Dec 03, 2005 4:49 pm
Contact:

Post by kkroo »

Mod updated:

Code: Select all

## 2007-3-03 - Version 0.5.0
##      -	Added a feature that allows you to flag or unflag users and search for them
##      -	Added a feature that allows you to save the query
To update, copy new files, update lang_admin.php and execute queries
My MODs

Need a coder?

Enjoy my Mods? - Image
kkroo
Registered User
Posts: 729
Joined: Sat Dec 03, 2005 4:49 pm
Contact:

Post by kkroo »

Screenshots updated :)
My MODs

Need a coder?

Enjoy my Mods? - Image
dewk
Registered User
Posts: 1
Joined: Sat Mar 03, 2007 7:02 pm

Error in left ACP frame.

Post by dewk »

Hi, this is just what I'm looking for in a mod. However I get an error in the left ACP frame:

Parse error: syntax error, unexpected T_DOUBLE_ARROW in /home/vhosts2/h/o/houseofrurik.com/www/forum/admin/admin_prune_users.php on line 458


Line 458:
'flagged_check' => array( 'name' => 'flagged_check', 'value' => $_POST['flagged_check'], 'type' => 'check' ),
kkroo
Registered User
Posts: 729
Joined: Sat Dec 03, 2005 4:49 pm
Contact:

Post by kkroo »

sorry about that. I copied the wrong file into the zip archive.

Package updated.

Just re-download the mod and copy the files to your root directory.
My MODs

Need a coder?

Enjoy my Mods? - Image
DivErTido
Registered User
Posts: 642
Joined: Fri Aug 08, 2003 10:11 pm
Contact:

Post by DivErTido »

Great MOD, congratulations!

But I have one problem after I have installed this mod in my board.
When I go to my ACP and click in Prune Inactive Users I´ve got this error on the top of the page:
Warning: Invalid argument supplied for foreach() in /home/bars/public_html/forum/admin/admin_prune_users.php on line 762

Warning: Cannot modify header information - headers already sent by (output started at /home/bars/public_html/forum/admin/admin_prune_users.php:762) in /home/bars/public_html/forum/admin/page_header_admin.php on line 143

Warning: Cannot modify header information - headers already sent by (output started at /home/bars/public_html/forum/admin/admin_prune_users.php:762) in /home/bars/public_html/forum/admin/page_header_admin.php on line 145

Warning: Cannot modify header information - headers already sent by (output started at /home/bars/public_html/forum/admin/admin_prune_users.php:762) in /home/bars/public_html/forum/admin/page_header_admin.php on line 146


Can someone help me?
The line 762 in the admin_prune_users.php file is:

Code: Select all

foreach ( $default_data_array as $data_array )
Help :)
P.S. Please sorry for my poor english...
Legendas Divx
DivErTido
Registered User
Posts: 642
Joined: Fri Aug 08, 2003 10:11 pm
Contact:

Post by DivErTido »

Hummm strange... when I clicked in Remember Settings the error disappeared! (???) Well, fixed! :D

But the Remember Settings is not working... Am I the only one with this problem?
P.S. Please sorry for my poor english...
Legendas Divx
kkroo
Registered User
Posts: 729
Joined: Sat Dec 03, 2005 4:49 pm
Contact:

Post by kkroo »

Thanks for reporting that. I just fixed that by adding:

Code: Select all

		if ( is_array ( $default_data_array ) )
		{
before

Code: Select all

		foreach ( $default_data_array as $data_array )
		{
			if ( isset ( $data_array['value'] ) )
			{
				switch ( $data_array['type'] )
				{
					case "select": $onload_javascript .=  " selectValueFromSelect(document.getElementsByName(\"" . addslashes( $data_array['name'] ) . "\")[0], \"" . addslashes( $data_array['value'] ) . "\");"; break;
					case "check":  $onload_javascript .=  " selectValueFromCheckBox(document.getElementsByName(\"" . addslashes( $data_array['name'] ) . "\"), \"" . addslashes( $data_array['value'] ) . "\");"; break;
					case "button": $onload_javascript .=  " selectValueFromButton(document.getElementsByName(\"" . addslashes( $data_array['name'] ) . "\"), \"" . addslashes( $data_array['value'] ) . "\");"; break;
					case "text":   $onload_javascript .=  " selectValueFromText(document.getElementsByName(\"" . addslashes( $data_array['name'] ) . "\"), \"" . addslashes( $data_array['value'] ) . "\");"; break;
				}
			}
		}
and

Code: Select all

}
after it
My MODs

Need a coder?

Enjoy my Mods? - Image
Blackwatch
Registered User
Posts: 1
Joined: Fri Mar 09, 2007 2:09 am

Post by Blackwatch »

Thanks for fixing that. I was just registering so I could ask what I needed to do to correct that.

Now it works great!

I really like this mod. Thanks. :)
DivErTido
Registered User
Posts: 642
Joined: Fri Aug 08, 2003 10:11 pm
Contact:

Post by DivErTido »

Thanks kkroo! :)
But this not fixed the Remember Settings :(
P.S. Please sorry for my poor english...
Legendas Divx
Post Reply

Return to “[2.0.x] MODs in Development”