[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.
KennethWinfrey
Registered User
Posts: 13
Joined: Fri Dec 22, 2006 12:22 am
Location: Albuquerque, New Mexico
Contact:

Re: [BETA] Prune Inactive Users

Post by KennethWinfrey »

kkroo wrote: This is because you didnt add the language variables in lang_admin.php. They can be found in the install file


There is no lang_admin.php in the prune_users_050.zip file you provide. The install.mod file does not work. Perhaps the answers to my questions would have been there.

Either way, I do not know how to code in the variables.
User avatar
Martin Truckenbrodt
Registered User
Posts: 3045
Joined: Sun Mar 23, 2003 6:22 pm
Location: Franconia
Name: Martin Truckenbrodt
Contact:

Re: [BETA] Prune Inactive Users

Post by Martin Truckenbrodt »

Hello,
try it without EasyMOD! Open the MOD file with a html or text editor. 8)

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!!!
KennethWinfrey
Registered User
Posts: 13
Joined: Fri Dec 22, 2006 12:22 am
Location: Albuquerque, New Mexico
Contact:

Re: [BETA] Prune Inactive Users

Post by KennethWinfrey »

Now I get
Parse error: syntax error, unexpected T_STRING in /home/.adelson/.../language/lang_english/lang_admin.php on line 823


This is what starts at line 823:

Code: Select all

CREATE TABLE `phpbb_pruned_users` (
  `id` mediumint(8) NOT NULL auto_increment,
  `deleted_by` int(255) NOT NULL,
  `delete_time` int(11) NOT NULL,
  `data` text NOT NULL,
  PRIMARY KEY  (`id`)
);

ALTER TABLE `phpbb_users` ADD `user_last_notified` INT( 11 ) NOT NULL DEFAULT '0';
ALTER TABLE `phpbb_users` ADD `user_prune_flagged` INT( 11 ) NOT NULL DEFAULT '0';

INSERT INTO `phpbb_config` VALUES ( 'prune_users_default', '' );
ALTER TABLE `phpbb_config` CHANGE `config_value` `config_value` TEXT NULL DEFAULT NULL 
I think that this is not really SQL syntax, but I wouldn't even begin to tackle it... :?
kkroo
Registered User
Posts: 729
Joined: Sat Dec 03, 2005 4:49 pm
Contact:

Re: [BETA] Prune Inactive Users

Post by kkroo »

That is because it appears you have pasted the entire install.mod lang_admin.php
My MODs

Need a coder?

Enjoy my Mods? - Image
KennethWinfrey
Registered User
Posts: 13
Joined: Fri Dec 22, 2006 12:22 am
Location: Albuquerque, New Mexico
Contact:

Re: [BETA] Prune Inactive Users

Post by KennethWinfrey »

No, I only copied 73 lines from your install.mod file into my lang_admin.php.
kkroo
Registered User
Posts: 729
Joined: Sat Dec 03, 2005 4:49 pm
Contact:

Re: [BETA] Prune Inactive Users

Post by kkroo »

Well the only part that is suppose to be there is this:

Code: Select all

//
// Prune Inactive Users by kkroo < [email protected] > (Omar Ramadan) http://phpbb-login.sourceforge.net
//

$lang['Click_return_userprune'] = 'Click %sHere%s to return to Prune Inactive Users';
$lang['Prune_users_page_title'] = 'Pruned Users List';
$lang['Pruned_users_page_title'] = 'Prune Inactive Users';
$lang['Pruned_users_page_explain'] = 'This is a list of users who have been pruned by this mod. You can organize this table by clicking on the dotted underlined headings.';
$lang['Prune_users_page_explain'] = 'This is a list of users fetched by the query you created. Select the users that you want to prune below and hit submit. If you would would like to notify the user that his account is inactive, click email on the user\'s row. You can flag or unflag a user by clicking on the flag in the column titled "Flagged" or by selecting them and hit "Flag/Unflag". You can organize this table by clicking on the dotted underlined headings.';
$lang['Notify_selected'] = 'Are you sure you want to notify the selected users?';
$lang['Flag_selected'] = 'Are you sure you want to flag/unflag the selected users?';
$lang['Email_Confirm_message'] = 'Are you sure you want to send a notification message to %s?';
$lang['Flag_Confirm_message'] = 'Are you sure you want to %action %s?';
$lang['Confirm_message'] = 'Are you sure you want to delete these users?';
$lang['Total_pruned_users'] = 'Total Pruned Users';
$lang['Last_visit'] = 'Last Visit';
$lang['Last_login_try'] = 'Last Login Try';
$lang['Last_Notified'] = 'Last Notified';
$lang['Select_all_none'] = 'Select All/None';
$lang['Selected'] = 'Selected';
$lang['Prior'] = 'Prior to';
$lang['Within'] = 'Within';
$lang['Never'] = 'Never';
$lang['Seven_days'] = 'Seven days ago';
$lang['Ten_days'] = 'Ten days ago';
$lang['Two_weeks'] = 'Two weeks ago';
$lang['One_month'] = 'One month ago';
$lang['Two_months'] = 'Two months ago';
$lang['Three_months'] = 'Three months ago';
$lang['Six_months'] = 'Six months ago';
$lang['One_year'] = 'One year ago';

