[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.
kkroo
Registered User
Posts: 729
Joined: Sat Dec 03, 2005 4:49 pm
Contact:

Post by kkroo »

Thanks for the bug report Gib..., I just fixed that now, when i get the time later today I will update the package with a fix.

theninjasquad, I fixed the problem you are having too. It will be in that fix too
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 »

Mod updated:

Code: Select all

## 2007-1-17 - Version 0.4.0
##      -	Fixed the bug where the notify button sends an email only to the first user
##      -	Fixed the bug where there was a sql error when the username contained a apostrophe
##      -	Added the email of the pruned user in the pruned user list
##      -	Added a column on when the last notification email was sent
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... »

Hi,

Thanks. I should have think of how to solve the notify problem. I learn a lot by lookking at this code changes.

So, I did my test again. Notify worked fine, dates are added. So I tried to delete one user. The user was deleted but I got this error:

Code: Select all

SQL Error : 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 2

DELETE FROM phpbb_groups WHERE group_id =

Line : 241
File : admin_prune_users.php
Maybe it would delete only one user because the error probably stops the foreach loop. The user was not member of any group.

One suggestion for the next version: we would need a way to delete the deleted users list.
kkroo
Registered User
Posts: 729
Joined: Sat Dec 03, 2005 4:49 pm
Contact:

Post by kkroo »

Gib..., I just fixed that error that you got and updated the package. If you are deleting mulitple users and you get a message_die it would kill the loop.

If you download the new package, and replace admin_prune_users.php, you shouldnt get that error again.
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... »

Thanks.

I created two more users and deleted them fine. I'll now use your MOD to notify real users.

I'll try to use another MOD code (spam log in antispam ACP) to create a menu to have the deleted user list deleted.

Oh. One last thing. None of the columns can be sorted by clicking on the header. Using Fireworks.

Bye
kkroo
Registered User
Posts: 729
Joined: Sat Dec 03, 2005 4:49 pm
Contact:

Post by kkroo »

Its not clear what you are trying to do:

"I'll try to use another MOD code (spam log in antispam ACP) to create a menu to have the deleted user list deleted. "

I dont really understand.

BTW, i tried to google Fireworks and I didnt find anything that seemed to be a browser. Ive never heard of it.
My MODs

Need a coder?

Enjoy my Mods? - Image
theninjasquad
Registered User
Posts: 28
Joined: Tue Feb 14, 2006 5:29 pm
Location: Canada

Post by theninjasquad »

Will the mod work in different templates if I just rename the proper files to the name of the template and throw it in the right directory for the template?

Also thanks for fixing that bug with the user list names. This mod is great, Ive already lobbed off 1300 users from my forum. Its amazing how many people sign up but never activate their accounts.

On a sidenote, if I delete a user that has posted, does that mean all their posts are deleted as well?
Gib...
Registered User
Posts: 65
Joined: Tue Sep 19, 2006 4:15 pm

Post by Gib... »

kkroo wrote: "I'll try to use another MOD code (spam log in antispam ACP) to create a menu to have the deleted user list deleted. "

Just that the Pruned Users List needs to be emptied once in a while (I have ten dummy users into it now). With looking at a similar code I should be able to do that.

Oops. Firefox not Fireworks (the image software). The sort and the checkbox All/None do not work for me. Basically all javascript. I don't mind.

Another idea for you: I just added the code to pass USER_LAST_VISIT, USER_REGDATE and USER_POSTS to the notify message, letting people know when the registred, their last visit and number of post.
Last edited by Gib... on Wed Jan 17, 2007 8:02 pm, edited 2 times in total.
kkroo
Registered User
Posts: 729
Joined: Sat Dec 03, 2005 4:49 pm
Contact:

Post by kkroo »

theninjasquad, The mod should still work fine, there may be some screwed up parts with the template, but it will still function properly. If you delete a user, their post still exist. It is the same as deleting a user from the ACP.

Gib..., I use firefox, It works fine for me. Make sure Javascript is enabled in your browser. I like your ideas, Ill take them into concideration for the next version.
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... »

theninjasquad wrote: On a sidenote, if I delete a user that has posted, does that mean all their posts are deleted as well?
I don't think so. I just tried. The posts are kept intact but the word "Guest" will replace the username in the topic next to the message.
Gib...
Registered User
Posts: 65
Joined: Tue Sep 19, 2006 4:15 pm

Post by Gib... »

kkroo wrote: Gib..., I use firefox, It works fine for me. Make sure Javascript is enabled in your browser. I like your ideas, Ill take them into concideration for the next version.

I looked everywhere in Firefox options and Java and Javascript are on.
I looked at the code and it seems that the header of the columns should be spans. Mine are not. Here is an example: <th class="thTop">Last Visit</th>
Last edited by Gib... on Fri Jan 19, 2007 9:39 pm, edited 2 times in total.
Gib...
Registered User
Posts: 65
Joined: Tue Sep 19, 2006 4:15 pm

Post by Gib... »

kkroo wrote: Gib..., ...I like your ideas, Ill take them into concideration for the next version.

Here is another modification I did. I have another field that I will use if I get an email by someone who wants to keep his/her registration even though there is no visit/no posts. It shows up in the individual user profile where I can set it to "Keep" and in the prune users list. Idon't why people want that but I don't mind keeping there account if they indicated that wish.

Another small thing I just noticed. Those two strings are not inverted?
$lang['Prune_users_page_title'] = 'Pruned Users List';
$lang['Pruned_users_page_title'] = 'Prune Inactive Users';
flashmind
Registered User
Posts: 4
Joined: Fri Aug 01, 2003 11:34 pm

Post by flashmind »

I got this error message

Code: Select all

An Error Occurred

DEBUG MODE

SQL Error : 1054 Unknown column 'user_last_notified' in 'field list'

SELECT user_id, username, user_last_login_try, user_last_notified, user_regdate, user_lastvisit, user_active, user_posts FROM phpbb_users WHERE `user_regdate` <= '1168838122' AND `user_lastvisit` = '0' AND `user_active` = '0' AND `user_posts` = '0' AND user_id <> 2 AND user_id <> -1 ORDER BY user_id;

Line : 120
File : admin_prune_users.php
Now I read the replies and saw someone had the same error I did. You suggested to update phpbb, which I actually did already. In fact I updated it again just incase. I am at 2.0.22 right now. Anyways thank you in advance for any help. I am in desperate need for this mod. And I am really glad someone made it.
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 flashmind,

you've done the SQL queries?

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!!!
green ticks
Registered User
Posts: 426
Joined: Sun Apr 02, 2006 12:56 am

Post by green ticks »

2 Warning(s) reported by the SQL Parser
Inconsistent display width specified "INTEGER(255)" in column "deleted_by", statement: 1, table: "phpbb_pruned_users"
Identifier "data" is a reserved keyword (reference: SQL 99), statement: 1, table: "phpbb_pruned_users"

2 Warning(s) reported by the SQL Parser
Inconsistent display width specified "INTEGER(255)" in column "deleted_by", statement: 1, table: "phpbb_pruned_users"
Identifier "data" is a reserved keyword (reference: SQL 99), statement: 1, table: "phpbb_pruned_users"


I so i did do both SQL queries then when i goto build query in ACP its takes about 5 seconds then give me 404
Post Reply

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