diff options
author | mistic100 <mistic@piwigo.org> | 2012-01-14 15:02:02 +0000 |
---|---|---|
committer | mistic100 <mistic@piwigo.org> | 2012-01-14 15:02:02 +0000 |
commit | a412558492bf24ee9c39502ac37730ff4bc40177 (patch) | |
tree | 046c7239358a40292d9c02a146eb897972af2c54 | |
parent | 5ea5350deb37777e815248488fd49699c18ab9e2 (diff) |
feature:2021 change contents of the mail + add option on admin/user_list
git-svn-id: http://piwigo.org/svn/trunk@12886 68402e56-0260-453c-a942-63ccdbb3a9ee
-rw-r--r-- | admin/themes/default/template/install.tpl | 2 | ||||
-rw-r--r-- | admin/themes/default/template/user_list.tpl | 1 | ||||
-rw-r--r-- | admin/user_list.php | 32 | ||||
-rw-r--r-- | install.php | 7 | ||||
-rw-r--r-- | language/en_UK/admin.lang.php | 1 | ||||
-rw-r--r-- | language/en_UK/common.lang.php | 9 | ||||
-rw-r--r-- | language/fr_CA/admin.lang.php | 4 | ||||
-rw-r--r-- | language/fr_CA/common.lang.php | 9 | ||||
-rw-r--r-- | language/fr_FR/admin.lang.php | 2 | ||||
-rw-r--r-- | language/fr_FR/common.lang.php | 9 | ||||
-rw-r--r-- | register.php | 7 | ||||
-rw-r--r-- | themes/default/template/register.tpl | 2 |
12 files changed, 69 insertions, 16 deletions
diff --git a/admin/themes/default/template/install.tpl b/admin/themes/default/template/install.tpl index 5fbdcd5b6..58928fb45 100644 --- a/admin/themes/default/template/install.tpl +++ b/admin/themes/default/template/install.tpl @@ -285,7 +285,7 @@ jQuery().ready(function(){ldelim} <br> <label> <input type="checkbox" name="send_password_by_mail" checked="checked"> - {'Send my password by email'|@translate} + {'Send my connection settings by email'|@translate} </label> </td> </tr> diff --git a/admin/themes/default/template/user_list.tpl b/admin/themes/default/template/user_list.tpl index 62f488769..4458f9792 100644 --- a/admin/themes/default/template/user_list.tpl +++ b/admin/themes/default/template/user_list.tpl @@ -13,6 +13,7 @@ <label>{'Password'|@translate} <input type="text" name="password"></label> {/if} <label>{'Email address'|@translate} <input type="text" name="email"></label> + <label>{'Send connection settings by email'|@translate} <input type="checkbox" name="send_password_by_mail" value="1" checked="checked"></label> <label> <input class="submit" type="submit" name="submit_add" value="{'Submit'|@translate}"></label> </fieldset> </form> diff --git a/admin/user_list.php b/admin/user_list.php index 33c3485f1..425c3c698 100644 --- a/admin/user_list.php +++ b/admin/user_list.php @@ -242,6 +242,38 @@ else if ($conf['double_password_type_in_admin'] == false) } } +// email notification +if ( + isset($_POST['submit_add']) + and count($page['errors']) == 0 + and !empty($_POST['email']) + and isset($_POST['send_password_by_mail']) + ) +{ + include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php'); + + $keyargs_content = array( + get_l10n_args('Hello %s,', $_POST['login']), + get_l10n_args('Thank you for registering at %s!', $conf['gallery_title']), + get_l10n_args('', ''), + get_l10n_args('Here are your connection settings', ''), + get_l10n_args('Username: %s', $_POST['login']), + get_l10n_args('Password: %s', $_POST['password']), + get_l10n_args('Email: %s', $_POST['email']), + get_l10n_args('', ''), + get_l10n_args('If you think you\'ve received this email in error, please contact us at %s', get_webmaster_mail_address()), + ); + + pwg_mail( + $_POST['email'], + array( + 'subject' => '['.$conf['gallery_title'].'] '.l10n('Registration'), + 'content' => l10n_args($keyargs_content), + 'content_format' => 'text/plain', + ) + ); +} + // +-----------------------------------------------------------------------+ // | user list | // +-----------------------------------------------------------------------+ diff --git a/install.php b/install.php index 9bbaa6157..1209bcd4a 100644 --- a/install.php +++ b/install.php @@ -469,7 +469,10 @@ else get_l10n_args('Hello %s,', $admin_name), get_l10n_args('Welcome to your new installation of Piwigo!', ''), get_l10n_args('', ''), - get_l10n_args('Here is your password: %s', $admin_pass1), + get_l10n_args('Here are your connection settings', ''), + get_l10n_args('Username: %s', $admin_name), + get_l10n_args('Password: %s', $admin_pass1), + get_l10n_args('Email: %s', $admin_mail), get_l10n_args('', ''), get_l10n_args('Don\'t hesitate to consult our forums for any help: %s', PHPWG_URL), ); @@ -477,7 +480,7 @@ else pwg_mail( $admin_mail, array( - 'subject' => 'Just another Piwigo gallery', + 'subject' => l10n('Just another Piwigo gallery'), 'content' => l10n_args($keyargs_content), 'content_format' => 'text/plain', ) diff --git a/language/en_UK/admin.lang.php b/language/en_UK/admin.lang.php index 5cc716a32..250476327 100644 --- a/language/en_UK/admin.lang.php +++ b/language/en_UK/admin.lang.php @@ -646,6 +646,7 @@ $lang['Send an information email to group members'] = "Send an information email $lang['Send mail as'] = "Send mail as"; $lang['Send mail on HTML format'] = "Send mail in HTML format"; $lang['Send mail to users'] = "Send mail to users"; +$lang['Send connection settings by email'] = 'Send connection settings by email'; $lang['Send'] = "Send"; $lang['Set as default language for unregistered and new users'] = 'Set as default language for unregistered and new users'; $lang['Set as default theme for unregistered and new users'] = "Set as default theme for unregistered and new users"; diff --git a/language/en_UK/common.lang.php b/language/en_UK/common.lang.php index 995d92c60..e6e73cd80 100644 --- a/language/en_UK/common.lang.php +++ b/language/en_UK/common.lang.php @@ -307,7 +307,7 @@ $lang['Search'] = "Search"; $lang['search'] = "search"; $lang['searched words : %s'] = "searched words : %s"; $lang['Sent by'] = "Sent by"; -$lang['Send my password by email'] = 'Send my password by email'; +$lang['Send my connection settings by email'] = 'Send my connection settings by email'; $lang['set as album representative'] = "set as album thumbnail"; $lang['Show file metadata'] = "Show file metadata"; $lang['Show number of comments'] = "Show number of comments"; @@ -318,7 +318,7 @@ $lang['slideshow'] = "slideshow"; $lang['Someone requested that the password be reset for the following user account:'] = 'Someone requested that the password be reset for the following user account:'; $lang['Sort by'] = "Sort by"; $lang['Sort order'] = "Sort order"; -$lang['Successfully registered, an email with your password has been sent to you. Welcome!'] = 'Successfully registered, an email with your password has been sent to you. Welcome!'; +$lang['Successfully registered, you will soon receive an email with your connection settings. Welcome!'] = 'Successfully registered, you will soon receive an email with your connection settings. Welcome!'; $lang['Specials'] = "Specials"; $lang['SQL queries in'] = "SQL queries in"; $lang['stop the slideshow'] = "stop the slideshow"; @@ -376,7 +376,10 @@ $lang['xlarge'] = "XLarge"; $lang['xxlarge'] = "XXLarge"; $lang['original'] = "Original"; $lang['Thank you for registering at %s!'] = 'Thank you for registering at %s!'; -$lang['Here is your password: %s'] = 'Here is your password: %s'; +$lang['Here are your connection settings'] = 'Here are your connection settings'; +$lang['Password: %s'] = 'Password: %s'; +$lang['Username: %s'] = 'Username: %s'; +$lang['Email: %s'] = 'Email: %s'; $lang['If you think you\'ve received this email in error, please contact us at %s'] = 'If you think you\'ve received this email in error, please contact us at %s'; ?>
\ No newline at end of file diff --git a/language/fr_CA/admin.lang.php b/language/fr_CA/admin.lang.php index 7ce9188cb..4da56dc8e 100644 --- a/language/fr_CA/admin.lang.php +++ b/language/fr_CA/admin.lang.php @@ -843,5 +843,7 @@ $lang['By default, Piwigo will create a new websize from the HD (high definition $lang['If no HD is available and if the current websize is bigger than resize dimensions, Piwigo will move it as HD and create a downsized websize photo from it.'] = 'Si la HD n\'est pas disponible et que la version actuelle de la taille web est plus grande que les dimensions ci-dessous, alors Piwigo la considérera comme HD et créera la nouvelle taille web à partir de celle-ci.'; $lang['An error has occured during upgrade.'] = 'Une erreur est survenue pendant la mise à jour.'; $lang['An error has occured during extract. Please check files permissions of your piwigo installation.<br><a href="%s">Click here to show log error</a>.'] = 'Impossible d\'extraire les fichiers. Veuillez vérifier les permissions des fichiers de votre installation.<br><a href="%s">Cliquez ici pour voir le rapport d\'erreur</a>.'; -$lang['Piwigo cannot retrieve upgrade file from server'] = 'Piwigo ne peut pas récupérer le fichier de mise à jour depuis le serveur'; +$lang['Piwigo cannot retrieve upgrade file from server'] = 'Piwigo ne peut pas récupérer le fichier de mise à jour depuis le serveur'; +$lang['Send connection settings by email'] = 'Envoyer les identifiants par email'; + ?>
\ No newline at end of file diff --git a/language/fr_CA/common.lang.php b/language/fr_CA/common.lang.php index c522eaa3e..ccd848a08 100644 --- a/language/fr_CA/common.lang.php +++ b/language/fr_CA/common.lang.php @@ -369,9 +369,12 @@ $lang['Your username has been successfully changed to : %s'] = 'Votre nom d\'uti $lang['Username modification'] = 'Modification du nom d\'utilisateur'; $lang['Hello %s,'] = 'Bonjour %s,'; $lang['Thank you for registering at %s!'] = 'Merci pour votre inscription sur %s !'; -$lang['Here is your password: %s'] = 'Votre mot de passe est : %s'; +$lang['Here are your connection settings'] = 'Voici vos identifiants'; +$lang['Password: %s'] = 'Mot de passe : %s'; +$lang['Username: %s'] = 'Nom d\'utilisateur : %s'; +$lang['Email: %s'] = 'Email: %s'; $lang['If you think you\'ve received this email in error, please contact us at %s'] = 'Si vous pensez avoir reçu cet email par erreur, veuillez nous contacter %s'; -$lang['Successfully registered, an email with your password has been sent to you. Welcome!'] = 'Inscription réussie, un email avec votre mot de passe vient de vous être envoyé. Bienvenue !'; -$lang['Send my password by email'] = 'Recevoir mon mot de passe par email'; +$lang['Successfully registered, you will soon receive an email with your connection settings. Welcome!'] = 'Inscription réussie, vous recevrez bientôt un email avec vos identifiants. Bienvenue !'; +$lang['Send my connection settings by email'] = 'Recevoir mes identifiants par email'; ?>
\ No newline at end of file diff --git a/language/fr_FR/admin.lang.php b/language/fr_FR/admin.lang.php index 95edb4d2b..676a7e207 100644 --- a/language/fr_FR/admin.lang.php +++ b/language/fr_FR/admin.lang.php @@ -843,4 +843,6 @@ $lang['Zoom'] = 'Zoom'; $lang['Resize after upload'] = 'Redimensionner après transfert'; $lang['Photo Sizes'] = 'Tailles de photo'; $lang['Original Size'] = 'Taille originale'; +$lang['Send connection settings by email'] = 'Envoyer les identifiants par email'; + ?>
\ No newline at end of file diff --git a/language/fr_FR/common.lang.php b/language/fr_FR/common.lang.php index b08dbc254..fbef500c2 100644 --- a/language/fr_FR/common.lang.php +++ b/language/fr_FR/common.lang.php @@ -307,7 +307,7 @@ $lang['search'] = 'recherche'; $lang['Search'] = 'Recherche'; $lang['searched words : %s'] = 'mots recherchés : %s'; $lang['Sent by'] = 'Envoyé par'; -$lang['Send my password by email'] = 'Recevoir mon mot de passe par email'; +$lang['Send my connection settings by email'] = 'Recevoir mes identifiants par email'; $lang['set as album representative'] = 'Choisir comme représentante de cet album'; $lang['Show file metadata'] = 'Montrer les méta-données du fichier'; $lang['Show number of comments'] = 'Montrer le nombre de commentaires'; @@ -318,7 +318,7 @@ $lang['slideshow'] = 'diaporama'; $lang['Someone requested that the password be reset for the following user account:'] = 'Quelqu\'un a demandé le renouvellement de votre mot de passe pour l\'utilisateur suivant :'; $lang['Sort by'] = 'Trier selon'; $lang['Sort order'] = 'Ordre de tri'; -$lang['Successfully registered, an email with your password has been sent to you. Welcome!'] = 'Inscription réussie, un email avec votre mot de passe vient de vous être envoyé. Bienvenue !'; +$lang['Successfully registered, you will soon receive an email with your connection settings. Welcome!'] = 'Inscription réussie, vous recevrez bientôt un email avec vos identifiants. Bienvenue !'; $lang['Specials'] = 'Spéciales'; $lang['SQL queries in'] = 'requêtes SQL en'; $lang['stop the slideshow'] = 'arrêter le diaporama'; @@ -369,7 +369,10 @@ $lang['Your username has been successfully changed to : %s'] = 'Votre nom d\'uti $lang['Your password has been reset'] = 'Votre mot de passe a été réinitialisé'; $lang['original'] = "Original"; $lang['Thank you for registering at %s!'] = 'Merci pour votre inscription sur %s !'; -$lang['Here is your password: %s'] = 'Votre mot de passe est : %s'; +$lang['Here are your connection settings'] = 'Voici vos identifiants'; +$lang['Password: %s'] = 'Mot de passe : %s'; +$lang['Username: %s'] = 'Nom d\'utilisateur : %s'; +$lang['Email: %s'] = 'Email: %s'; $lang['If you think you\'ve received this email in error, please contact us at %s'] = 'Si vous pensez avoir reçu cet email par erreur, veuillez nous contacter %s'; ?>
\ No newline at end of file diff --git a/register.php b/register.php index 67736e7af..35a3980e7 100644 --- a/register.php +++ b/register.php @@ -68,7 +68,10 @@ if (isset($_POST['submit'])) get_l10n_args('Hello %s,', $_POST['login']), get_l10n_args('Thank you for registering at %s!', $conf['gallery_title']), get_l10n_args('', ''), - get_l10n_args('Here is your password: %s', $_POST['password']), + get_l10n_args('Here are your connection settings', ''), + get_l10n_args('Username: %s', $_POST['login']), + get_l10n_args('Password: %s', $_POST['password']), + get_l10n_args('Email: %s', $_POST['mail_address']), get_l10n_args('', ''), get_l10n_args('If you think you\'ve received this email in error, please contact us at %s', get_webmaster_mail_address()), ); @@ -82,7 +85,7 @@ if (isset($_POST['submit'])) ) ); - $_SESSION['page_infos'][] = l10n('Successfully registered, an email with your password has been sent to you. Welcome!'); + $_SESSION['page_infos'][] = l10n('Successfully registered, you will soon receive an email with your connection settings. Welcome!'); } // log user and redirect diff --git a/themes/default/template/register.tpl b/themes/default/template/register.tpl index 851e4d150..525d53342 100644 --- a/themes/default/template/register.tpl +++ b/themes/default/template/register.tpl @@ -48,7 +48,7 @@ </li> <li> <span class="property"> - <label for="send_password_by_mail">{'Send my password by email'|@translate}</label> + <label for="send_password_by_mail">{'Send my connection settings by email'|@translate}</label> </span> <input type="checkbox" name="send_password_by_mail" id="send_password_by_mail" value="1" checked="checked"> </li> |