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
This commit is contained in:
mistic100 2012-01-14 15:02:02 +00:00
parent 5ea5350deb
commit a412558492
12 changed files with 69 additions and 16 deletions

View file

@ -285,7 +285,7 @@ jQuery().ready(function(){ldelim}
<br> <br>
<label> <label>
<input type="checkbox" name="send_password_by_mail" checked="checked"> <input type="checkbox" name="send_password_by_mail" checked="checked">
{'Send my password by email'|@translate} {'Send my connection settings by email'|@translate}
</label> </label>
</td> </td>
</tr> </tr>

View file

@ -13,6 +13,7 @@
<label>{'Password'|@translate} <input type="text" name="password"></label> <label>{'Password'|@translate} <input type="text" name="password"></label>
{/if} {/if}
<label>{'Email address'|@translate} <input type="text" name="email"></label> <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>&nbsp; <input class="submit" type="submit" name="submit_add" value="{'Submit'|@translate}"></label> <label>&nbsp; <input class="submit" type="submit" name="submit_add" value="{'Submit'|@translate}"></label>
</fieldset> </fieldset>
</form> </form>

View file

@ -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 | // | user list |
// +-----------------------------------------------------------------------+ // +-----------------------------------------------------------------------+

View file

@ -469,7 +469,10 @@ else
get_l10n_args('Hello %s,', $admin_name), get_l10n_args('Hello %s,', $admin_name),
get_l10n_args('Welcome to your new installation of Piwigo!', ''), get_l10n_args('Welcome to your new installation of Piwigo!', ''),
get_l10n_args('', ''), 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('', ''),
get_l10n_args('Don\'t hesitate to consult our forums for any help: %s', PHPWG_URL), get_l10n_args('Don\'t hesitate to consult our forums for any help: %s', PHPWG_URL),
); );
@ -477,7 +480,7 @@ else
pwg_mail( pwg_mail(
$admin_mail, $admin_mail,
array( array(
'subject' => 'Just another Piwigo gallery', 'subject' => l10n('Just another Piwigo gallery'),
'content' => l10n_args($keyargs_content), 'content' => l10n_args($keyargs_content),
'content_format' => 'text/plain', 'content_format' => 'text/plain',
) )

View file

@ -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 as'] = "Send mail as";
$lang['Send mail on HTML format'] = "Send mail in HTML format"; $lang['Send mail on HTML format'] = "Send mail in HTML format";
$lang['Send mail to users'] = "Send mail to users"; $lang['Send mail to users'] = "Send mail to users";
$lang['Send connection settings by email'] = 'Send connection settings by email';
$lang['Send'] = "Send"; $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 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"; $lang['Set as default theme for unregistered and new users'] = "Set as default theme for unregistered and new users";

View file

@ -307,7 +307,7 @@ $lang['Search'] = "Search";
$lang['search'] = "search"; $lang['search'] = "search";
$lang['searched words : %s'] = "searched words : %s"; $lang['searched words : %s'] = "searched words : %s";
$lang['Sent by'] = "Sent by"; $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['set as album representative'] = "set as album thumbnail";
$lang['Show file metadata'] = "Show file metadata"; $lang['Show file metadata'] = "Show file metadata";
$lang['Show number of comments'] = "Show number of comments"; $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['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 by'] = "Sort by";
$lang['Sort order'] = "Sort order"; $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['Specials'] = "Specials";
$lang['SQL queries in'] = "SQL queries in"; $lang['SQL queries in'] = "SQL queries in";
$lang['stop the slideshow'] = "stop the slideshow"; $lang['stop the slideshow'] = "stop the slideshow";
@ -376,7 +376,10 @@ $lang['xlarge'] = "XLarge";
$lang['xxlarge'] = "XXLarge"; $lang['xxlarge'] = "XXLarge";
$lang['original'] = "Original"; $lang['original'] = "Original";
$lang['Thank you for registering at %s!'] = 'Thank you for registering at %s!'; $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'; $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';
?> ?>

View file

@ -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['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 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['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';
?> ?>

View file

@ -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['Username modification'] = 'Modification du nom d\'utilisateur';
$lang['Hello %s,'] = 'Bonjour %s,'; $lang['Hello %s,'] = 'Bonjour %s,';
$lang['Thank you for registering at %s!'] = 'Merci pour votre inscription sur %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['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['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 password by email'] = 'Recevoir mon mot de passe par email'; $lang['Send my connection settings by email'] = 'Recevoir mes identifiants par email';
?> ?>

View file

@ -843,4 +843,6 @@ $lang['Zoom'] = 'Zoom';
$lang['Resize after upload'] = 'Redimensionner après transfert'; $lang['Resize after upload'] = 'Redimensionner après transfert';
$lang['Photo Sizes'] = 'Tailles de photo'; $lang['Photo Sizes'] = 'Tailles de photo';
$lang['Original Size'] = 'Taille originale'; $lang['Original Size'] = 'Taille originale';
$lang['Send connection settings by email'] = 'Envoyer les identifiants par email';
?> ?>

View file

@ -307,7 +307,7 @@ $lang['search'] = 'recherche';
$lang['Search'] = 'Recherche'; $lang['Search'] = 'Recherche';
$lang['searched words : %s'] = 'mots recherchés : %s'; $lang['searched words : %s'] = 'mots recherchés : %s';
$lang['Sent by'] = 'Envoyé par'; $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['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 file metadata'] = 'Montrer les méta-données du fichier';
$lang['Show number of comments'] = 'Montrer le nombre de commentaires'; $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['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 by'] = 'Trier selon';
$lang['Sort order'] = 'Ordre de tri'; $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['Specials'] = 'Spéciales';
$lang['SQL queries in'] = 'requêtes SQL en'; $lang['SQL queries in'] = 'requêtes SQL en';
$lang['stop the slideshow'] = 'arrêter le diaporama'; $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['Your password has been reset'] = 'Votre mot de passe a été réinitialisé';
$lang['original'] = "Original"; $lang['original'] = "Original";
$lang['Thank you for registering at %s!'] = 'Merci pour votre inscription sur %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['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';
?> ?>

View file

@ -68,7 +68,10 @@ if (isset($_POST['submit']))
get_l10n_args('Hello %s,', $_POST['login']), get_l10n_args('Hello %s,', $_POST['login']),
get_l10n_args('Thank you for registering at %s!', $conf['gallery_title']), get_l10n_args('Thank you for registering at %s!', $conf['gallery_title']),
get_l10n_args('', ''), 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('', ''),
get_l10n_args('If you think you\'ve received this email in error, please contact us at %s', get_webmaster_mail_address()), 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 // log user and redirect

View file

@ -48,7 +48,7 @@
</li> </li>
<li> <li>
<span class="property"> <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> </span>
<input type="checkbox" name="send_password_by_mail" id="send_password_by_mail" value="1" checked="checked"> <input type="checkbox" name="send_password_by_mail" id="send_password_by_mail" value="1" checked="checked">
</li> </li>