Changeset 8271
- Timestamp:
- Dec 23, 2010, 11:24:37 PM (13 years ago)
- Location:
- extensions/LCAS/trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/LCAS/trunk/admin/LCAS_admin.php
r8257 r8271 29 29 $version = $plugin['version']; 30 30 31 if (isset($_POST['submit']) and !is_adviser() and isset($_POST['LCAS_Case_Sensitive']) and isset($_POST['LCAS_Accent_Sensitive']) )31 if (isset($_POST['submit']) and !is_adviser() and isset($_POST['LCAS_Case_Sensitive']) and isset($_POST['LCAS_Accent_Sensitive']) and isset($_POST['LCAS_Mail'])) 32 32 { 33 33 … … 38 38 $_POST['LCAS_Case_Sensitive'], 39 39 $_POST['LCAS_Accent_Sensitive'], 40 $_POST['LCAS_Mail'], 40 41 $_POST['LCAS_MailText']); 41 42 … … 89 90 90 91 pwg_query($query); 91 92 93 if (isset($conf_LCAS[2]) and $conf_LCAS[2] = 'true') 94 { 95 LCAS_SendMail($lcas_UserToUpdate, $_POST['user-'.$lcas_UserToUpdate]); 96 } 97 92 98 array_push($page['infos'], l10n('LCAS_Info_userlist_username_renamed')); 93 99 } … … 97 103 } 98 104 } 99 100 105 101 106 … … 166 171 167 172 173 // +-----------------------------------------------------------------------+ 174 // | templates init | 175 // +-----------------------------------------------------------------------+ 168 176 $template->assign( 169 177 array( 170 'LCAS_VERSION' => $version, 171 'LCAS_PATH' => LCAS_PATH, 172 'PWG_insensitive_case_logon' => $conf['insensitive_case_logon']? 'true' : 'false', 173 'LCAS_Case_Sensitive_TRUE' => $conf_LCAS[0]=='true' ? 'checked="checked"' : '' , 174 'LCAS_Case_Sensitive_FALSE' => $conf_LCAS[0]=='false' ? 'checked="checked"' : '' , 175 'LCAS_Accent_Sensitive_TRUE' => $conf_LCAS[1]=='true' ? 'checked="checked"' : '' , 176 'LCAS_Accent_Sensitive_FALSE' => $conf_LCAS[1]=='false' ? 'checked="checked"' : '' , 177 'LCAS_MAILTEXT' => $conf_LCAS[2] 178 'LCAS_VERSION' => $version, 179 'LCAS_PATH' => LCAS_PATH, 180 'PWG_insensitive_case_logon' => $conf['insensitive_case_logon']? 'true' : 'false', 181 'LCAS_Case_Sensitive_TRUE' => $conf_LCAS[0]=='true' ? 'checked="checked"' : '' , 182 'LCAS_Case_Sensitive_FALSE' => $conf_LCAS[0]=='false' ? 'checked="checked"' : '' , 183 'LCAS_Accent_Sensitive_TRUE' => $conf_LCAS[1]=='true' ? 'checked="checked"' : '' , 184 'LCAS_Accent_Sensitive_FALSE' => $conf_LCAS[1]=='false' ? 'checked="checked"' : '' , 185 'LCAS_MAIL_TRUE' => $conf_LCAS[2]=='true' ? 'checked="checked"' : '' , 186 'LCAS_MAIL_FALSE' => $conf_LCAS[2]=='false' ? 'checked="checked"' : '' , 187 'LCAS_MAILTEXT' => $conf_LCAS[3] 178 188 ) 179 189 ); -
extensions/LCAS/trunk/admin/template/global.tpl
r8257 r8271 64 64 <br><br> 65 65 <input type="radio" value="false" {$LCAS_Case_Sensitive_FALSE} name="LCAS_Case_Sensitive"> 66 {'LCAS_ Case_Sensitive_false'|@translate}<br>66 {'LCAS_DisableOption'|@translate}<br> 67 67 <input type="radio" value="true" {$LCAS_Case_Sensitive_TRUE} name="LCAS_Case_Sensitive"> 68 {'LCAS_ Case_Sensitive_true'|@translate}68 {'LCAS_EnableOption'|@translate} 69 69 <br><br> 70 70 </li> … … 76 76 <br><br> 77 77 <input type="radio" value="false" {$LCAS_Accent_Sensitive_FALSE} name="LCAS_Accent_Sensitive"> 78 {'LCAS_ Accent_Sensitive_false'|@translate}<br>78 {'LCAS_DisableOption'|@translate}<br> 79 79 <input type="radio" value="true" {$LCAS_Accent_Sensitive_TRUE} name="LCAS_Accent_Sensitive"> 80 {'LCAS_ Accent_Sensitive_true'|@translate}<br>80 {'LCAS_EnableOption'|@translate}<br> 81 81 <br><br> 82 82 </li> 83 83 84 84 <li> 85 <label class="cluetip" title="{'LCAS_ Email_Customization'|translate}|{'LCAS_Email_Customization_d'|translate}">86 {'LCAS_Mail Text'|@translate}85 <label class="cluetip" title="{'LCAS_MailTitle'|translate}|{'LCAS_MailTitle_d'|translate}"> 86 {'LCAS_Mail'|@translate} 87 87 </label> 88 88 <br><br> 89 <textarea class="LCAS_Mailtextfields" name="LCAS_MailText" id="LCAS_MailText" rows="10" {$TAG_INPUT_ENABLED}>{$LCAS_MAILTEXT}</textarea> 90 <br><br> 89 <input type="radio" value="false" {$LCAS_MAIL_FALSE} name="LCAS_Mail"> 90 {'LCAS_DisableOption'|@translate}<br> 91 <input type="radio" value="true" {$LCAS_MAIL_TRUE} name="LCAS_Mail"> 92 {'LCAS_EnableOption'|@translate}<br> 93 <br><br> 94 95 <ul> 96 <li> 97 <label class="cluetip" title="{'LCAS_Email_Customization'|translate}|{'LCAS_Email_Customization_d'|translate}"> 98 {'LCAS_MailText'|@translate} 99 </label> 100 <br><br> 101 <textarea class="LCAS_Mailtextfields" name="LCAS_MailText" id="LCAS_MailText" rows="10" {$TAG_INPUT_ENABLED}>{$LCAS_MAILTEXT}</textarea> 102 <br><br> 103 </li> 104 </ul> 91 105 </li> 92 106 </ul> … … 148 162 <th>{'LCAS_Compare_value_h'|@translate}</th> 149 163 <th>{'LCAS_Update_h'|@translate}</th> 150 <th>{'LCAS_Notify_h'|@translate}</th>151 164 </tr> 152 165 </thead> … … 163 176 {/if} 164 177 <td style="text-align:center;"><a href="javascript:UpdateAUser({$user.ID});">{'LCAS_Update_User'|@translate}</a></td> 165 <td style="text-align:center;"><a href="javascript:alert('to do - {$user.ID}');">{'LCAS_Send_Email'|@translate}</a></td>166 178 {foreach from=$user.plugin_columns item=data} 167 179 <td>{$data}</td> -
extensions/LCAS/trunk/include/functions.inc.php
r8217 r8271 621 621 622 622 623 /* Function called from main.inc.php to send validation email */624 function LCAS_SendMail 2User($typemail, $id, $username, $password, $email, $confirm)623 /* Function called from LCAS_admin.php to send notification email */ 624 function LCAS_SendMail($id, $username) 625 625 { 626 626 global $conf; … … 629 629 630 630 include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php'); 631 632 $infos1_perso = "";633 $infos2_perso = "";634 631 635 632 /* We have to get the user's language in database */ … … 656 653 } 657 654 658 switch($typemail) 659 { 660 case 1: 661 $subject = '['.$conf['gallery_title'].'] '.l10n_args(get_l10n_args('Add of %s', stripslashes($username))); 662 $password = $password <> '' ? $password : l10n('LCAS_empty_pwd'); 663 664 if (isset($conf_LCAS[9]) and $conf_LCAS[9] <> '') 665 { 666 if (function_exists('get_user_language_desc')) 667 { 668 $infos1_perso = get_user_language_desc($conf_LCAS[9])."\n\n"; 669 } 670 else $infos1_perso = l10n($conf_LCAS[9])."\n\n"; 671 } 672 673 break; 674 675 case 2: 676 $subject = '['.$conf['gallery_title'].'] '.l10n_args(get_l10n_args('Update of %s', stripslashes($username))); 677 $password = $password <> '' ? $password : l10n('LCAS_empty_pwd'); 678 679 break; 680 681 case 3: 682 $subject = '['.$conf['gallery_title'].'] '.l10n_args(get_l10n_args('Update of %s', stripslashes($username))); 683 $password = $password <> '' ? $password : l10n('LCAS_no_update_pwd'); 684 685 break; 686 } 687 688 if (isset($conf_LCAS[0]) and $conf_LCAS[0] == 'true') 689 { 690 $infos1 = array( 691 get_l10n_args('infos_mail %s', stripslashes($username)), 692 get_l10n_args('User: %s', stripslashes($username)), 693 get_l10n_args('Password: %s', $password), 694 get_l10n_args('Email: %s', $email), 695 get_l10n_args('', ''), 696 ); 697 } 698 699 700 if ( isset($conf_LCAS[1]) and $conf_LCAS[1] == 'true' and $confirm) 701 { 702 $infos2 = array 703 ( 704 get_l10n_args('Link: %s', AddConfirmMail($id, $email)), 705 get_l10n_args('', ''), 706 ); 707 708 if (isset($conf_LCAS[10]) and $conf_LCAS[10] <> '') 655 $subject = '['.$conf['gallery_title'].'] '.l10n_args(get_l10n_args('Username_updated_for_%s', stripslashes($username))); 656 657 if (isset($conf_LCAS[3]) and $conf_LCAS[3] <> '') 658 { 659 if (function_exists('get_user_language_desc')) 709 660 { 710 if (function_exists('get_user_language_desc')) 711 { 712 $infos2_perso = get_user_language_desc($conf_LCAS[10])."\n\n"; 713 } 714 else $infos2_perso = l10n($conf_LCAS[10])."\n\n"; 661 $customtxt = get_user_language_desc($conf_LCAS[3])."\n\n"; 715 662 } 716 } 717 718 /* Sending the email with subject and contents */ 663 else $customtxt = l10n($conf_LCAS[3])."\n\n"; 664 } 665 666 /* Send the email with subject and contents */ 719 667 pwg_mail($email, array( 720 668 'subject' => $subject, 721 'content' => ( isset($infos1) ? $infos1_perso.l10n_args($infos1)."\n\n" : "").(isset($infos2) ? $infos2_perso.l10n_args($infos2)."\n\n" : "").get_absolute_root_url(),669 'content' => ($customtxt), 722 670 )); 723 671 -
extensions/LCAS/trunk/language/en_UK/help/plugin.lang.php
r8257 r8271 5 5 global $lang; 6 6 7 /*TODO*/$lang['LCAS_sensitiveTitle'] = 'Sensibilité à l\'enregistrement et la connexion';7 /*TODO*/$lang['LCAS_sensitiveTitle'] = 'Sensibilités à l\'enregistrement et l\'identification'; 8 8 /*TODO*/$lang['LCAS_sensitiveTitle_d'] = ' 9 Piwigo permet de rendre insensible à la casse mais ne gère pas l\'insensibilité aux accents, et ceci uniquement à l\'inscription des nouveaux utilisateurs. LCAS apporte une gestion plus approfondie des insensibilités à l\'inscription et l\'identification des utilisateurs. Les options suivantes sont proposées:<br><br> 9 10 - Noms d\'utilisateur sensible ou non à la casse<br> 10 - Noms d\'utilisateur ensible ou non aux accents<br> 11 - Noms d\'utilisateur sensible ou non aux accents<br> 12 - Personnalisation du texte de l\'email de notification<br><br> 13 <b style="color: red;">Important : L\'option de Piwigo "$conf[\'insensitive_case_logon\']" doit être activée pour un fonctionnement optimal.</b> 11 14 '; 12 15 /*TODO*/$lang['LCAS_caseSensitiveTitle'] = 'La casse'; … … 36 39 37 40 /*TODO*/$lang['LCAS_Email_Customization'] = 'Personnalisation de la notification par email'; 38 /*TODO*/$lang['LCAS_Email_Customization_d'] = 'Si vous souhaitez utiliser la notification par email des utilisateurs que vous avez renommés dans le tableau de vérification, vous pouvez personnaliser le texte à envoyer. Utiliser les balises [lang] pour une personnalisation multi-langues si le plugin Extended Description est actif.'; 41 /*TODO*/$lang['LCAS_Email_Customization_d'] = 'Vous pouvez personnaliser le texte à envoyer lors de la notification. Utilisez les balises [lang] pour une personnalisation multi-langues si le plugin Extended Description est actif.'; 42 43 /*TODO*/$lang['LCAS_MailTitle'] = 'Notification par email'; 44 /*TODO*/$lang['LCAS_MailTitle_d'] = 'Choisissez ici si un email de notification doit être envoyé automatiquement aux utilisateurs dont le login dû être modifié pour correspondre aux nouvelles règles de sensibilité.'; 39 45 ?> -
extensions/LCAS/trunk/language/en_UK/plugin.lang.php
r8257 r8271 11 11 12 12 $lang['LCAS_Case_Sensitive'] = 'Case insensitivity :'; 13 $lang['LCAS_Case_Sensitive_false'] = ' Enable (default value)';14 $lang['LCAS_Case_Sensitive_true'] = ' Disable';15 13 16 14 $lang['LCAS_Accent_Sensitive'] = 'Accents insensivity :'; 17 $lang['LCAS_Accent_Sensitive_false'] = ' Enable (default value)';18 $lang['LCAS_Accent_Sensitive_true'] = ' Disable';19 15 20 16 $lang['LCAS_currentPWGConfigHeader'] = 'Current Piwigo\'s setting'; … … 58 54 59 55 $lang['LCAS_PluginSupport'] = 'Official plugin support'; 56 57 $lang['LCAS_Mail'] = 'Notification par email'; 58 59 $lang['LCAS_DisableOption'] = ' Disable (default value)'; 60 $lang['LCAS_EnableOption'] = ' Enable'; 61 62 /* Email subject */ 63 $lang['Username_updated_for_%s'] = 'Username update for %s'; 60 64 ?> -
extensions/LCAS/trunk/language/fr_FR/help/plugin.lang.php
r8257 r8271 36 36 37 37 $lang['LCAS_Email_Customization'] = 'Personnalisation de la notification par email'; 38 $lang['LCAS_Email_Customization_d'] = 'Si vous souhaitez utiliser la notification par email des utilisateurs que vous avez renommés dans le tableau de vérification, vous pouvez personnaliser le texte à envoyer. Utiliser les balises [lang] pour une personnalisation multi-langues si le plugin Extended Description est actif.'; 38 $lang['LCAS_Email_Customization_d'] = 'Vous pouvez personnaliser le texte à envoyer lors de la notification. Utilisez les balises [lang] pour une personnalisation multi-langues si le plugin Extended Description est actif.'; 39 40 $lang['LCAS_MailTitle'] = 'Notification par email'; 41 $lang['LCAS_MailTitle_d'] = 'Choisissez ici si un email de notification doit être envoyé automatiquement aux utilisateurs dont le login dû être modifié pour correspondre aux nouvelles règles de sensibilité.'; 39 42 ?> -
extensions/LCAS/trunk/language/fr_FR/plugin.lang.php
r8257 r8271 11 11 12 12 $lang['LCAS_Case_Sensitive'] = 'Insensible à la casse :'; 13 $lang['LCAS_Case_Sensitive_false'] = ' Désactiver (valeur par défaut)';14 $lang['LCAS_Case_Sensitive_true'] = ' Activer';15 13 16 14 $lang['LCAS_Accent_Sensitive'] = 'Insensible aux accents :'; 17 $lang['LCAS_Accent_Sensitive_false'] = ' Désactiver (valeur par défaut)';18 $lang['LCAS_Accent_Sensitive_true'] = ' Activer';19 15 20 16 $lang['LCAS_currentPWGConfigHeader'] = 'Paramètre actuel de Piwigo'; … … 58 54 59 55 $lang['LCAS_PluginSupport'] = 'Support officiel du plugin'; 56 57 $lang['LCAS_Mail'] = 'Notification par email'; 58 59 $lang['LCAS_DisableOption'] = ' Désactiver (valeur par défaut)'; 60 $lang['LCAS_EnableOption'] = ' Activer'; 61 62 /* Email subject */ 63 $lang['Username_updated_for_%s'] = 'Nom d\'utilisateur mis à jour pour %s'; 60 64 ?> -
extensions/LCAS/trunk/maintain.inc.php
r8257 r8271 18 18 global $conf; 19 19 20 $default 1 = array('false','false','Example customized content of the notification email');20 $default = array('false','false','false','Example customized content of the notification email'); 21 21 22 22 $q = ' 23 23 INSERT INTO '.CONFIG_TABLE.' (param, value, comment) 24 VALUES ("LoginCaseAccentsSensitivity","'.addslashes(serialize($default 1)).'","LCAS parameters")24 VALUES ("LoginCaseAccentsSensitivity","'.addslashes(serialize($default)).'","LCAS parameters") 25 25 ;'; 26 26 pwg_query($q);
Note: See TracChangeset
for help on using the changeset viewer.