Changeset 12886


Ignore:
Timestamp:
Jan 14, 2012, 4:02:02 PM (12 years ago)
Author:
mistic100
Message:

feature:2021 change contents of the mail + add option on admin/user_list

Location:
trunk
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/themes/default/template/install.tpl

    r12885 r12886  
    286286        <label>
    287287          <input type="checkbox" name="send_password_by_mail" checked="checked">
    288           {'Send my password by email'|@translate}
     288          {'Send my connection settings by email'|@translate}
    289289        </label>
    290290      </td>
  • trunk/admin/themes/default/template/user_list.tpl

    r12877 r12886  
    1414                {/if}
    1515                <label>{'Email address'|@translate} <input type="text" name="email"></label>
     16    <label>{'Send connection settings by email'|@translate} <input type="checkbox" name="send_password_by_mail" value="1" checked="checked"></label>
    1617    <label>&nbsp; <input class="submit" type="submit" name="submit_add" value="{'Submit'|@translate}"></label>
    1718  </fieldset>
  • trunk/admin/user_list.php

    r12877 r12886  
    241241    }
    242242  }
     243}
     244
     245// email notification
     246if (
     247  isset($_POST['submit_add'])
     248  and count($page['errors']) == 0 
     249  and !empty($_POST['email'])
     250  and isset($_POST['send_password_by_mail'])
     251  )
     252{
     253  include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php');
     254       
     255  $keyargs_content = array(
     256    get_l10n_args('Hello %s,', $_POST['login']),
     257    get_l10n_args('Thank you for registering at %s!', $conf['gallery_title']),
     258    get_l10n_args('', ''),
     259    get_l10n_args('Here are your connection settings', ''),
     260    get_l10n_args('Username: %s', $_POST['login']),
     261    get_l10n_args('Password: %s', $_POST['password']),
     262    get_l10n_args('Email: %s', $_POST['email']),
     263    get_l10n_args('', ''),
     264    get_l10n_args('If you think you\'ve received this email in error, please contact us at %s', get_webmaster_mail_address()),
     265    );
     266   
     267  pwg_mail(
     268    $_POST['email'],
     269    array(
     270      'subject' => '['.$conf['gallery_title'].'] '.l10n('Registration'),
     271      'content' => l10n_args($keyargs_content),
     272      'content_format' => 'text/plain',
     273      )
     274    );
    243275}
    244276
  • trunk/install.php

    r12885 r12886  
    470470        get_l10n_args('Welcome to your new installation of Piwigo!', ''),
    471471        get_l10n_args('', ''),
    472         get_l10n_args('Here is your password: %s', $admin_pass1),
     472        get_l10n_args('Here are your connection settings', ''),
     473        get_l10n_args('Username: %s', $admin_name),
     474        get_l10n_args('Password: %s', $admin_pass1),
     475        get_l10n_args('Email: %s', $admin_mail),
    473476        get_l10n_args('', ''),
    474477        get_l10n_args('Don\'t hesitate to consult our forums for any help: %s', PHPWG_URL),
     
    478481        $admin_mail,
    479482        array(
    480           'subject' => 'Just another Piwigo gallery',
     483          'subject' => l10n('Just another Piwigo gallery'),
    481484          'content' => l10n_args($keyargs_content),
    482485          'content_format' => 'text/plain',
  • trunk/language/en_UK/admin.lang.php

    r12879 r12886  
    647647$lang['Send mail on HTML format'] = "Send mail in HTML format";
    648648$lang['Send mail to users'] = "Send mail to users";
     649$lang['Send connection settings by email'] = 'Send connection settings by email';
    649650$lang['Send'] = "Send";
    650651$lang['Set as default language for unregistered and new users'] = 'Set as default language for unregistered and new users';
  • trunk/language/en_UK/common.lang.php

    r12885 r12886  
    308308$lang['searched words : %s'] = "searched words : %s";
    309309$lang['Sent by'] = "Sent by";
    310 $lang['Send my password by email'] = 'Send my password by email';
     310$lang['Send my connection settings by email'] = 'Send my connection settings by email';
    311311$lang['set as album representative'] = "set as album thumbnail";
    312312$lang['Show file metadata'] = "Show file metadata";
     
    319319$lang['Sort by'] = "Sort by";
    320320$lang['Sort order'] = "Sort order";
    321 $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!';
     321$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!';
    322322$lang['Specials'] = "Specials";
    323323$lang['SQL queries in'] = "SQL queries in";
     
    377377$lang['original'] = "Original";
    378378$lang['Thank you for registering at %s!'] = 'Thank you for registering at %s!';
    379 $lang['Here is your password: %s'] = 'Here is your password: %s';
     379$lang['Here are your connection settings'] = 'Here are your connection settings';
     380$lang['Password: %s'] = 'Password: %s';
     381$lang['Username: %s'] = 'Username: %s';
     382$lang['Email: %s'] = 'Email: %s';
    380383$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';
    381384
  • trunk/language/fr_CA/admin.lang.php

    r12879 r12886  
    844844$lang['An error has occured during upgrade.'] = 'Une erreur est survenue pendant la mise à jour.';
    845845$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>.';
    846 $lang['Piwigo cannot retrieve upgrade file from server'] = 'Piwigo ne peut pas récupérer le fichier de mise à jour depuis le serveur';
     846$lang['Piwigo cannot retrieve upgrade file from server'] = 'Piwigo ne peut pas récupérer le fichier de mise à jour depuis le serveur';
     847$lang['Send connection settings by email'] = 'Envoyer les identifiants par email';
     848
    847849?>
  • trunk/language/fr_CA/common.lang.php

    r12885 r12886  
    370370$lang['Hello %s,'] = 'Bonjour %s,';
    371371$lang['Thank you for registering at %s!'] = 'Merci pour votre inscription sur %s !';
    372 $lang['Here is your password: %s'] = 'Votre mot de passe est : %s';
     372$lang['Here are your connection settings'] = 'Voici vos identifiants';
     373$lang['Password: %s'] = 'Mot de passe : %s';
     374$lang['Username: %s'] = 'Nom d\'utilisateur : %s';
     375$lang['Email: %s'] = 'Email: %s';
    373376$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';
    374 $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 !';
    375 $lang['Send my password by email'] = 'Recevoir mon mot de passe par email';
     377$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 !';
     378$lang['Send my connection settings by email'] = 'Recevoir mes identifiants par email';
    376379
    377380?>
  • trunk/language/fr_FR/admin.lang.php

    r12879 r12886  
    844844$lang['Photo Sizes'] = 'Tailles de photo';
    845845$lang['Original Size'] = 'Taille originale';
     846$lang['Send connection settings by email'] = 'Envoyer les identifiants par email';
     847
    846848?>
  • trunk/language/fr_FR/common.lang.php

    r12885 r12886  
    308308$lang['searched words : %s'] = 'mots recherchés : %s';
    309309$lang['Sent by'] = 'Envoyé par';
    310 $lang['Send my password by email'] = 'Recevoir mon mot de passe par email';
     310$lang['Send my connection settings by email'] = 'Recevoir mes identifiants par email';
    311311$lang['set as album representative'] = 'Choisir comme représentante de cet album';
    312312$lang['Show file metadata'] = 'Montrer les méta-données du fichier';
     
    319319$lang['Sort by'] = 'Trier selon';
    320320$lang['Sort order'] = 'Ordre de tri';
    321 $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 !';
     321$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 !';
    322322$lang['Specials'] = 'Spéciales';
    323323$lang['SQL queries in'] = 'requêtes SQL en';
     
    370370$lang['original'] = "Original";
    371371$lang['Thank you for registering at %s!'] = 'Merci pour votre inscription sur %s !';
    372 $lang['Here is your password: %s'] = 'Votre mot de passe est : %s';
     372$lang['Here are your connection settings'] = 'Voici vos identifiants';
     373$lang['Password: %s'] = 'Mot de passe : %s';
     374$lang['Username: %s'] = 'Nom d\'utilisateur : %s';
     375$lang['Email: %s'] = 'Email: %s';
    373376$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';
    374377
  • trunk/register.php

    r12885 r12886  
    6969        get_l10n_args('Thank you for registering at %s!', $conf['gallery_title']),
    7070        get_l10n_args('', ''),
    71         get_l10n_args('Here is your password: %s', $_POST['password']),
     71        get_l10n_args('Here are your connection settings', ''),
     72        get_l10n_args('Username: %s', $_POST['login']),
     73        get_l10n_args('Password: %s', $_POST['password']),
     74        get_l10n_args('Email: %s', $_POST['mail_address']),
    7275        get_l10n_args('', ''),
    7376        get_l10n_args('If you think you\'ve received this email in error, please contact us at %s', get_webmaster_mail_address()),
     
    8386        );
    8487       
    85       $_SESSION['page_infos'][] = l10n('Successfully registered, an email with your password has been sent to you. Welcome!');
     88      $_SESSION['page_infos'][] = l10n('Successfully registered, you will soon receive an email with your connection settings. Welcome!');
    8689    }
    8790   
  • trunk/themes/default/template/register.tpl

    r12885 r12886  
    4949      <li>
    5050        <span class="property">
    51           <label for="send_password_by_mail">{'Send my password by email'|@translate}</label>
     51          <label for="send_password_by_mail">{'Send my connection settings by email'|@translate}</label>
    5252        </span>
    5353        <input type="checkbox" name="send_password_by_mail" id="send_password_by_mail" value="1" checked="checked">
Note: See TracChangeset for help on using the changeset viewer.