User Reminder

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in the Customisations Database.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTICE: This forum is only for the announcement of new releases and/or updates of MODs. Any MOD support should be obtained through the Customisations Database in the support area designated for each MOD.

A direct link to support for each MOD is in the first post of the respective topic.
CocoVFR
Registered User
Posts: 58
Joined: Fri Feb 01, 2008 12:56 pm

Re: User Reminder

Post by CocoVFR »

lefty74 wrote:have a look in includes/acp/acp_user_reminder.php

thats where you would need to add it.
I've done it !!! :D :D
It's work well, but not so easy. If anyone want to know, i've give all the modification to do.
Lefty74, if you want, i put all the code here that everyone can apply to your mod. :D
Badal
Registered User
Posts: 57
Joined: Fri Apr 13, 2007 5:28 pm

Re: User Reminder

Post by Badal »

i am facing this error when i click on 2nd reminder option.. any suggestion plz?

Code: Select all

SELECT * FROM phpbb_users WHERE user_id <> '' AND user_type NOT IN (2, 1) AND ((user_reminder_zero_poster < 1214796152 AND user_reminder_zero_poster > 0) OR (user_reminder_inactive > 0 AND user_reminder_inactive < 1214796152) OR (user_reminder_not_logged_in > 0 AND user_reminder_not_logged_in < 1214796152)) ORDER BY user_lastvisit DESC
User avatar
lefty74
Registered User
Posts: 3649
Joined: Wed Sep 14, 2005 8:26 pm
Location: NL
Contact:

Re: User Reminder

Post by lefty74 »

CocoVFR wrote:
lefty74 wrote:have a look in includes/acp/acp_user_reminder.php

thats where you would need to add it.
I've done it !!! :D :D
It's work well, but not so easy. If anyone want to know, i've give all the modification to do.
Lefty74, if you want, i put all the code here that everyone can apply to your mod. :D
congrats. :) i leave that up to you but i wont be doing any support if people have problems with your code.
Badal wrote:i am facing this error when i click on 2nd reminder option.. any suggestion plz?

Code: Select all

SELECT * FROM phpbb_users WHERE user_id <> '' AND user_type NOT IN (2, 1) AND ((user_reminder_zero_poster < 1214796152 AND user_reminder_zero_poster > 0) OR (user_reminder_inactive > 0 AND user_reminder_inactive < 1214796152) OR (user_reminder_not_logged_in > 0 AND user_reminder_not_logged_in < 1214796152)) ORDER BY user_lastvisit DESC
could you please post the error message you are getting?
lefty74
zoocrew.eu - help us save our wildlife
My MODS | Due to lack of time I unfortunately am unable to work on my mods anymore, anyone who has ideas to improve them and would like to take any of them over, please PM me.
Badal
Registered User
Posts: 57
Joined: Fri Apr 13, 2007 5:28 pm

Re: User Reminder

Post by Badal »

Actually due to this mod error my board was down. so i uninstall your mod...but i wish to install this mod again..beacons your mod is very cool..!
User avatar
IPB_Refugee
Registered User
Posts: 1290
Joined: Fri Jul 07, 2006 2:25 pm
Location: Austria
Name: Wolfgang Weber

Re: User Reminder

Post by IPB_Refugee »

Your board was down due to an error in ACP? :shock: A very dangerous MOD, indeed. Bad boy, lefty! ;)
glosbobby
Registered User
Posts: 33
Joined: Fri Mar 14, 2008 5:31 pm

Re: User Reminder

Post by glosbobby »

Hi, I really have no idea how to install this mod. Is there anybody that will do it for me. I will pay. Many thanks
User avatar
lefty74
Registered User
Posts: 3649
Joined: Wed Sep 14, 2005 8:26 pm
Location: NL
Contact:

Re: User Reminder

Post by lefty74 »

Badal wrote:Actually due to this mod error my board was down. so i uninstall your mod...but i wish to install this mod again..beacons your mod is very cool..!
IPB_Refugee wrote:Your board was down due to an error in ACP? :shock: A very dangerous MOD, indeed. Bad boy, lefty! ;)
:cry:
badal, please try again, let me know if you run into problems again and paste the error code this time ;) hope it wont be necessary though
glosbobby wrote:Hi, I really have no idea how to install this mod. Is there anybody that will do it for me. I will pay. Many thanks
if you download the zip file and extract it, you will find an install.xml file. open that with your browser and you will see installation instructions... ;)
lefty74
zoocrew.eu - help us save our wildlife
My MODS | Due to lack of time I unfortunately am unable to work on my mods anymore, anyone who has ideas to improve them and would like to take any of them over, please PM me.
glosbobby
Registered User
Posts: 33
Joined: Fri Mar 14, 2008 5:31 pm

Re: User Reminder

Post by glosbobby »

I really am a complete novice. Its gets beyond me when I have to change mysql.
CocoVFR
Registered User
Posts: 58
Joined: Fri Feb 01, 2008 12:56 pm

Re: User Reminder

Post by CocoVFR »

How to add "Deactivate user" to this mod:

Create file "confirm_body_user_reminder_deactivate.html" in adm\Style\

Code: Select all

<!-- INCLUDE overall_header.html -->

<form id="confirm" method="post" action="{S_CONFIRM_ACTION}">

<fieldset>
	<h1>{MESSAGE_TITLE}</h1>
	<p>{MESSAGE_TEXT}</p>


	<dl>
		<dt>{L_EMAIL_DEACTIVATE_USERS}:</dt>
		<dd>
		<input type="checkbox" name="email_deactivate" value="1" />
		</dd>
	</dl>

	{S_HIDDEN_FIELDS}

	<div style="text-align: center;">
		<input type="submit" name="confirm" value="{L_YES}" class="button2" />&nbsp; 
		<input type="submit" name="cancel" value="{L_NO}" class="button2" />
	</div>

</fieldset>
		
</form>

<!-- INCLUDE overall_footer.html -->
Create file "user_reminder_deactivate_notify.txt" in Language\xx\email\
Take an other email there to inspirate you to make the content of this file.

In Includes\acp\acp_user_reminder.php
Before

Code: Select all

case 'user_protect':
Add

Code: Select all

				// user deactivate
				case 'user_deactivate':
					// lets just be sure that only an admin with user delete rights is here
					if ( !$auth->acl_get('a_userdel'))
					{
						trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING);
					}
					
					if ( !function_exists('user_active_flip'))
					{
						include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
					}
					if (sizeof($mark))
					{
						if (confirm_box(true))
						{
							$email_deactivate = request_var('email_deactivate', 0);
							$sql_id = ' IN (' . implode(', ', $mark) . ')';
							$sql = 'SELECT *
								FROM ' . USERS_TABLE . " 
								WHERE user_id $sql_id";
							$result = $db->sql_query($sql);
	
							$username_ary = $username_neg_ary = $user_list_ary = array();
							//$delete_type = ($config['user_reminder_delete_choice'] == RETAIN_POSTS) ? 'retain' : 'remove';
							while ($row = $db->sql_fetchrow($result))
							{
								// Some basic rules, you can't delete a founder, the guest user(should not happen anyway but better be sure) or yourself ;P
								if ($row['user_type'] != USER_FOUNDER || ($row['user_id'] != (ANONYMOUS || $user->data['user_id'])) )
								{
	
									$username_ary[] = (string) $row['username_clean'];
									user_active_flip('deactivate', $row['user_id']);
									if ($email_deactivate && ($row['user_allow_massemail']  || $config['user_reminder_ignore_no_email'] == OVERRIDE) && trim($row['user_email']))
									{
										$user_list_ary[] = array(
											'method'	=> $row['user_notify_type'],
											'email'		=> $row['user_email'],
											'jabber'	=> $row['user_jabber'],
											'name'		=> $row['username'],
											'lang'		=> $row['user_lang']
										);
									}
								}
								else 
								{
									$username_neg_ary[] = (string) $row['username_clean'];
								}
							}	
							$db->sql_freeresult($result);
			
							if (sizeof($username_ary))
							{
	
								if(!function_exists('send_reminder_emails'))
								{
	    							include($phpbb_root_path . 'includes/functions_user_reminder.' . $phpEx);
								}
	    						send_reminder_emails($user_list_ary, 'user_reminder_deactivate_notify');
	
								$message = $user->lang['USERS_DEACTIVATED'];
								$message .= sizeof($username_neg_ary) ? '<br />' . sprintf($user->lang['ERROR_USERS_DEACTIVATED'], implode(', ', $username_neg_ary)) : '';
								
								add_log('admin', 'LOG_USER_DEACTIVATED', implode(', ', $username_ary));
								trigger_error($message . adm_back_link($this->u_action));
							}
							else 
							{
								trigger_error((sprintf($user->lang['ERROR_USERS_DEACTIVATED'], implode(', ', $username_neg_ary)))  . adm_back_link($this->u_action), E_USER_WARNING);
							}
						}
						else
						{
							
							$message = $user->lang['DEACTIVATE_USER_CONFIRM_OPERATION'];
							$message .= $user->lang['CONFIRM_OPERATION'];
							confirm_box(false, $message, build_hidden_fields(array(
								'mark'		=> $mark,
								'action'	=> $action)), 'confirm_body_user_reminder_deactivate.html'
							);
						}
					}		
				break;
				// user deactivate end
Search

Code: Select all