$lang['Old_Version'] = 'Deleted With Old Version';
$lang['Notify_user'] = 'Notify';
$lang['Show_all'] = 'Show All';
$lang['user_regdate'] = 'Registered';
$lang['user_active'] = 'Activated';
$lang['User_Unflag'] = 'Unflag';
$lang['Flag_User'] = 'Flag';
$lang['Flagged'] = 'Flagged';
$lang['Flag'] = 'Flag/Unflag';
$lang['Remember_settings'] = 'Remember Settings';
$lang['user_posts'] = 'Posts';
$lang['Deleted_By'] = 'Deleted By';
$lang['Delete_Date'] = 'Delete Date';
$lang['Prune_users_sql_explain'] = 'Build your search criteria using the form below.';
$lang['Build_Query'] = 'Build Query';
$lang['Build_Your_Query'] = 'Build your query';
$lang['last_visit_explain'] = 'Search for users who either have or have not logged in within the selected period. A "Prior to" selection will include users who have never logged in. Select "Never" in both fields to find only users who have never logged in. To set the time window, also select whether the users you selected should be within the time frame, or prior to it.';
$lang['user_regdate_explain'] = 'Set a limit for the user registration dates. For example, if you use the "Active" check below, you might want to give users a few days to click their activation email first.  The default limit is "Prior to Seven days", meaning that users who have registered WITHIN the last 7 days are EXCLUDED from the search results. To set the time window, also select whether the users you selected should be within the time frame, or prior to it.';
$lang['user_active_explain'] = 'Use this option to search for users who have not activated their accounts, or who have become inactive for some other reason (e.g. they have submitted but not yet validated an email address change).';
$lang['user_posts_explain'] = 'Set a criterion for the user\'s post count. The most common setting is for "zero post" users.';
$lang['Show_all_explain'] = 'By checking the "Active" check, the list will display all the columns, even the ones you didn\'t check the "Active" check for. Otherwise, it will only display the columns you checked.';
$lang['users_flagged_explain'] = 'Use this option to limit the search for users who are or are not flagged. You can flag users to keep track of who notified you to keep their account.';
$lang['users_settings_explain'] = 'Select this box to remember your settings. The next time you load this page, the same settings will automatically be selected.';
$lang['Your_account_is_inactive'] = 'Your account is inactive.';
My MODs

Need a coder?

Enjoy my Mods? - Image
KennethWinfrey
Registered User
Posts: 13
Joined: Fri Dec 22, 2006 12:22 am
Location: Albuquerque, New Mexico
Contact:

Re: [BETA] Prune Inactive Users

Post by KennethWinfrey »

I attempted to search for new users registered (but not been activated) within seven days ago to remove them and got:
General Error
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, user_prune_flagged FROM phpbb_users WHERE `user_regdate` >= '1175201528' AND `user_active` = '0' AND user_id <> 2 AND user_id <> -1 ORDER BY user_id;

Line : 125
File : admin_prune_users.php


Thanks again for all your help thus far. I look forward to showing you my gratitude when this project is complete... :D
kkroo
Registered User
Posts: 729
Joined: Sat Dec 03, 2005 4:49 pm
Contact:

Re: [BETA] Prune Inactive Users

