mirror of
https://github.com/Piwigo/Piwigo.git
synced 2025-04-26 11:19:55 +03:00
feature:2021 email notification on user creation, add checkboxes on register and install pages
git-svn-id: http://piwigo.org/svn/trunk@12885 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
34a70eceec
commit
5ea5350deb
7 changed files with 66 additions and 46 deletions
|
@ -278,11 +278,15 @@ jQuery().ready(function(){ldelim}
|
|||
<tr>
|
||||
<td>{'Options'|@translate}</options>
|
||||
<td colspan="2">
|
||||
<label>
|
||||
<input type="checkbox" name="newsletter_subscribe"{if $F_NEWSLETTER_SUBSCRIBE} checked="checked"{/if}>
|
||||
<span class="cluetip" title="{'Piwigo Announcements Newsletter'|@translate}|{'Keep in touch with Piwigo project, subscribe to Piwigo Announcement Newsletter. You will receive emails when a new release is available (sometimes including a security bug fix, it\'s important to know and upgrade) and when major events happen to the project. Only a few emails a year.'|@translate|@htmlspecialchars|@nl2br}">{'Subscribe %s to Piwigo Announcements Newsletter'|@translate|@sprintf:$EMAIL}</span>
|
||||
</label>
|
||||
<br>
|
||||
<label>
|
||||
<input type="checkbox" name="newsletter_subscribe"{if $F_NEWSLETTER_SUBSCRIBE} checked="checked"{/if}>
|
||||
<span class="cluetip" title="{'Piwigo Announcements Newsletter'|@translate}|{'Keep in touch with Piwigo project, subscribe to Piwigo Announcement Newsletter. You will receive emails when a new release is available (sometimes including a security bug fix, it\'s important to know and upgrade) and when major events happen to the project. Only a few emails a year.'|@translate|@htmlspecialchars|@nl2br}">{'Subscribe %s to Piwigo Announcements Newsletter'|@translate|@sprintf:$EMAIL}</span>
|
||||
</label>
|
||||
<br>
|
||||
<label>
|
||||
<input type="checkbox" name="send_password_by_mail" checked="checked">
|
||||
{'Send my password by email'|@translate}
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
41
install.php
41
install.php
|
@ -461,25 +461,28 @@ else
|
|||
log_user($user['id'], false);
|
||||
|
||||
// email notification
|
||||
include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php');
|
||||
|
||||
$keyargs_content = array(
|
||||
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('', ''),
|
||||
get_l10n_args('Don\'t hesitate to consult our forums for any help: %s', PHPWG_URL),
|
||||
);
|
||||
|
||||
pwg_mail(
|
||||
$admin_mail,
|
||||
array(
|
||||
'subject' => 'Just another Piwigo gallery',
|
||||
'content' => l10n_args($keyargs_content),
|
||||
'content_format' => 'text/plain',
|
||||
)
|
||||
);
|
||||
if (isset($_POST['send_password_by_mail']))
|
||||
{
|
||||
include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php');
|
||||
|
||||
$keyargs_content = array(
|
||||
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('', ''),
|
||||
get_l10n_args('Don\'t hesitate to consult our forums for any help: %s', PHPWG_URL),
|
||||
);
|
||||
|
||||
pwg_mail(
|
||||
$admin_mail,
|
||||
array(
|
||||
'subject' => 'Just another Piwigo gallery',
|
||||
'content' => l10n_args($keyargs_content),
|
||||
'content_format' => 'text/plain',
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (count($errors) != 0)
|
||||
|
|
|
@ -307,6 +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['set as album representative'] = "set as album thumbnail";
|
||||
$lang['Show file metadata'] = "Show file metadata";
|
||||
$lang['Show number of comments'] = "Show number of comments";
|
||||
|
|
|
@ -371,6 +371,7 @@ $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['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 terminée, un email avec votre mot de passe vient de vous être envoyé. Bienvenue !';
|
||||
$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';
|
||||
|
||||
?>
|
|
@ -307,6 +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['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';
|
||||
|
@ -317,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 terminée, un email avec votre mot de passe vient de vous être envoyé. Bienvenue !';
|
||||
$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['Specials'] = 'Spéciales';
|
||||
$lang['SQL queries in'] = 'requêtes SQL en';
|
||||
$lang['stop the slideshow'] = 'arrêter le diaporama';
|
||||
|
|
44
register.php
44
register.php
|
@ -60,30 +60,34 @@ if (isset($_POST['submit']))
|
|||
if (count($page['errors']) == 0)
|
||||
{
|
||||
// email notification
|
||||
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 is your password: %s', $_POST['password']),
|
||||
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['mail_address'],
|
||||
array(
|
||||
'subject' => '['.$conf['gallery_title'].'] '.l10n('Registration'),
|
||||
'content' => l10n_args($keyargs_content),
|
||||
'content_format' => 'text/plain',
|
||||
)
|
||||
);
|
||||
if (isset($_POST['send_password_by_mail']) and isset($_POST['mail_address']))
|
||||
{
|
||||
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 is your password: %s', $_POST['password']),
|
||||
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['mail_address'],
|
||||
array(
|
||||
'subject' => '['.$conf['gallery_title'].'] '.l10n('Registration'),
|
||||
'content' => l10n_args($keyargs_content),
|
||||
'content_format' => 'text/plain',
|
||||
)
|
||||
);
|
||||
|
||||
$_SESSION['page_infos'][] = l10n('Successfully registered, an email with your password has been sent to you. Welcome!');
|
||||
}
|
||||
|
||||
// log user and redirect
|
||||
$user_id = get_userid($_POST['login']);
|
||||
log_user($user_id, false);
|
||||
$_SESSION['page_infos'][] = l10n('Successfully registered, an email with your password has been sent to you. Welcome!');
|
||||
redirect(make_index_url());
|
||||
}
|
||||
$registration_post_key = get_ephemeral_key(2);
|
||||
|
|
|
@ -46,6 +46,12 @@
|
|||
({'useful when password forgotten'|@translate})
|
||||
{/if}
|
||||
</li>
|
||||
<li>
|
||||
<span class="property">
|
||||
<label for="send_password_by_mail">{'Send my password by email'|@translate}</label>
|
||||
</span>
|
||||
<input type="checkbox" name="send_password_by_mail" id="send_password_by_mail" value="1" checked="checked">
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</fieldset>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue