Index: /extensions/LCAS/trunk/language/en_UK/messages.lang.php
===================================================================
--- /extensions/LCAS/trunk/language/en_UK/messages.lang.php	(revision 9232)
+++ /extensions/LCAS/trunk/language/en_UK/messages.lang.php	(revision 9232)
@@ -0,0 +1,44 @@
+<?php
+
+global $lang;
+
+// This file sets the messages that are displayed to the users:
+// error message when a user tries to create an account which already exists,
+// and tooltip messages displayed when the mouse hovers above username and
+// password fields.
+
+// You can create your own message for your personal table, having index 0:
+// $lang['LCAS_error'][0] = 'Your text here';
+// Remove comment identifier ("//"), and replace the text "Your text here" by
+// the text you want. Don't forget to write the apostrophe (') with a
+// preceding "\": 'This ain\'t a good text without it!'
+
+
+// New account creation error messages
+$lang['LCAS_error'][1] = 'This username is already used.<br>Username is case insensitive (uppercase/lowercase; E = e ≠ É = é).';
+
+$lang['LCAS_error'][2] = 'This username is already used.<br>Username is accents insensitive (e = é ≠ E = É).';
+
+$lang['LCAS_error'][3] = 'This username is already used.<br>Username is case (uppercase/lowercase) and accents insensitive (E = e = É = é).';
+
+
+// Tooltips in index page
+$lang['LCAS_tooltip_username_index'][1] = 'The username is case insensitive (uppercase/lowercase; E = e ≠ É = é)';
+
+$lang['LCAS_tooltip_username_index'][2] = 'The username is accents insensitive (e = é ≠ E = É)';
+
+$lang['LCAS_tooltip_username_index'][3] = 'The username is case (uppercase/lowercase) and accents insensitive (E = e = É = é)';
+
+$lang['LCAS_tooltip_password_index'] = 'The password is always case (uppercase/lowercase) and accents sensitive (E ≠ e ≠ É ≠ é)';
+
+
+// Tooltips in register page
+$lang['LCAS_tooltip_username_register'][1] = 'The username is case insensitive (uppercase/lowercase; E = e ≠ É = é)';
+
+$lang['LCAS_tooltip_username_register'][2] = 'The username is accents insensitive (e = é ≠ E = É)';
+
+$lang['LCAS_tooltip_username_register'][3] = 'The username is case (uppercase/lowercase) and accents insensitive (E = e = É = é)';
+
+$lang['LCAS_tooltip_password_register'] = 'The password is always case (uppercase/lowercase) and accents sensitive (E ≠ e ≠ É ≠ é)';
+
+?>
Index: /extensions/LCAS/trunk/language/en_UK/plugin.lang.php
===================================================================
--- /extensions/LCAS/trunk/language/en_UK/plugin.lang.php	(revision 9231)
+++ /extensions/LCAS/trunk/language/en_UK/plugin.lang.php	(revision 9232)
@@ -47,10 +47,4 @@
 $lang['submit'] = 'Save settings';
 
-$lang['LCAS_error'][1] = 'This username is already used.<br>Username is case insensitive (uppercase/lowercase; E = e ≠ É = é).';
-
-$lang['LCAS_error'][2] = 'This username is already used.<br>Username is accents insensitive (e = é ≠ E = É).';
-
-$lang['LCAS_error'][3] = 'This username is already used.<br>Username is case (uppercase/lowercase) and accents insensitive (E = e = É = é).';
-
 $lang['LCAS_MailText'] = 'Customizing email notification';
 
Index: /extensions/LCAS/trunk/language/fr_FR/messages.lang.php
===================================================================
--- /extensions/LCAS/trunk/language/fr_FR/messages.lang.php	(revision 9232)
+++ /extensions/LCAS/trunk/language/fr_FR/messages.lang.php	(revision 9232)
@@ -0,0 +1,63 @@
+<?php
+
+global $lang;
+
+// English explanation:
+// This file sets the messages that are displayed to the users:
+// error message when a user tries to create an account which already exists,
+// and tooltip messages displayed when the mouse hovers above username and
+// password fields
+
+// You can create your own message for your personal table, having index 0:
+// $lang['LCAS_error'][0] = 'Your text here';
+// Remove comment identifier ("//"), and replace the text "Your text here" by
+// the text you want. Don't forget to write the apostrophe (') with a
+// preceding "\": 'This ain\'t a good text without it!'
+
+
+// Explications françaises :
+// Ce fichier définit les messages affichés aux utilisateurs :
+// message d'erreur lors de la création d'un compte, si ce compte existe déjà,
+// et infos-bulles affichées lorsque la souris survole les champs "nom
+// d'utilisateur" et "mot de passe"
+
+// Vous pouvez vous céer vos propres messages pour votre tableau personnel,
+// d'index 0 :
+// $lang['LCAS_error'][0] = 'Votre texte ici';
+// Retirez les identifiants de commentaire ("//"), et remplacez le texte
+// "Votre texte ici" par le texte dont vous avez besoin. N'oubliez
+// pas d'écrire l'apostrophe en le précédant d'un "\" :
+// 'Sinon ça l\'fera pas !'
+
+
+// New account creation error messages
+// Messages d'erreur lors de la création d'un nouveau compte
+$lang['LCAS_error'][1] = 'Ce nom d\'utilisateur est déjà pris.<br>Le nom d\'utilisateur est insensible à la casse (majuscules/minuscules&nbsp;; E = e ≠ É = é).';
+
+$lang['LCAS_error'][2] = 'Ce nom d\'utilisateur est déjà pris.<br>Le nom d\'utilisateur est insensible aux accents (e = é ≠ E = É).';
+
+$lang['LCAS_error'][3] = 'Ce nom d\'utilisateur est déjà pris.<br>Le nom d\'utilisateur est insensible à la casse (majuscules/minuscules) et aux accents (E = e = É = é).';
+
+
+// Tooltips in index page
+// Info-bulles sur la page index
+$lang['LCAS_tooltip_username_index'][1] = 'Le nom d\'utilisateur est insensible à la casse (majuscules/minuscules&nbsp;; E = e ≠ É = é)';
+
+$lang['LCAS_tooltip_username_index'][2] = 'Le nom d\'utilisateur est insensible aux accents (e = é ≠ E = É)';
+
+$lang['LCAS_tooltip_username_index'][3] = 'Le nom d\'utilisateur est insensible à la casse (majuscules/minuscules) et aux accents (E = e = É = é)';
+
+$lang['LCAS_tooltip_password_index'] = 'Le mot de passe est toujours sensible à la casse (majuscules/minuscules) et aux accents (E ≠ e ≠ É ≠ é)';
+
+
+// Tooltips in register page
+// Info-bulles sur la page register
+$lang['LCAS_tooltip_username_register'][1] = 'Le nom d\'utilisateur est insensible à la casse (majuscules/minuscules&nbsp;; E = e ≠ É = é)';
+
+$lang['LCAS_tooltip_username_register'][2] = 'Le nom d\'utilisateur est insensible aux accents (e = é ≠ E = É)';
+
+$lang['LCAS_tooltip_username_register'][3] = 'Le nom d\'utilisateur est insensible à la casse (majuscules/minuscules) et aux accents (E = e = É = é)';
+
+$lang['LCAS_tooltip_password_register'] = 'Le mot de passe est toujours sensible à la casse (majuscules/minuscules) et aux accents (E ≠ e ≠ É ≠ é)';
+
+?>
Index: /extensions/LCAS/trunk/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/LCAS/trunk/language/fr_FR/plugin.lang.php	(revision 9231)
+++ /extensions/LCAS/trunk/language/fr_FR/plugin.lang.php	(revision 9232)
@@ -54,10 +54,4 @@
 $lang['submit'] = 'Sauvegarder les paramètres';
 
-$lang['LCAS_error'][1] = 'Ce nom d\'utilisateur est déjà pris.<br>Le nom d\'utilisateur est insensible à la casse (majuscules/minuscules&nbsp;; E = e ≠ É = é).';
-
-$lang['LCAS_error'][2] = 'Ce nom d\'utilisateur est déjà pris.<br>Le nom d\'utilisateur est insensible aux accents (e = é ≠ E = É).';
-
-$lang['LCAS_error'][3] = 'Ce nom d\'utilisateur est déjà pris.<br>Le nom d\'utilisateur est insensible à la casse (majuscules/minuscules) et aux accents (E = e = É = é).';
-
 $lang['LCAS_MailText'] = 'Personnalisation de la notification par email';
 