array($case => 'REMINDER', $case . '_clear' => 'CLEAR', 'user_protect' => 'PROTECT_USER', 'user_delete' => 'DELETE_USER'
In line add after

Code: Select all

, 'user_deactivate' => 'DEACTIVATE_USER'
In language\xx\mods\acp_user_reminder.php
Search

Code: Select all

'DELETE_USER'		=> 'Supprime l\'utilisateur',
Add after on a blanck line

Code: Select all

'DEACTIVATE_USER'	=> 'Desactive l\'utilisateur',
Search

Code: Select all

'EMAIL_DELETED_USERS' 				=> 'Envoyer un message au(x) membre(s) supprimer ?',
Add after on a blanck line

Code: Select all

'EMAIL_DEACTIVATE_USERS'			=> 'Envoyer un message au(x) membre(s) désactiver ?',
Search

Code: Select all

'ERROR_USERS_DELETED'	=> 'Le(s) membre(s) suivant ne peut(peuvent) pas etre supprimer:<br/> %s',
Add after on a blanck line

Code: Select all

'ERROR_USERS_DEACTIVATED' => 'Le(s) membre(s) suivant ne peut (peuvent) pas être desactivés:<br/> %s',
Search

Code: Select all

'DELETE_USER_CONFIRM_OPERATION' 	=> 'Vous avez choisi de supprimer cet(ces) utilisateur(s). <strong>Cette opération est irréversible une fois lancé.</strong><br/>',
Add after on a blanck line

Code: Select all

'DEACTIVATE_USER_CONFIRM_OPERATION'	=> 'Vous avez choisi de désactivé cet(ces) utilisateur(s)',
In Language\xx\acp\common.php
Search

Code: Select all

'LOG_USER_WARNING_BODY'		=> '<strong>Un avertissement a été établi par l'utilisateur</strong><br /> %s',
Add after on a blanck line

Code: Select all

'LOG_USER_DEACTIVATED'		=> '<strong>Désactivation d\'un utilisateur</strong><br /> %s',
That's all. Purge cache, refresh all your template, and test.
I think i've say everything, but because i make this modification from the scratch, perhaps i've missing something. Don't hesitate to say if anything is wrong.
Every text is in French, beacause i'm French, so you probably have to translate them.
Last edited by CocoVFR on Mon Jul 21, 2008 9:49 am, edited 1 time in total.
updown
Registered User
Posts: 542
Joined: Sat Jan 05, 2008 6:53 am

Re: User Reminder

Post by updown »

Thanks for this hack, I'll use it when I find some time for implementing!
CocoVFR wrote:

Code: Select all

send_reminder_emails($user_list_ary, 'user_reminder_deactivate_notify');
I think i've say everything, but because i make this modification from the scratch, perhaps i've missing something.
While reading your code, I think you forgot to mention to create a new text-file

"user_reminder_deactivate_notify.txt"

in the folder

language/[lang]/email/

for emailing to the deactivated users.

;)
User avatar
WhiteWolfSix
Registered User
Posts: 258
Joined: Sun May 15, 2005 5:43 am

Re: User Reminder

Post by WhiteWolfSix »

CocoVFR, I do not understand French, so please, use English in the language files.
Image
WhiteWolfSix (WW6)
User avatar
IPB_Refugee
Registered User
Posts: 1290
Joined: Fri Jul 07, 2006 2:25 pm
Location: Austria
Name: Wolfgang Weber

Re: User Reminder

Post by IPB_Refugee »

This demand might not be really fair in this very early case, but it's your decision, of course.
CocoVFR
Registered User
Posts: 58
Joined: Fri Feb 01, 2008 12:56 pm

Re: User Reminder

Post by CocoVFR »

WhiteWolfSix wrote:CocoVFR, I do not understand French, so please, use English in the language files.
There is only 10 sentences with a few word. Google would translate this easily and my english is not so good to give you a good translation.
And, i make some work to understand english. Why not you ?
CocoVFR
Registered User
Posts: 58
Joined: Fri Feb 01, 2008 12:56 pm

Re: User Reminder

Post by CocoVFR »

updown wrote:Thanks for this hack, I'll use it when I find some time for implementing!
CocoVFR wrote:

Code: Select all

send_reminder_emails($user_list_ary, 'user_reminder_deactivate_notify');
I think i've say everything, but because i make this modification from the scratch, perhaps i've missing something.
While reading your code, I think you forgot to mention to create a new text-file

"user_reminder_deactivate_notify.txt"

in the folder

language/[lang]/email/

for emailing to the deactivated users.

;)
Yes... :oops: Sorry about that. I've edited my post to correct this point.
Thank's
User avatar
WhiteWolfSix
Registered User
Posts: 258
Joined: Sun May 15, 2005 5:43 am

Re: User Reminder

Post by WhiteWolfSix »

CocoVFR wrote:And, i make some work to understand english. Why not you ?
I did "my homework" too. English is my second language. :P I speak three other languages but, I really apologize, I can't speak French.
Image
WhiteWolfSix (WW6)
Locked

Return to “[3.0.x] MOD Database Releases”