Changeset 4235


Ignore:
Timestamp:
11/09/09 21:03:08 (10 years ago)
Author:
Eric
Message:

[NBC_UserAdvManager] Merged from Trunk to Branch 2.12

  • Bug 1233 fixed : "duplicate key error" when a user wants to register with an existing username. In fact, all standard Piwigo's register controls didn't work when plugin was activated. That fixes this too.
  • Adding og DE, ES and IT languages. IT language translation is still to do.
  • Adding of description.txt files in language directories.
Location:
extensions/NBC_UserAdvManager/branches/2.12
Files:
14 added
3 edited

Legend:

Unmodified
Added
Removed
  • extensions/NBC_UserAdvManager/branches/2.12/language/en_UK/plugin.lang.php

    r4160 r4235  
    99$lang['Title_Tab1'] = 'UserAdvManager - General Setup'; 
    1010$lang['Tab_Global'] = 'General Setup'; 
    11 $lang['UserAdvManager_Mail_Info'] = ' Mail information user:'; 
    12 $lang['UserAdvManager_Mail_Info_true'] = ' Send an information mail to the user when he registes or updates his profile.'; 
    13 $lang['UserAdvManager_Mail_Info_false'] = ' Turns off the sending of mail. (default)'; 
     11$lang['UserAdvManager_Mail_Info'] = ' Mail information to user:'; 
     12$lang['UserAdvManager_Mail_Info_true'] = ' Send mail to the user by taking over its connection information when registering or updating their profile.'; 
     13$lang['UserAdvManager_Mail_Info_false'] = ' Turns off the mail sending. (default)'; 
    1414$lang['UserAdvManager_MailInfo_Text'] = ' Text used to introduce the email sent to user to allow him to validate his email address<br><b style="color: red;">(!!! </b><b style="text-decoration: underline; color: red;">WARNING !</b> <b style="color: red;">Text modification is available ONLY if Mail information user is enabled. Use the multi language tags from Extended Description plugin if this plugin is activated !!!)</b>'; 
    15 $lang['UserAdvManager_No_Casse'] = ' User insensitive'; 
    16 $lang['UserAdvManager_No_Casse_true'] = ' Make the user account insensitive at the registration and the identification step'; 
    17 $lang['UserAdvManager_No_Casse_false'] = ' Let the user-sensitive. (default)'; 
    18 $lang['UserAdvManager_Username_Char'] = ' Limited charset for unsername'; 
     15$lang['UserAdvManager_No_Casse'] = ' User name case insensitive'; 
     16$lang['UserAdvManager_No_Casse_true'] = ' Make the user account case insensitive at the registration and the identification step'; 
     17$lang['UserAdvManager_No_Casse_false'] = ' Let the user case sensitive. (default)'; 
     18$lang['UserAdvManager_Username_Char'] = ' Limited charset for username'; 
    1919$lang['UserAdvManager_Username_Char_true'] = ' The following characters will be forbidden for username choice'; 
    2020$lang['UserAdvManager_Username_Char_false'] = ' Use the default username charset control. (default)'; 
     
    4141$lang['UserAdvManager_Password_Enforced'] = 'Strengthening passwords - Enabling this option makes the seizure of the password required for visitors registration. Also, the password entered by the visitor will meet with a score of complexity (<b style="color: green;">activate and save settings to display more informations</b>).'; 
    4242$lang['UserAdvManager_Password_Enforced_Info'] = '<b style="text-decoration: underline; color: green;">Explanations:</b> <b style="color: green;">A password score is calculated on the basic parameters: length, type of characters used (letters, digits, uppercase, lowercase, special characters). If the password of the user does not score, the score reached is displayed with the minimal score to reach and an indication to increase the value of this score. To give you an idea, a score below 100 is considered "low complexity". Between 100 and 500, the complexity is increased and average. Beyond 500, that\'s Fort Knox! ;-)<br>You can do your passwords complexity tests by using the field below. This will allow you to get an idea of the score to define a custom complexity.</b>'; 
    43 $lang['UserAdvManager_PasswordTest'] = 'Passowrd to test : '; 
     43$lang['UserAdvManager_PasswordTest'] = 'Password to test : '; 
    4444$lang['UserAdvManager_ScoreTest'] = 'Score : '; 
    4545$lang['PasswordTest'] = 'Score calculation'; 
     
    6464$lang['Title_Tab2'] = 'UserAdvManager - ConfirmMail Settings'; 
    6565$lang['Tab_ConfirmMail'] = 'ConfirmMail Settings'; 
    66 $lang['UserAdvManager_ConfirmMail_Info'] = 'Time limitation for validation of registration :<br>If you enable this option, select the desired time (x) )in the field below. Visitors who register will then have x days to validate their registration. After this period the validation link they have received by mail will be expired.<br>'; 
     66$lang['UserAdvManager_ConfirmMail_Info'] = 'Time limitation for validation of registration :<br>If you enable this option, select the desired time (x) in the field below. Visitors who register will then have x days to validate their registration. After this period the validation link they have received by mail will be expired.<br>'; 
    6767$lang['UserAdvManager_ConfirmMail_TimeOut_true'] = 'Enable limiting the registration deadline.'; 
    6868$lang['UserAdvManager_ConfirmMail_TimeOut_false'] = 'Disable limiting the registration deadline. (Default)'; 
     
    8686- Generate email reminder <b>without</b> generating a new key. Warning: Send an email reminder to targeted visitors. This function does not reset the date of registration of targeted visitors and the timeout is still valid. 
    8787<br> 
    88 - Generate email reminder <b>with</b> generating a new key. Warning : Send an email reminder to targeted visitors. This function also resets the date of registration of targeted visitors which equates to extend the deadline for validation.<br> 
     88- Generate email reminder <b>with</b> generating a new key. Warning : Send an email reminder to targeted visitors. This function also resets the date of registration of targeted visitors which equates to extend the deadline for validation. 
     89<br> 
    8990- Submit a registration awaiting validation manually even if the expiry date has passed <b>(forcing validation)</b>. 
    9091<br>'; 
     
    119120$lang['Add of %s'] = 'Add of %s'; 
    120121$lang['Update of %s'] = 'Update of %s'; 
    121 $lang['Link: %s'] = 'Please, click on this link to confirm your regsitration : %s'; 
     122$lang['Link: %s'] = 'Please, click on this link to confirm your registration : %s'; 
    122123$lang['Reminder_with_key_of_%s'] = '%s, your validation key has been renewed'; 
    123124$lang['Reminder_without_key_of_%s'] = '%s, your validation key will expire'; 
     
    141142if ( isset($conf_UserAdvManager[1]) and $conf_UserAdvManager[1] == 'true' ) 
    142143        $lang['reg_err_login5'] = 'Username already exist, WARNING name is case insensitive (Shift = Tiny).'; 
    143 $lang['reg_err_login6'] = 'Username does not match the following characters: '; 
     144$lang['reg_err_login6'] = 'Username does not have to match the following characters: '; 
    144145$lang['reg_err_login7'] = 'Your email provider is banned for registration. Banned email providers are: '; 
    145146$lang['UserAdvManager_empty_pwd'] = '[empty password]'; 
     
    151152$lang['No_validation_for_default_user'] = 'The default account is not subject to validation'; 
    152153$lang['No_validation_for_Webmaster'] = 'The "Webmaster" account is not subject to validation'; 
    153 $lang['No_validation_for_your_account'] = 'You personnal admin account is not subject to validation'; 
     154$lang['No_validation_for_your_account'] = 'Your personnal admin account is not subject to validation'; 
    154155$lang['Database_Error'] = '<b><u>Warning! Critical integrity error in your database.</u></b><br><br>Please check the integrity of the #_user_confirm_mail table.'; 
    155156// --------- Starting below: New or revised $lang ---- from version 2.12.0 and 2.12.1 
     
    192193// --------- End: New or revised $lang ---- from version 2.12.0 and 2.12.1 
    193194// --------- Starting below: New or revised $lang ---- from version 2.12.2 
    194 $lang['GT_Reset'] = 'Reset Ghost Tracker.'; 
     195$lang['GT_Reset'] = 'Reset Ghost Tracker'; 
    195196// --------- End: New or revised $lang ---- from version 2.12.2 
    196197?> 
  • extensions/NBC_UserAdvManager/branches/2.12/language/fr_FR/plugin.lang.php

    r4160 r4235  
    1010$lang['Tab_Global'] = 'Configuration Générale'; 
    1111$lang['UserAdvManager_Mail_Info'] = 'Mail d\'information à l\'utilisateur :'; 
    12 $lang['UserAdvManager_Mail_Info_true'] = ' Envoyer un mail à l\'utilisateur reprenant ses infos lors de son inscription ou la mise à jour de son profil.'; 
     12$lang['UserAdvManager_Mail_Info_true'] = ' Envoyer un mail à l\'utilisateur en reprenant ses informations de connexion lors de son inscription ou à la mise à jour de son profil.'; 
    1313$lang['UserAdvManager_Mail_Info_false'] = ' Désactive l\'envoi de mail d\'info. (valeur par défaut)'; 
    1414$lang['UserAdvManager_MailInfo_Text'] = ' Texte utilisé pour l\'introduction du mail envoyé à l\'utilisateur pour son inscription ou la mise à jour de son profil<br><b style="color: red;">(!!! </b><b style="text-decoration: underline; color: red;">ATTENTION !</b> <b style="color: red;">La modification du texte n\'est possible <b>QUE</b> si le mail d\'information à l\'utilisateur est activé. Utilisez la méthode multi language du plugin Extended Description si celui-ci est activé !!!)</b>'; 
     
    1616$lang['UserAdvManager_No_Casse_true'] = ' Rendre le compte utilisateur insensible à la casse, lors de l\'inscription et l\identification.'; 
    1717$lang['UserAdvManager_No_Casse_false'] = ' Laisser les utilisateur sensible à la casse. (valeur par défaut)'; 
    18 $lang['UserAdvManager_Username_Char'] = 'Caractères limités pour le nom d\'utilisateur'; 
     18$lang['UserAdvManager_Username_Char'] = ' Caractères limités pour le nom d\'utilisateur'; 
    1919$lang['UserAdvManager_Username_Char_true'] = ' Interdire les caractères saisis dans le champs ci-après pour le nom d\'utilisateur lors de l\'inscription == '; 
    2020$lang['UserAdvManager_Username_Char_false'] = ' Laisser le contrôle par défaut du nom d\'utilisateur. (valeur par défaut)'; 
     
    6464$lang['Title_Tab2'] = 'UserAdvManager - Configuration de ConfirmMail'; 
    6565$lang['Tab_ConfirmMail'] = 'Configuration de ConfirmMail'; 
    66 $lang['UserAdvManager_ConfirmMail_Info'] = 'Limitation du délai de validation de l\'inscription :<br>Si vous activez cette option, sélectionnez le délai (x) )souhaité dans la liste qui suit. Les visiteurs qui s\'inscriront alors auront x jours de délais pour valider leur inscription. Passé ce délai, le lien de validation qu\'ils auront reçu par mail sera expiré.<br>'; 
     66$lang['UserAdvManager_ConfirmMail_Info'] = 'Limitation du délai de validation de l\'inscription :<br>Si vous activez cette option, sélectionnez le délai (x) souhaité dans la liste qui suit. Les visiteurs qui s\'inscriront alors auront x jours de délais pour valider leur inscription. Passé ce délai, le lien de validation qu\'ils auront reçu par mail sera expiré.<br>'; 
    6767$lang['UserAdvManager_ConfirmMail_TimeOut_true'] = 'Activer la limitation du délai d\'inscription.'; 
    6868$lang['UserAdvManager_ConfirmMail_TimeOut_false'] = 'Désactiver la limitation du délai d\'inscription. (valeur par défaut)'; 
     
    8686- Générer l\'email de rappel <b>sans génération</b> d\'une nouvelle clef. Rappel : Cette fonction ne réinitialise pas la date d\'inscription du visiteur ciblé et le délai d\'expiration est toujours d\'actualité. 
    8787<br> 
    88 - Générer l\'email de rappel <b>avec génération</b> d\'une nouvelle clef. Rappel : Cette fonction réinitialise également la date d\'inscription du visiteur ciblé ce qui équivaut à prolonger le délai de validation.<br> 
     88- Générer l\'email de rappel <b>avec génération</b> d\'une nouvelle clef. Rappel : Cette fonction réinitialise également la date d\'inscription du visiteur ciblé ce qui équivaut à prolonger le délai de validation. 
     89<br> 
    8990- Valider manuellement une inscription en attente de validation même si la date d\'expiration est révolue <b>(forçage de la validation)</b>. 
    9091<br>'; 
  • extensions/NBC_UserAdvManager/branches/2.12/main.inc.php

    r4188 r4235  
    22/* 
    33Plugin Name: NBC UserAdvManager 
    4 Version: 2.12.4 
    5 Description: Permet de renforcer les possibilités de gestion des utilisateurs - Enforce users management 
     4Version: 2.12.5 
     5Description: Renforcer les possibilités de gestion des utilisateurs - Enforce users management 
    66Plugin URI: http://fr.piwigo.org/ext/extension_view.php?eid=216 
    77Author: Nicco, Eric 
     
    9292-- 2.12.4 : Adding a password field control for SendMail2User - Neighborhood plugin compatibility improvement  
    9393            Bug 1229 fixed - Email was no longer mandatory when plugin was active, even if Piwigo's email madatory option was set.  
     94 
     95-- 2.12.5 : Bug 1233 fixed -  "duplicate key error" when a user wants to register with an existing username. In fact, all standard Piwigo's register controls didn't work when plugin was activated. That fixes this too. 
     96            Adding DE, ES and IT languages. All translations are not finalized and could be improved. 
     97            Adding of description.txt file in language directories. 
    9498*/ 
    9599 
     
    235239  global $errors, $conf; 
    236240 
     241/* *********************************************************** */ 
     242/* We need to reset the standard Piwigo's register controls    */ 
     243/* because the call of register_user_check trigger resets them */ 
     244/* *********************************************************** */ 
     245  /* ********************************** */ 
     246  /* Standard Piwigo's username control */ 
     247  /* ********************************** */ 
     248  if ($_POST['login'] == '') 
     249  { 
     250    return l10n('reg_err_login1'); 
     251  } 
     252  if (preg_match('/^.* $/', $_POST['login'])) 
     253  { 
     254    return l10n('reg_err_login2'); 
     255  } 
     256  if (preg_match('/^ .*$/', $_POST['login'])) 
     257  { 
     258    return l10n('reg_err_login3'); 
     259  } 
     260  if (get_userid($_POST['login'])) 
     261  { 
     262    return l10n('reg_err_login5'); 
     263  } 
     264   
     265  /* ***************************** */ 
     266  /* Standard Piwigo's email check */ 
     267  /* ***************************** */ 
     268  $atom   = '[-a-z0-9!#$%&\'*+\\/=?^_`{|}~]';   // before  arobase 
     269  $domain = '([a-z0-9]([-a-z0-9]*[a-z0-9]+)?)'; // domain name 
     270  $regex = '/^' . $atom . '+' . '(\.' . $atom . '+)*' . '@' . '(' . $domain . '{1,63}\.)+' . $domain . '{2,63}$/i'; 
     271 
     272  if (!preg_match($regex, $_POST['mail_address'])) 
     273  { 
     274    return l10n('reg_err_mail_address'); 
     275  } 
     276 
     277  if (!empty($_POST['mail_address'])) 
     278  { 
     279    $query = ' 
     280select count(*) 
     281from '.USERS_TABLE.' 
     282where upper('.$conf['user_fields']['email'].') = upper(\''.$_POST['mail_address'].'\');'; 
     283    list($count) = mysql_fetch_array(pwg_query($query)); 
     284    if ($count != 0) 
     285    { 
     286      return l10n('reg_err_mail_address_dbl'); 
     287    } 
     288  } 
     289/* ****************************************** */ 
     290/* End of Piwigo's standard register controls */ 
     291/* ****************************************** */ 
     292 
     293 
     294/* ****************************************** */ 
     295/* Here begins the advanced register controls */ 
     296/* ****************************************** */ 
    237297  $PasswordCheck = 0; 
    238298   
     
    276336    $_POST['login'] = ''; 
    277337    return($lang['reg_err_login1'] = l10n('reg_err_login6')."'".$conf_nbc_UserAdvManager[8]."'"); 
    278   } 
    279  
    280   /* Email mandatory - Needed to be add here to avoid jump of standard Piwigo email control */ 
    281   if (empty($_POST['mail_address']) and $conf['obligatory_user_mail_address']) 
    282   { 
    283     //$_POST['mail_address'] = ''; 
    284     return l10n('reg_err_mail_address'); 
    285338  } 
    286339 
Note: See TracChangeset for help on using the changeset viewer.