Index: /extensions/LCAS/trunk/main.inc.php
===================================================================
--- /extensions/LCAS/trunk/main.inc.php	(revision 9231)
+++ /extensions/LCAS/trunk/main.inc.php	(revision 9232)
@@ -24,4 +24,5 @@
 
 load_language('plugin.lang', LCAS_PATH);
+load_language('messages.lang', LCAS_PATH);
 
 $t = pwg_db_fetch_row(pwg_query('
@@ -45,4 +46,8 @@
   $name = $plugin['name'];
   
+ 		                                                                                // to be removed in final version : 
+ 		                                                                                global $template; 
+ 		                                                                                $template->delete_compiled_templates(); 
+  
   array_push($menu,
     array(
@@ -55,4 +60,26 @@
 }
 
+function LCAS_add_tooltips_prefilter_register($content, &$smarty) {
+  $search = 'for="login"';
+  $replacement = 'for="login" title="{$LCAS_username_tooltip}"';
+  $content = str_replace($search, $replacement, $content);
+  $search = 'name="login"';
+  $replacement = 'name="login" title="{$LCAS_username_tooltip}"';
+  $content = str_replace($search, $replacement, $content);
+  $search = 'for="password"';
+  $replacement = 'for="password" title="{$LCAS_password_tooltip}"';
+  $content = str_replace($search, $replacement, $content);
+  $search = 'name="password"';
+  $replacement = 'name="password" title="{$LCAS_password_tooltip}"';
+  $content = str_replace($search, $replacement, $content);
+  $search = 'for="password_conf"';
+  $replacement = 'for="password_conf" title="{$LCAS_password_tooltip}"';
+  $content = str_replace($search, $replacement, $content);
+  $search = 'name="password_conf"';
+  $replacement = 'name="password_conf" title="{$LCAS_password_tooltip}"';
+  $content = str_replace($search, $replacement, $content);
+  return $content;
+}
+
 // Check users identification
 add_event_handler('init', 'LCAS_InitPage');
@@ -60,5 +87,5 @@
 function LCAS_InitPage()
 {
-  global $conf;
+  global $template, $conf, $lang;
 
   $conf_LCAS= unserialize($conf['LoginCaseAccentsSensitivity']);
@@ -76,4 +103,13 @@
       $_POST['username'] = $new_username == '' ? $_POST['username'] : $new_username;
     }
+  }
+  
+  // Add tooltips on register page
+  if (script_basename() == 'register') {
+    $template->assign(array(
+      'LCAS_username_tooltip' => $lang['LCAS_tooltip_username_register'][intval($conf_LCAS[1])],
+      'LCAS_password_tooltip' => $lang['LCAS_tooltip_password_register'],
+    ));
+    $template->set_prefilter('register', 'LCAS_add_tooltips_prefilter_register');
   }
 }
@@ -99,3 +135,43 @@
   return $errors;
 }
+
+/**
+ *
+ * LCAS_add_tooltips()
+ * add tooltips on username and password fields
+ *
+ * @param no parameter
+ * @return no return value
+ */
+
+add_event_handler('blockmanager_apply', 'LCAS_add_tooltips_index');
+
+function LCAS_add_tooltips_prefilter_index($content, &$smarty) {
+  $search = 'for="username"';
+  $replacement = 'for="username" title="{$LCAS_username_tooltip}"';
+  $content = str_replace($search, $replacement, $content);
+  $search = 'name="username"';
+  $replacement = 'name="username" title="{$LCAS_username_tooltip}"';
+  $content = str_replace($search, $replacement, $content);
+  $search = 'for="password"';
+  $replacement = 'for="password" title="{$LCAS_password_tooltip}"';
+  $content = str_replace($search, $replacement, $content);
+  $search = 'name="password"';
+  $replacement = 'name="password" title="{$LCAS_password_tooltip}"';
+  $content = str_replace($search, $replacement, $content);
+  return $content;
+}
+
+function LCAS_add_tooltips_index() {
+  global $template, $conf, $lang;
+  
+  $conf_LCAS= unserialize($conf['LoginCaseAccentsSensitivity']);
+  
+  $template->assign(array(
+    'LCAS_username_tooltip' => $lang['LCAS_tooltip_username_index'][intval($conf_LCAS[1])],
+    'LCAS_password_tooltip' => $lang['LCAS_tooltip_password_index'],
+  ));
+  $template->set_prefilter('menubar', 'LCAS_add_tooltips_prefilter_index');
+}
+
 ?>
