Changeset 9232
- Timestamp:
- Feb 15, 2011, 12:33:49 AM (14 years ago)
- Location:
- extensions/LCAS/trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/LCAS/trunk/language/en_UK/plugin.lang.php
r9206 r9232 47 47 $lang['submit'] = 'Save settings'; 48 48 49 $lang['LCAS_error'][1] = 'This username is already used.<br>Username is case insensitive (uppercase/lowercase; E = e ≠ É = é).';50 51 $lang['LCAS_error'][2] = 'This username is already used.<br>Username is accents insensitive (e = é ≠ E = É).';52 53 $lang['LCAS_error'][3] = 'This username is already used.<br>Username is case (uppercase/lowercase) and accents insensitive (E = e = É = é).';54 55 49 $lang['LCAS_MailText'] = 'Customizing email notification'; 56 50 -
extensions/LCAS/trunk/language/fr_FR/plugin.lang.php
r9229 r9232 54 54 $lang['submit'] = 'Sauvegarder les paramètres'; 55 55 56 $lang['LCAS_error'][1] = 'Ce nom d\'utilisateur est déjà pris.<br>Le nom d\'utilisateur est insensible à la casse (majuscules/minuscules ; E = e ≠ É = é).';57 58 $lang['LCAS_error'][2] = 'Ce nom d\'utilisateur est déjà pris.<br>Le nom d\'utilisateur est insensible aux accents (e = é ≠ E = É).';59 60 $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 = É = é).';61 62 56 $lang['LCAS_MailText'] = 'Personnalisation de la notification par email'; 63 57 -
extensions/LCAS/trunk/main.inc.php
r9229 r9232 24 24 25 25 load_language('plugin.lang', LCAS_PATH); 26 load_language('messages.lang', LCAS_PATH); 26 27 27 28 $t = pwg_db_fetch_row(pwg_query(' … … 45 46 $name = $plugin['name']; 46 47 48 // to be removed in final version : 49 global $template; 50 $template->delete_compiled_templates(); 51 47 52 array_push($menu, 48 53 array( … … 55 60 } 56 61 62 function LCAS_add_tooltips_prefilter_register($content, &$smarty) { 63 $search = 'for="login"'; 64 $replacement = 'for="login" title="{$LCAS_username_tooltip}"'; 65 $content = str_replace($search, $replacement, $content); 66 $search = 'name="login"'; 67 $replacement = 'name="login" title="{$LCAS_username_tooltip}"'; 68 $content = str_replace($search, $replacement, $content); 69 $search = 'for="password"'; 70 $replacement = 'for="password" title="{$LCAS_password_tooltip}"'; 71 $content = str_replace($search, $replacement, $content); 72 $search = 'name="password"'; 73 $replacement = 'name="password" title="{$LCAS_password_tooltip}"'; 74 $content = str_replace($search, $replacement, $content); 75 $search = 'for="password_conf"'; 76 $replacement = 'for="password_conf" title="{$LCAS_password_tooltip}"'; 77 $content = str_replace($search, $replacement, $content); 78 $search = 'name="password_conf"'; 79 $replacement = 'name="password_conf" title="{$LCAS_password_tooltip}"'; 80 $content = str_replace($search, $replacement, $content); 81 return $content; 82 } 83 57 84 // Check users identification 58 85 add_event_handler('init', 'LCAS_InitPage'); … … 60 87 function LCAS_InitPage() 61 88 { 62 global $ conf;89 global $template, $conf, $lang; 63 90 64 91 $conf_LCAS= unserialize($conf['LoginCaseAccentsSensitivity']); … … 76 103 $_POST['username'] = $new_username == '' ? $_POST['username'] : $new_username; 77 104 } 105 } 106 107 // Add tooltips on register page 108 if (script_basename() == 'register') { 109 $template->assign(array( 110 'LCAS_username_tooltip' => $lang['LCAS_tooltip_username_register'][intval($conf_LCAS[1])], 111 'LCAS_password_tooltip' => $lang['LCAS_tooltip_password_register'], 112 )); 113 $template->set_prefilter('register', 'LCAS_add_tooltips_prefilter_register'); 78 114 } 79 115 } … … 99 135 return $errors; 100 136 } 137 138 /** 139 * 140 * LCAS_add_tooltips() 141 * add tooltips on username and password fields 142 * 143 * @param no parameter 144 * @return no return value 145 */ 146 147 add_event_handler('blockmanager_apply', 'LCAS_add_tooltips_index'); 148 149 function LCAS_add_tooltips_prefilter_index($content, &$smarty) { 150 $search = 'for="username"'; 151 $replacement = 'for="username" title="{$LCAS_username_tooltip}"'; 152 $content = str_replace($search, $replacement, $content); 153 $search = 'name="username"'; 154 $replacement = 'name="username" title="{$LCAS_username_tooltip}"'; 155 $content = str_replace($search, $replacement, $content); 156 $search = 'for="password"'; 157 $replacement = 'for="password" title="{$LCAS_password_tooltip}"'; 158 $content = str_replace($search, $replacement, $content); 159 $search = 'name="password"'; 160 $replacement = 'name="password" title="{$LCAS_password_tooltip}"'; 161 $content = str_replace($search, $replacement, $content); 162 return $content; 163 } 164 165 function LCAS_add_tooltips_index() { 166 global $template, $conf, $lang; 167 168 $conf_LCAS= unserialize($conf['LoginCaseAccentsSensitivity']); 169 170 $template->assign(array( 171 'LCAS_username_tooltip' => $lang['LCAS_tooltip_username_index'][intval($conf_LCAS[1])], 172 'LCAS_password_tooltip' => $lang['LCAS_tooltip_password_index'], 173 )); 174 $template->set_prefilter('menubar', 'LCAS_add_tooltips_prefilter_index'); 175 } 176 101 177 ?>
Note: See TracChangeset
for help on using the changeset viewer.