Post by kkroo »

Well it appears you have not executed the SQL queries that were in the install file. In phpmyadmin, execute this:
CREATE TABLE `phpbb_pruned_users` (
`id` mediumint(8) NOT NULL auto_increment,
`deleted_by` int(255) NOT NULL,
`delete_time` int(11) NOT NULL,
`data` text NOT NULL,
PRIMARY KEY (`id`)
);

ALTER TABLE `phpbb_users` ADD `user_last_notified` INT( 11 ) NOT NULL DEFAULT '0';
ALTER TABLE `phpbb_users` ADD `user_prune_flagged` INT( 11 ) NOT NULL DEFAULT '0';

INSERT INTO `phpbb_config` VALUES ( 'prune_users_default', '' );
ALTER TABLE `phpbb_config` CHANGE `config_value` `config_value` TEXT NULL DEFAULT NULL
My MODs

Need a coder?

Enjoy my Mods? - Image
KennethWinfrey
Registered User
Posts: 13
Joined: Fri Dec 22, 2006 12:22 am
Location: Albuquerque, New Mexico
Contact:

Re: [BETA] Prune Inactive Users

Post by KennethWinfrey »

The commands seem to act upon a database called "main." Mine is called "blog."

This is way harder than I thought. I have no interest in hacking away at my message board until Jesus returns.

In all the time I've wasted trying to get this "easy" fix working, I could have deleted the bad users the old fashioned way.

I think I'll just give up now.

Thanks anyway! :?
KennethWinfrey
Registered User
Posts: 13
Joined: Fri Dec 22, 2006 12:22 am
Location: Albuquerque, New Mexico
Contact:

Re: [BETA] Prune Inactive Users

Post by KennethWinfrey »

So, after I got through being frustrated, :evil: I taught myself how to use phpMyAdmin and it worked. :D

So thanks again!
Larzza
Registered User
Posts: 8
Joined: Fri Dec 29, 2006 12:04 am
Location: Sweden

Re: [BETA] Prune Inactive Users

Post by Larzza »

Notification emails sent
[Back]

I have test this on some test-user but...
No mail is sent or ?
I use SMTP not phpbb's Sendmail.
kkroo
Registered User
Posts: 729
Joined: Sat Dec 03, 2005 4:49 pm
Contact:

Re: [BETA] Prune Inactive Users

Post by kkroo »

Either you didn't tick the box of the user you wanted to send a notification to, or your SMTP is mis configured. You can test the configuration by trying to send an email through your board to that user.

I hope that helps

Omar
My MODs

Need a coder?

Enjoy my Mods? - Image
Larzza
Registered User
Posts: 8
Joined: Fri Dec 29, 2006 12:04 am
Location: Sweden

Re: [BETA] Prune Inactive Users

Post by Larzza »

My SMTP works well everyone i my board get mail on PM and Notify on Topic.
For some reason I can't use sendmail from my phpbb, my users don't get any "Notify on Topic"

I have tick the box and if i hold my mouse pointer on button [Nofify] I look at the browser "tray" it say's

Code: Select all

admin_prune_users.php?mode=delete&sid=xxxxxxxxxxxxxxxxxx
and if I hold on Notify table email i see my complete URL:

Code: Select all

/admin/admin_prune_users.php?mode=notify&u=xxxxxxxxxxxxxx





*x=lots of number and stuff
kkroo
Registered User
Posts: 729
Joined: Sat Dec 03, 2005 4:49 pm
Contact:

Re: [BETA] Prune Inactive Users

Post by kkroo »

If you are using the latest version of the MOD, it uses the same exact method of sending emails as the board uses. I practically copied and pasted it to make sure.
My MODs

Need a coder?

Enjoy my Mods? - Image
Larzza
Registered User
Posts: 8
Joined: Fri Dec 29, 2006 12:04 am
Location: Sweden

Re: [BETA] Prune Inactive Users

Post by Larzza »

Yes, 0.5.0
but I discover now that ONLY notify on PM works..

Soething have fu** up with my board.
If I have SMTP only I get mail "Notify on Topic" and PM
and everyone only get mail on PM..

hmm some of my mod have destroy something.
My board is new.

EDIT:
BTW. Registration works well
on both SMTP and sendmail
Post Reply

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