Index: /extensions/UserAdvManager/branches/2.40/ConfirmMail.php
===================================================================
--- /extensions/UserAdvManager/branches/2.40/ConfirmMail.php	(revision 14729)
+++ /extensions/UserAdvManager/branches/2.40/ConfirmMail.php	(revision 14730)
@@ -77,6 +77,6 @@
       $replacements[] = $conf['gallery_title'];
       $patterns[] = '#\[myurl\]#i';
-      $replacements[] = $conf['gallery_url'];
-   
+      $replacements[] = get_gallery_home_url();
+
       if (function_exists('get_user_language_desc'))
       {
@@ -87,14 +87,4 @@
     
     $redirect = true;
-    $Path_UAM = UAM_PATH; // Path to be used in template to reach the icons
-    
-    $template->assign(
-			array(
-        'UAM_PATH'             => $Path_UAM,
-        'REDIRECT'             => $redirect,
-        'STATUS'               => $status,
-				'CONFIRM_MAIL_MESSAGE' => $custom_text,
-			)
-		);
   }  
   else
@@ -112,5 +102,5 @@
       $replacements[] = $conf['gallery_title'];
       $patterns[] = '#\[myurl\]#i';
-      $replacements[] = $conf['gallery_url'];
+      $replacements[] = get_gallery_home_url();
    
       if (function_exists('get_user_language_desc'))
@@ -120,14 +110,16 @@
       else $custom_text = l10n(preg_replace($patterns, $replacements, $conf_UAM_ConfirmMail[6]));
     }
-    
-    $template->assign(
-			array(
-        'REDIRECT'             => $redirect,
-        'GALLERY_URL'          => make_index_url(),
-        'STATUS'               => $status,
-				'CONFIRM_MAIL_MESSAGE' => $custom_text,
-			)
-		);
   }
+
+  $Path_UAM = UAM_PATH; // Path to be used in template to reach the icons
+
+  $template->assign(
+    array(
+      'UAM_PATH'             => $Path_UAM,
+      'REDIRECT'             => $redirect,
+      'STATUS'               => $status,
+		  'CONFIRM_MAIL_MESSAGE' => $custom_text,
+    )
+  );
 }
 
Index: /extensions/UserAdvManager/branches/2.40/GT_del_account.php
===================================================================
--- /extensions/UserAdvManager/branches/2.40/GT_del_account.php	(revision 14729)
+++ /extensions/UserAdvManager/branches/2.40/GT_del_account.php	(revision 14730)
@@ -28,5 +28,5 @@
   $replacements[] = $conf['gallery_title'];
   $patterns[] = '#\[myurl\]#i';
-  $replacements[] = $conf['gallery_url'];
+  $replacements[] = get_gallery_home_url();
 
   if (function_exists('get_user_language_desc'))
@@ -42,5 +42,4 @@
   array(
     'UAM_PATH'             => $Path_UAM,
-    'GALLERY_URL'          => make_index_url(),
     'CUSTOM_REDIR_MSG'     => $custom_text,
   )
Index: /extensions/UserAdvManager/branches/2.40/USR_del_account.php
===================================================================
--- /extensions/UserAdvManager/branches/2.40/USR_del_account.php	(revision 14729)
+++ /extensions/UserAdvManager/branches/2.40/USR_del_account.php	(revision 14730)
@@ -28,5 +28,5 @@
   $replacements[] = $conf['gallery_title'];
   $patterns[] = '#\[myurl\]#i';
-  $replacements[] = $conf['gallery_url'];
+  $replacements[] = get_gallery_home_url();
 
   if (function_exists('get_user_language_desc'))
@@ -39,5 +39,4 @@
 $template->assign(
   array(
-    'GALLERY_URL'          => make_index_url(),
     'CUSTOM_REDIR_MSG'     => $custom_text,
   )
Index: /extensions/UserAdvManager/branches/2.40/admin/UAM_admin.php
===================================================================
--- /extensions/UserAdvManager/branches/2.40/admin/UAM_admin.php	(revision 14729)
+++ /extensions/UserAdvManager/branches/2.40/admin/UAM_admin.php	(revision 14730)
@@ -113,6 +113,6 @@
   {
 
-    // Render free text fields
-    // -----------------------
+    // Render email contents fields
+    // ----------------------------
 		$_POST['UAM_MailInfo_Text'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_MailInfo_Text'])));
 
@@ -120,5 +120,5 @@
 
     $_POST['UAM_GhostTracker_ReminderText'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_GhostTracker_ReminderText'])));
-    
+
     $_POST['UAM_GTAutoDelText'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_GTAutoDelText'])));
 
@@ -133,4 +133,23 @@
     $_POST['UAM_CustomRejectConnexion_Text'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_CustomRejectConnexion_Text'])));
 
+    // Render email subjects fields
+    // ---------------------------
+    $_POST['UAM_ConfirmMail_Subject'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_ConfirmMail_Subject'])));
+
+    $_POST['UAM_ConfirmMail_Remail_Subject'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_ConfirmMail_Remail_Subject'])));
+
+  $_POST['UAM_InfoMail_Subject'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_InfoMail_Subject'])));
+
+  $_POST['UAM_GTAutoMail_Subject'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_GTAutoMail_Subject'])));
+
+  $_POST['UAM_GTReminder_Subject'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_GTReminder_Subject'])));
+
+  $_POST['UAM_AdminValidationMail_Subject'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_AdminValidationMail_Subject'])));
+
+
+  // Check if emails are mandatory for registrations (needed for email exclusion option)
+  // -----------------------------------------------------------------------------------
+  if ($conf['obligatory_user_mail_address'])
+  {
     // Check if CR-LF exist at begining and end of mail exclusion list - If yes, removes them
     // --------------------------------------------------------------------------------------
@@ -140,4 +159,9 @@
       $UAM_Exclusionlist_Error = true;
     }
+  }
+  elseif (!$conf['obligatory_user_mail_address'])
+  {
+    $_POST['UAM_MailExclusion_List'] = '';
+  }
 
     // Consistency check between ConfirmMail and AutoMail - We cannot use GTAutoMail if ConfirmMail is disabled
@@ -205,4 +229,10 @@
       $_POST['UAM_RejectConnexion'],
       $_POST['UAM_CustomRejectConnexion_Text'],
+      $_POST['UAM_ConfirmMail_Subject'],
+      $_POST['UAM_ConfirmMail_Remail_Subject'],
+      $_POST['UAM_InfoMail_Subject'],
+      $_POST['UAM_GTAutoMail_Subject'],
+      $_POST['UAM_GTReminder_Subject'],
+      $_POST['UAM_AdminValidationMail_Subject'],
       );
 
@@ -541,86 +571,92 @@
   $template->assign(
     array(
-    'nb_para'                        => $nb_para,
-    'nb_para2'                       => $nb_para2,
-    'UAM_VERSION'                    => $version,
-    'UAM_PATH'                       => UAM_PATH,
-    'UAM_DUMP_DOWNLOAD'              => $dump_download,
-    'UAM_THEME'                      => $UAM_theme,
-		'UAM_MAIL_INFO_TRUE'             => $conf_UAM[0]=='true' ?  'checked="checked"' : '' ,
-		'UAM_MAIL_INFO_FALSE'            => $conf_UAM[0]=='false' ?  'checked="checked"' : '' ,
-		'UAM_MAILINFO_TEXT'              => $conf_UAM[8],
-		'UAM_USERNAME_CHAR_TRUE'         => $conf_UAM[5]=='true' ?  'checked="checked"' : '' ,
-		'UAM_USERNAME_CHAR_FALSE'        => $conf_UAM[5]=='false' ?  'checked="checked"' : '' ,
-		'UAM_USERNAME_CHAR_LIST'         => $conf_UAM[6],
-		'UAM_CONFIRM_MAIL_TRUE'          => $conf_UAM[1]=='true' ?  'checked="checked"' : '' ,
-		'UAM_CONFIRM_MAIL_FALSE'         => $conf_UAM[1]=='false' ?  'checked="checked"' : '' ,
-    'UAM_CONFIRM_MAIL_LOCAL'         => $conf_UAM[1]=='local' ?  'checked="checked"' : '' ,
-		'UAM_CONFIRMMAIL_TEXT'           => $conf_UAM[9],
-		'UAM_No_Confirm_Group'           => $conf_UAM[2],
-		'UAM_Validated_Group'            => $conf_UAM[3],
-		'UAM_No_Confirm_Status'          => $conf_UAM[7],
-		'UAM_Validated_Status'           => $conf_UAM[4],
-		'UAM_MAILEXCLUSION_TRUE'         => $conf_UAM[10]=='true' ?  'checked="checked"' : '' ,
-		'UAM_MAILEXCLUSION_FALSE'        => $conf_UAM[10]=='false' ?  'checked="checked"' : '' ,
-		'UAM_MAILEXCLUSION_LIST'         => $conf_UAM[11],
-		'UAM_PASSWORDENF_TRUE'           => $conf_UAM[12]=='true' ?  'checked="checked"' : '' ,
-		'UAM_PASSWORDENF_FALSE'          => $conf_UAM[12]=='false' ?  'checked="checked"' : '' ,
-		'UAM_PASSWORD_SCORE'             => $conf_UAM[13],
-    'UAM_ADMINPASSWENF_TRUE'         => $conf_UAM[14]=='true' ?  'checked="checked"' : '' ,
-		'UAM_ADMINPASSWENF_FALSE'        => $conf_UAM[14]=='false' ?  'checked="checked"' : '' ,
-    'UAM_GHOSTRACKER_TRUE'           => $conf_UAM[15]=='true' ?  'checked="checked"' : '' ,
-		'UAM_GHOSTRACKER_FALSE'          => $conf_UAM[15]=='false' ?  'checked="checked"' : '' ,
-    'UAM_GHOSTRACKER_DAYLIMIT'       => $conf_UAM[16],
-    'UAM_GHOSTRACKER_REMINDERTEXT'   => $conf_UAM[17],
-    'UAM_ADDLASTVISIT_TRUE'          => $conf_UAM[18]=='true' ?  'checked="checked"' : '' ,
-    'UAM_ADDLASTVISIT_FALSE'         => $conf_UAM[18]=='false' ?  'checked="checked"' : '' ,
-    'UAM_ADMINCONFMAIL_TRUE'         => $conf_UAM[19]=='true' ?  'checked="checked"' : '' ,
-    'UAM_ADMINCONFMAIL_FALSE'        => $conf_UAM[19]=='false' ?  'checked="checked"' : '' ,
-    'UAM_REDIRTOPROFILE_TRUE'        => $conf_UAM[20]=='true' ?  'checked="checked"' : '' ,
-    'UAM_REDIRTOPROFILE_FALSE'       => $conf_UAM[20]=='false' ?  'checked="checked"' : '' ,
-    'UAM_GTAUTO_TRUE'                => $conf_UAM[21]=='true' ?  'checked="checked"' : '' ,
-    'UAM_GTAUTO_FALSE'               => $conf_UAM[21]=='false' ?  'checked="checked"' : '' ,
-    'UAM_GTAUTOMAIL_TRUE'            => $conf_UAM[22]=='true' ?  'checked="checked"' : '' ,
-    'UAM_GTAUTOMAIL_FALSE'           => $conf_UAM[22]=='false' ?  'checked="checked"' : '' ,
-    'UAM_GTAUTODEL_TEXT'             => $conf_UAM[23],
-    'UAM_GTAUTOMAILTEXT'             => $conf_UAM[24],
-		'UAM_Downgrade_Group'            => $conf_UAM[25],
-		'UAM_Downgrade_Status'           => $conf_UAM[26],
-    'UAM_ADMINVALIDATIONMAIL_TEXT'   => $conf_UAM[27],
-    'UAM_CUSTOMPASSWRETR_TRUE'       => $conf_UAM[28]=='true' ?  'checked="checked"' : '' ,
-    'UAM_CUSTOMPASSWRETR_FALSE'      => $conf_UAM[28]=='false' ?  'checked="checked"' : '' ,
-    'UAM_CUSTOMPASSWRETR_TEXT'       => $conf_UAM[29],
-    'UAM_USRAUTO_TRUE'               => $conf_UAM[30]=='true' ?  'checked="checked"' : '' ,
-    'UAM_USRAUTO_FALSE'              => $conf_UAM[30]=='false' ?  'checked="checked"' : '' ,
-    'UAM_USRAUTODEL_TEXT'            => $conf_UAM[31],
-    'UAM_USRAUTOMAIL_TRUE'           => $conf_UAM[32]=='true' ?  'checked="checked"' : '' ,
-    'UAM_USRAUTOMAIL_FALSE'          => $conf_UAM[32]=='false' ?  'checked="checked"' : '' ,
-    'UAM_STUFFS_TRUE'                => $conf_UAM[33]=='true' ?  'checked="checked"' : '' ,
-    'UAM_STUFFS_FALSE'               => $conf_UAM[33]=='false' ?  'checked="checked"' : '' ,
-    'UAM_HIDEPASSW_TRUE'             => $conf_UAM[34]=='true' ?  'checked="checked"' : '' ,
-    'UAM_HIDEPASSW_FALSE'            => $conf_UAM[34]=='false' ?  'checked="checked"' : '' ,
-		'UAM_NO_VALID_LEVEL'             => $conf_UAM[35],
-		'UAM_VALID_LEVEL'                => $conf_UAM[36],
-    'UAM_DOWNGRADE_LEVEL'            => $conf_UAM[37],
-    'UAM_PWDRESET_TRUE'              => $conf_UAM[38]=='true' ?  'checked="checked"' : '' ,
-    'UAM_PWDRESET_FALSE'             => $conf_UAM[38]=='false' ?  'checked="checked"' : '' ,
-    'UAM_REJECTCONNECT_TRUE'         => $conf_UAM[39]=='true' ?  'checked="checked"' : '' ,
-    'UAM_REJECTCONNECT_FALSE'        => $conf_UAM[39]=='false' ?  'checked="checked"' : '' ,
-    'UAM_REJECTCONNECT_TEXT'         => $conf_UAM[40],
-		'UAM_PASSWORD_TEST_SCORE'        => $UAM_Password_Test_Score,
-    'UAM_ERROR_REPORTS1'             => $UAM_Exclusionlist_Error,
-    'UAM_ERROR_REPORTS2'             => $UAM_Illegal_Flag_Error1,
-    'UAM_ERROR_REPORTS3'             => $UAM_Illegal_Flag_Error2,
-    'UAM_ERROR_REPORTS4'             => $UAM_Illegal_Flag_Error3,
-    'UAM_EMAIL_MANDATORY'            => $UAM_Email_Mandatory_Check,
-		'UAM_CONFIRMMAIL_TIMEOUT_TRUE'	 => $conf_UAM_ConfirmMail[0]=='true' ?  'checked="checked"' : '' ,
-		'UAM_CONFIRMMAIL_TIMEOUT_FALSE'  => $conf_UAM_ConfirmMail[0]=='false' ?  'checked="checked"' : '' ,
-		'UAM_CONFIRMMAIL_DELAY'					 => $conf_UAM_ConfirmMail[1],
-    'UAM_CONFIRMMAIL_REMAIL_TRUE'		 => $conf_UAM_ConfirmMail[3]=='true' ? 'checked="checked"' : '',
-    'UAM_CONFIRMMAIL_REMAIL_FALSE'	 => $conf_UAM_ConfirmMail[3]=='false' ? 'checked="checked"' : '',
-    'UAM_CONFIRMMAIL_REMAIL_TXT1'		 => $conf_UAM_ConfirmMail[2],
-    'UAM_CONFIRMMAIL_REMAIL_TXT2'		 => $conf_UAM_ConfirmMail[4],
-    'UAM_CONFIRMMAIL_CUSTOM_TXT1'		 => $conf_UAM_ConfirmMail[5],
-    'UAM_CONFIRMMAIL_CUSTOM_TXT2'		 => $conf_UAM_ConfirmMail[6],
+    'nb_para'                           => $nb_para,
+    'nb_para2'                          => $nb_para2,
+    'UAM_VERSION'                       => $version,
+    'UAM_PATH'                          => UAM_PATH,
+    'UAM_DUMP_DOWNLOAD'                 => $dump_download,
+    'UAM_THEME'                         => $UAM_theme,
+		'UAM_MAIL_INFO_TRUE'                => $conf_UAM[0]=='true' ?  'checked="checked"' : '' ,
+		'UAM_MAIL_INFO_FALSE'               => $conf_UAM[0]=='false' ?  'checked="checked"' : '' ,
+		'UAM_MAILINFO_TEXT'                 => $conf_UAM[8],
+		'UAM_USERNAME_CHAR_TRUE'            => $conf_UAM[5]=='true' ?  'checked="checked"' : '' ,
+		'UAM_USERNAME_CHAR_FALSE'           => $conf_UAM[5]=='false' ?  'checked="checked"' : '' ,
+		'UAM_USERNAME_CHAR_LIST'            => $conf_UAM[6],
+		'UAM_CONFIRM_MAIL_TRUE'             => $conf_UAM[1]=='true' ?  'checked="checked"' : '' ,
+		'UAM_CONFIRM_MAIL_FALSE'            => $conf_UAM[1]=='false' ?  'checked="checked"' : '' ,
+    'UAM_CONFIRM_MAIL_LOCAL'            => $conf_UAM[1]=='local' ?  'checked="checked"' : '' ,
+		'UAM_CONFIRMMAIL_TEXT'              => $conf_UAM[9],
+		'UAM_No_Confirm_Group'              => $conf_UAM[2],
+		'UAM_Validated_Group'               => $conf_UAM[3],
+		'UAM_No_Confirm_Status'             => $conf_UAM[7],
+		'UAM_Validated_Status'              => $conf_UAM[4],
+		'UAM_MAILEXCLUSION_TRUE'            => $conf_UAM[10]=='true' ?  'checked="checked"' : '' ,
+		'UAM_MAILEXCLUSION_FALSE'           => $conf_UAM[10]=='false' ?  'checked="checked"' : '' ,
+		'UAM_MAILEXCLUSION_LIST'            => $conf_UAM[11],
+		'UAM_PASSWORDENF_TRUE'              => $conf_UAM[12]=='true' ?  'checked="checked"' : '' ,
+		'UAM_PASSWORDENF_FALSE'             => $conf_UAM[12]=='false' ?  'checked="checked"' : '' ,
+		'UAM_PASSWORD_SCORE'                => $conf_UAM[13],
+    'UAM_ADMINPASSWENF_TRUE'            => $conf_UAM[14]=='true' ?  'checked="checked"' : '' ,
+		'UAM_ADMINPASSWENF_FALSE'           => $conf_UAM[14]=='false' ?  'checked="checked"' : '' ,
+    'UAM_GHOSTRACKER_TRUE'              => $conf_UAM[15]=='true' ?  'checked="checked"' : '' ,
+		'UAM_GHOSTRACKER_FALSE'             => $conf_UAM[15]=='false' ?  'checked="checked"' : '' ,
+    'UAM_GHOSTRACKER_DAYLIMIT'          => $conf_UAM[16],
+    'UAM_GHOSTRACKER_REMINDERTEXT'      => $conf_UAM[17],
+    'UAM_ADDLASTVISIT_TRUE'             => $conf_UAM[18]=='true' ?  'checked="checked"' : '' ,
+    'UAM_ADDLASTVISIT_FALSE'            => $conf_UAM[18]=='false' ?  'checked="checked"' : '' ,
+    'UAM_ADMINCONFMAIL_TRUE'            => $conf_UAM[19]=='true' ?  'checked="checked"' : '' ,
+    'UAM_ADMINCONFMAIL_FALSE'           => $conf_UAM[19]=='false' ?  'checked="checked"' : '' ,
+    'UAM_REDIRTOPROFILE_TRUE'           => $conf_UAM[20]=='true' ?  'checked="checked"' : '' ,
+    'UAM_REDIRTOPROFILE_FALSE'          => $conf_UAM[20]=='false' ?  'checked="checked"' : '' ,
+    'UAM_GTAUTO_TRUE'                   => $conf_UAM[21]=='true' ?  'checked="checked"' : '' ,
+    'UAM_GTAUTO_FALSE'                  => $conf_UAM[21]=='false' ?  'checked="checked"' : '' ,
+    'UAM_GTAUTOMAIL_TRUE'               => $conf_UAM[22]=='true' ?  'checked="checked"' : '' ,
+    'UAM_GTAUTOMAIL_FALSE'              => $conf_UAM[22]=='false' ?  'checked="checked"' : '' ,
+    'UAM_GTAUTODEL_TEXT'                => $conf_UAM[23],
+    'UAM_GTAUTOMAILTEXT'                => $conf_UAM[24],
+		'UAM_Downgrade_Group'               => $conf_UAM[25],
+		'UAM_Downgrade_Status'              => $conf_UAM[26],
+    'UAM_ADMINVALIDATIONMAIL_TEXT'      => $conf_UAM[27],
+    'UAM_CUSTOMPASSWRETR_TRUE'          => $conf_UAM[28]=='true' ?  'checked="checked"' : '' ,
+    'UAM_CUSTOMPASSWRETR_FALSE'         => $conf_UAM[28]=='false' ?  'checked="checked"' : '' ,
+    'UAM_CUSTOMPASSWRETR_TEXT'          => $conf_UAM[29],
+    'UAM_USRAUTO_TRUE'                  => $conf_UAM[30]=='true' ?  'checked="checked"' : '' ,
+    'UAM_USRAUTO_FALSE'                 => $conf_UAM[30]=='false' ?  'checked="checked"' : '' ,
+    'UAM_USRAUTODEL_TEXT'               => $conf_UAM[31],
+    'UAM_USRAUTOMAIL_TRUE'              => $conf_UAM[32]=='true' ?  'checked="checked"' : '' ,
+    'UAM_USRAUTOMAIL_FALSE'             => $conf_UAM[32]=='false' ?  'checked="checked"' : '' ,
+    'UAM_STUFFS_TRUE'                   => $conf_UAM[33]=='true' ?  'checked="checked"' : '' ,
+    'UAM_STUFFS_FALSE'                  => $conf_UAM[33]=='false' ?  'checked="checked"' : '' ,
+    'UAM_HIDEPASSW_TRUE'                => $conf_UAM[34]=='true' ?  'checked="checked"' : '' ,
+    'UAM_HIDEPASSW_FALSE'               => $conf_UAM[34]=='false' ?  'checked="checked"' : '' ,
+		'UAM_NO_VALID_LEVEL'                => $conf_UAM[35],
+		'UAM_VALID_LEVEL'                   => $conf_UAM[36],
+    'UAM_DOWNGRADE_LEVEL'               => $conf_UAM[37],
+    'UAM_PWDRESET_TRUE'                 => $conf_UAM[38]=='true' ?  'checked="checked"' : '' ,
+    'UAM_PWDRESET_FALSE'                => $conf_UAM[38]=='false' ?  'checked="checked"' : '' ,
+    'UAM_REJECTCONNECT_TRUE'            => $conf_UAM[39]=='true' ?  'checked="checked"' : '' ,
+    'UAM_REJECTCONNECT_FALSE'           => $conf_UAM[39]=='false' ?  'checked="checked"' : '' ,
+    'UAM_REJECTCONNECT_TEXT'            => $conf_UAM[40],
+    'UAM_CONFIRMMAIL_SUBJECT'           => $conf_UAM[41],
+    'UAM_CONFIRMMAIL_REMAIL_SUBJECT'    => $conf_UAM[42],
+    'UAM_INFOMAIL_SUBJECT'              => $conf_UAM[43],
+    'UAM_GTAUTOMAIL_SUBJECT'            => $conf_UAM[44],
+    'UAM_GTREMINDER_SUBJECT'            => $conf_UAM[45],
+    'UAM_ADMINVALIDATIONMAIL_SUBJECT'   => $conf_UAM[46],
+		'UAM_PASSWORD_TEST_SCORE'           => $UAM_Password_Test_Score,
+    'UAM_ERROR_REPORTS1'                => $UAM_Exclusionlist_Error,
+    'UAM_ERROR_REPORTS2'                => $UAM_Illegal_Flag_Error1,
+    'UAM_ERROR_REPORTS3'                => $UAM_Illegal_Flag_Error2,
+    'UAM_ERROR_REPORTS4'                => $UAM_Illegal_Flag_Error3,
+    'UAM_EMAIL_MANDATORY'               => $UAM_Email_Mandatory_Check,
+		'UAM_CONFIRMMAIL_TIMEOUT_TRUE'	    => $conf_UAM_ConfirmMail[0]=='true' ?  'checked="checked"' : '' ,
+		'UAM_CONFIRMMAIL_TIMEOUT_FALSE'     => $conf_UAM_ConfirmMail[0]=='false' ?  'checked="checked"' : '' ,
+		'UAM_CONFIRMMAIL_DELAY'					    => $conf_UAM_ConfirmMail[1],
+    'UAM_CONFIRMMAIL_REMAIL_TRUE'       => $conf_UAM_ConfirmMail[3]=='true' ? 'checked="checked"' : '',
+    'UAM_CONFIRMMAIL_REMAIL_FALSE'      => $conf_UAM_ConfirmMail[3]=='false' ? 'checked="checked"' : '',
+    'UAM_CONFIRMMAIL_REMAIL_TXT1'       => $conf_UAM_ConfirmMail[2],
+    'UAM_CONFIRMMAIL_REMAIL_TXT2'       => $conf_UAM_ConfirmMail[4],
+    'UAM_CONFIRMMAIL_CUSTOM_TXT1'       => $conf_UAM_ConfirmMail[5],
+    'UAM_CONFIRMMAIL_CUSTOM_TXT2'       => $conf_UAM_ConfirmMail[6],
     )
   );
Index: /extensions/UserAdvManager/branches/2.40/admin/template/global.tpl
===================================================================
--- /extensions/UserAdvManager/branches/2.40/admin/template/global.tpl	(revision 14729)
+++ /extensions/UserAdvManager/branches/2.40/admin/template/global.tpl	(revision 14730)
@@ -231,27 +231,55 @@
           <fieldset>
           <ul>
+            <p class="new_in_version">{'UAM_NewFeature'|@translate}</p>
             <li>
-              <label class="cluetip" title="{'UAM_AdminValidationMail_Text'|translate}|{'UAM_AdminValidationMail_d'|translate}">
-                {'UAM_AdminValidationMail_Text'|@translate}
+            <div class="uam_new">
+              <label class="cluetip" title="{'UAM_AdminValidationMail_Subject'|translate}|{'UAM_AdminValidationMail_Subject_d'|translate}">
+                {'UAM_AdminValidationMail_Subject'|@translate}
               </label>
             <br><br>
-              <textarea class="uam_textfields" name="UAM_AdminValidationMail_Text" id="UAM_AdminValidationMail_Text" rows="10" {$TAG_INPUT_ENABLED}>{$UAM_ADMINVALIDATIONMAIL_TEXT}</textarea>
-            <br><br>
+              &nbsp;&nbsp;<textarea class="uam_textfields" name="UAM_AdminValidationMail_Subject" id="UAM_AdminValidationMail_Subject" rows="5" {$TAG_INPUT_ENABLED}>{$UAM_ADMINVALIDATIONMAIL_SUBJECT}</textarea>
+            <br><br>
+            </div>
             </li>
+
+            <ul>
+              <li>
+                <label class="cluetip" title="{'UAM_AdminValidationMail_Text'|translate}|{'UAM_AdminValidationMail_d'|translate}">
+                  {'UAM_AdminValidationMail_Text'|@translate}
+                </label>
+              <br><br>
+                <textarea class="uam_textfields" name="UAM_AdminValidationMail_Text" id="UAM_AdminValidationMail_Text" rows="10" {$TAG_INPUT_ENABLED}>{$UAM_ADMINVALIDATIONMAIL_TEXT}</textarea>
+              <br><br>
+              </li>
+            </ul>
           </ul>
 
           <ul>
+            <p class="new_in_version">{'UAM_NewFeature'|@translate}</p>
             <li>
-              <label class="cluetip" title="{'UAM_ConfirmMail_Text'|translate}|{'UAM_confirmtxtTitle_d'|translate}">
-                {'UAM_ConfirmMail_Text'|@translate}
+            <div class="uam_new">
+              <label class="cluetip" title="{'UAM_ConfirmMail_Subject'|translate}|{'UAM_ConfirmMail_Subject_d'|translate}">
+                {'UAM_ConfirmMail_Subject'|@translate}
               </label>
             <br><br>
-            {if $UAM_ERROR_REPORTS2}
-                <textarea class="uam_textfields" name="UAM_ConfirmMail_Text" id="UAM_ConfirmMail_Text" rows="10" style="color: red" {$TAG_INPUT_ENABLED}>{$UAM_CONFIRMMAIL_TEXT}</textarea>
-            {else}
-                <textarea class="uam_textfields" name="UAM_ConfirmMail_Text" id="UAM_ConfirmMail_Text" rows="10" {$TAG_INPUT_ENABLED}>{$UAM_CONFIRMMAIL_TEXT}</textarea>
-            {/if}
-            <br><br>
+              &nbsp;&nbsp;<textarea class="uam_textfields" name="UAM_ConfirmMail_Subject" id="UAM_ConfirmMail_Subject" rows="5" {$TAG_INPUT_ENABLED}>{$UAM_CONFIRMMAIL_SUBJECT}</textarea>
+            <br><br>
+            </div>
             </li>
+
+            <ul>
+              <li>
+                <label class="cluetip" title="{'UAM_ConfirmMail_Text'|translate}|{'UAM_confirmtxtTitle_d'|translate}">
+                  {'UAM_ConfirmMail_Text'|@translate}
+                </label>
+              <br><br>
+              {if $UAM_ERROR_REPORTS2}
+                  <textarea class="uam_textfields" name="UAM_ConfirmMail_Text" id="UAM_ConfirmMail_Text" rows="10" style="color: red" {$TAG_INPUT_ENABLED}>{$UAM_CONFIRMMAIL_TEXT}</textarea>
+              {else}
+                  <textarea class="uam_textfields" name="UAM_ConfirmMail_Text" id="UAM_ConfirmMail_Text" rows="10" {$TAG_INPUT_ENABLED}>{$UAM_CONFIRMMAIL_TEXT}</textarea>
+              {/if}
+              <br><br>
+              </li>
+            </ul>
 <!--
             {* if 'FCK_PATH'|@defined *}
@@ -261,5 +289,5 @@
             {* /if *}
 -->
-
+          <br><hr><br>
             <li>
               <label class="cluetip" title="{'UAM_confirmmail_custom_Txt1'|translate}|{'UAM_confirmmail_custom1_d'|translate}">
@@ -293,7 +321,5 @@
 
           <fieldset>
-          <div class="uam_new">
             <ul>
-              <p class="new_in_version">{'UAM_NewFeature'|@translate}</p>
          	    <li>
                 <label class="cluetip" title="{'UAM_RejectConnexion'|translate}|{'UAM_RejectConnexion_d'|translate}">
@@ -328,7 +354,6 @@
             {/if}
             </ul>
-          </div>
-
-          <br>
+
+          <br><hr><br>
 
           <ul>
@@ -460,16 +485,29 @@
 
               <ul>
+                <p class="new_in_version">{'UAM_NewFeature'|@translate}</p>
                 <li>
-                  <label class="cluetip" title="{'UAM_remailtxt1Title'|translate}|{'UAM_remailtxt1Title_d'|translate}">
-                    {'UAM_ConfirmMail_ReMail_Txt1'|@translate}
+                <div class="uam_new">
+                  <label class="cluetip" title="{'UAM_ConfirmMail_ReMail_Subject'|translate}|{'UAM_ConfirmMail_ReMail_Subject_d'|translate}">
+                    {'UAM_ConfirmMail_ReMail_Subject'|@translate}
                   </label>
                 <br><br>
-                {if $UAM_ERROR_REPORTS3}
+                  &nbsp;&nbsp;<textarea class="uam_textfields" name="UAM_ConfirmMail_Remail_Subject" id="UAM_ConfirmMail_Remail_Subject" rows="5" {$TAG_INPUT_ENABLED}>{$UAM_CONFIRMMAIL_REMAIL_SUBJECT}</textarea>
+                <br><br>
+                </div>
+                </li>
+
+                <ul>
+                  <li>
+                    <label class="cluetip" title="{'UAM_remailtxt1Title'|translate}|{'UAM_remailtxt1Title_d'|translate}">
+                      {'UAM_ConfirmMail_ReMail_Txt1'|@translate}
+                    </label>
+                  <br><br>
+                  {if $UAM_ERROR_REPORTS3}
                     <textarea class="uam_textfields" name="UAM_ConfirmMail_ReMail_Txt1" id="UAM_ConfirmMail_ReMail_Txt1" rows="10" style="color: red" {$TAG_INPUT_ENABLED}>{$UAM_CONFIRMMAIL_REMAIL_TXT1}</textarea>
-                {else}
+                  {else}
                     <textarea class="uam_textfields" name="UAM_ConfirmMail_ReMail_Txt1" id="UAM_ConfirmMail_ReMail_Txt1" rows="10" {$TAG_INPUT_ENABLED}>{$UAM_CONFIRMMAIL_REMAIL_TXT1}</textarea>
-                {/if}
-                <br><br>
-                </li>
+                  {/if}
+                  <br><br>
+                  </li>
 <!--
                 {* if 'FCK_PATH'|@defined *}
@@ -480,16 +518,16 @@
 -->
 
-                <li>
-                  <label class="cluetip" title="{'UAM_remailtxt2Title'|translate}|{'UAM_remailtxt2Title_d'|translate}">
-                    {'UAM_ConfirmMail_ReMail_Txt2'|@translate}
-                  </label>
-                <br><br>
-                {if $UAM_ERROR_REPORTS4}
+                  <li>
+                    <label class="cluetip" title="{'UAM_remailtxt2Title'|translate}|{'UAM_remailtxt2Title_d'|translate}">
+                      {'UAM_ConfirmMail_ReMail_Txt2'|@translate}
+                    </label>
+                  <br><br>
+                  {if $UAM_ERROR_REPORTS4}
                     <textarea class="uam_textfields" name="UAM_ConfirmMail_ReMail_Txt2" id="UAM_ConfirmMail_ReMail_Txt2" rows="10" style="color: red" {$TAG_INPUT_ENABLED}>{$UAM_CONFIRMMAIL_REMAIL_TXT2}</textarea>
-                {else}
+                  {else}
                     <textarea class="uam_textfields" name="UAM_ConfirmMail_ReMail_Txt2" id="UAM_ConfirmMail_ReMail_Txt2" rows="10" {$TAG_INPUT_ENABLED}>{$UAM_CONFIRMMAIL_REMAIL_TXT2}</textarea>
-                {/if}
-                <br>
-                </li>
+                  {/if}
+                  <br>
+                  </li>
 <!--
                 {* if 'FCK_PATH'|@defined *}
@@ -499,4 +537,6 @@
                 {* /if *}
 -->
+
+                </ul>
               </ul>
             </ul>
@@ -590,14 +630,28 @@
           </li>
 
-          <fieldset>          
+          <fieldset>
           <ul>
+            <p class="new_in_version">{'UAM_NewFeature'|@translate}</p>
             <li>
-              <label class="cluetip" title="{'UAM_GhostTracker_ReminderText'|translate}|{'UAM_gttextTitle_d'|translate}">
-                {'UAM_GhostTracker_ReminderText'|@translate}
+            <div class="uam_new">
+              <label class="cluetip" title="{'UAM_GTReminder_Subject'|translate}|{'UAM_GTReminder_Subject_d'|translate}">
+                {'UAM_GTReminder_Subject'|@translate}
               </label>
             <br><br>
-              <textarea class="uam_textfields" name="UAM_GhostTracker_ReminderText" id="UAM_GhostTracker_ReminderText" rows="10" {$TAG_INPUT_ENABLED}>{$UAM_GHOSTRACKER_REMINDERTEXT}</textarea>
-            <br><br>
+              &nbsp;&nbsp;<textarea class="uam_textfields" name="UAM_GTReminder_Subject" id="UAM_GTReminder_Subject" rows="5" {$TAG_INPUT_ENABLED}>{$UAM_GTREMINDER_SUBJECT}</textarea>
+            <br><br>
+            </div>
             </li>
+
+            <ul>
+              <li>
+                <label class="cluetip" title="{'UAM_GhostTracker_ReminderText'|translate}|{'UAM_gttextTitle_d'|translate}">
+                  {'UAM_GhostTracker_ReminderText'|@translate}
+                </label>
+              <br><br>
+                <textarea class="uam_textfields" name="UAM_GhostTracker_ReminderText" id="UAM_GhostTracker_ReminderText" rows="10" {$TAG_INPUT_ENABLED}>{$UAM_GHOSTRACKER_REMINDERTEXT}</textarea>
+              <br><br>
+              </li>
+            </ul>
 <!--
             {* if 'FCK_PATH'|@defined *}
@@ -691,7 +745,27 @@
                         <input type="radio" value="true" {$UAM_GTAUTOMAIL_TRUE} name="UAM_GTAutoMail">
                           {'UAM_Enable'|@translate}
-                      <br><br><br>
-                        <textarea class="uam_textfields" name="UAM_GTAutoMailText" id="UAM_GTAutoMailText" rows="10" {$TAG_INPUT_ENABLED}>{$UAM_GTAUTOMAILTEXT}</textarea>
                       <br><br>
+                        <p class="new_in_version">{'UAM_NewFeature'|@translate}</p>
+                        <li>
+                        <div class="uam_new">
+                          <label class="cluetip" title="{'UAM_GTAutomail_Subject'|translate}|{'UAM_GTAutomail_Subject_d'|translate}">
+                            {'UAM_GTAutomail_Subject'|@translate}
+                          </label>
+                        <br><br>
+                          &nbsp;&nbsp;<textarea class="uam_textfields" name="UAM_GTAutoMail_Subject" id="UAM_GTAutoMail_Subject" rows="5" {$TAG_INPUT_ENABLED}>{$UAM_GTAUTOMAIL_SUBJECT}</textarea>
+                        <br><br>
+                        </div>
+                        </li>
+
+                        <ul>
+                          <li>
+                            <label class="cluetip" title="{'UAM_GTAutomail_Text'|translate}|{'UAM_GTAutomail_Text_d'|translate}">
+                              {'UAM_GTAutomail_Text'|@translate}
+                            </label>
+                          <br><br>
+                            <textarea class="uam_textfields" name="UAM_GTAutoMailText" id="UAM_GTAutoMailText" rows="10" {$TAG_INPUT_ENABLED}>{$UAM_GTAUTOMAILTEXT}</textarea>
+                          <br><br>
+                          </li>
+                        </ul>
                       </li>
                     </ul>
@@ -748,13 +822,27 @@
             <br><br>
             </li>
-
+            
+            <p class="new_in_version">{'UAM_NewFeature'|@translate}</p>
             <li>
-              <label class="cluetip" title="{'UAM_MailInfo_Text'|translate}|{'UAM_infotxtTitle_d'|translate}">
-                {'UAM_MailInfo_Text'|@translate}
+            <div class="uam_new">
+              <label class="cluetip" title="{'UAM_MailInfo_Subject'|translate}|{'UAM_MailInfo_Subject_d'|translate}">
+                {'UAM_MailInfo_Subject'|@translate}
               </label>
             <br><br>
-              <textarea class="uam_textfields" name="UAM_MailInfo_Text" id="UAM_MailInfo_Text" rows="10" {$TAG_INPUT_ENABLED}>{$UAM_MAILINFO_TEXT}</textarea>
-            <br><br>
+              &nbsp;&nbsp;<textarea class="uam_textfields" name="UAM_InfoMail_Subject" id="UAM_InfoMail_Subject" rows="5" {$TAG_INPUT_ENABLED}>{$UAM_INFOMAIL_SUBJECT}</textarea>
+            <br><br>
+            </div>
             </li>
+
+            <ul>
+              <li>
+                <label class="cluetip" title="{'UAM_MailInfo_Text'|translate}|{'UAM_infotxtTitle_d'|translate}">
+                  {'UAM_MailInfo_Text'|@translate}
+                </label>
+              <br><br>
+                <textarea class="uam_textfields" name="UAM_MailInfo_Text" id="UAM_MailInfo_Text" rows="10" {$TAG_INPUT_ENABLED}>{$UAM_MAILINFO_TEXT}</textarea>
+              <br><br>
+              </li>
+            </ul>
 <!--
             {* if 'FCK_PATH'|@defined *}
Index: /extensions/UserAdvManager/branches/2.40/changelog.txt.php
===================================================================
--- /extensions/UserAdvManager/branches/2.40/changelog.txt.php	(revision 14729)
+++ /extensions/UserAdvManager/branches/2.40/changelog.txt.php	(revision 14730)
@@ -300,8 +300,13 @@
             Bug 2571 fixed - Piwigo 2.4 compliance : Information email removed on user registration because already managed by Piwigo
             Bug 2572 fixed - Adding a local home icon on ConfirmMail, rejected and del_account pages
-            Bug 2591 fixed - Excluding Adult_Content generic users from users tracking list
+            Bug 2591 fixed - Exclusion of Adult_Content generic users from users tracking list
             Bug 2603 fixed - Php notice when user changes his email in his profile if confirmation by email is set
             Bug 2619 fixed - Confirmation email when registered user changes his email was not sent and user not demoted
             Bug 2620 fixed - Display of ConfirmMail, rejected and del_account pages have been improved
+            Bug 2621 fixed - Display of ConfirmMail, rejected and del_account pages have been improved for IE8 and IE9 render
+            Bug 2622 fixed - Display of ConfirmMail, rejected and del_account pages have been improved for Stripped theme
+            Bug 2623 fixed - Ability to customize email subjects (confirmation, information and ghostTracker email)
+            Bug 2628 fixed - Php notice when email is not mandatory for registration
+            Bug 2631 fixed - Piwigo 2.4 compliance : $conf['gallery_url'] replaced by get_gallery_home_url() for [myurl] tag
 */
 ?>
Index: /extensions/UserAdvManager/branches/2.40/include/functions.inc.php
===================================================================
--- /extensions/UserAdvManager/branches/2.40/include/functions.inc.php	(revision 14729)
+++ /extensions/UserAdvManager/branches/2.40/include/functions.inc.php	(revision 14730)
@@ -856,10 +856,8 @@
   {
     // Management of Extension flags ([mygallery], [myurl])
-    //$patterns[] = '#\[username\]#i';
-    //$replacements[] = stripslashes($row['username']);
     $patterns[] = '#\[mygallery\]#i';
     $replacements[] = $conf['gallery_title'];
     $patterns[] = '#\[myurl\]#i';
-    $replacements[] = $conf['gallery_url'];
+    $replacements[] = get_gallery_home_url();
     
     $infos = preg_replace($patterns, $replacements, $conf_UAM[29])."\n"."\n".$infos;
@@ -885,4 +883,5 @@
 	$infos1_perso = "";
   $infos2_perso = "";
+  $subject = "";
 
 // We have to get the user's language in database
@@ -916,10 +915,39 @@
   {
     case 1: // Confirmation email on user registration - Without information email (already managed by Piwigo)
-      $subject = '['.$conf['gallery_title'].'] '.l10n_args(get_l10n_args('UAM_Add of %s', stripslashes($username)));
+      if (isset($conf_UAM[41]) and $conf_UAM[41] <> '')
+      {
+        // Management of Extension flags ([username], [mygallery])
+        // -------------------------------------------------------
+        $patterns[] = '#\[username\]#i';
+        $replacements[] = $username;
+        $patterns[] = '#\[mygallery\]#i';
+        $replacements[] = $conf['gallery_title'];
+    
+        if (function_exists('get_user_language_desc'))
+        {
+          $subject = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM[41]))."\n\n";
+        }
+        else $subject = l10n(preg_replace($patterns, $replacements, $conf_UAM[41]))."\n\n"; 
+      }
 
       break;
       
     case 2: // Confirmation email on user profile update - With information email if checked
-      $subject = '['.$conf['gallery_title'].'] '.l10n_args(get_l10n_args('UAM_Update of %s', stripslashes($username)));
+      if (isset($conf_UAM[41]) and $conf_UAM[41] <> '')
+      {
+        // Management of Extension flags ([username], [mygallery])
+        // -------------------------------------------------------
+        $patterns[] = '#\[username\]#i';
+        $replacements[] = $username;
+        $patterns[] = '#\[mygallery\]#i';
+        $replacements[] = $conf['gallery_title'];
+    
+        if (function_exists('get_user_language_desc'))
+        {
+          $subject = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM[41]))."\n\n";
+        }
+        else $subject = l10n(preg_replace($patterns, $replacements, $conf_UAM[41]))."\n\n"; 
+      }
+
       $password = $password <> '' ? $password : l10n('UAM_empty_pwd');
 
@@ -933,5 +961,5 @@
         $replacements[] = $conf['gallery_title'];
         $patterns[] = '#\[myurl\]#i';
-        $replacements[] = $conf['gallery_url'];
+        $replacements[] = get_gallery_home_url();
     
         if (function_exists('get_user_language_desc'))
@@ -968,5 +996,20 @@
         
     case 3: // Only information email send to user if checked
-      $subject = '['.$conf['gallery_title'].'] '.l10n_args(get_l10n_args('UAM_Update of %s', stripslashes($username)));
+      if (isset($conf_UAM[43]) and $conf_UAM[43] <> '')
+      {
+        // Management of Extension flags ([username], [mygallery])
+        // -------------------------------------------------------
+        $patterns[] = '#\[username\]#i';
+        $replacements[] = $username;
+        $patterns[] = '#\[mygallery\]#i';
+        $replacements[] = $conf['gallery_title'];
+    
+        if (function_exists('get_user_language_desc'))
+        {
+          $subject = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM[43]))."\n\n";
+        }
+        else $subject = l10n(preg_replace($patterns, $replacements, $conf_UAM[43]))."\n\n"; 
+      }
+
       $password = $password <> '' ? $password : l10n('UAM_no_update_pwd');
 
@@ -980,5 +1023,5 @@
         $replacements[] = $conf['gallery_title'];
         $patterns[] = '#\[myurl\]#i';
-        $replacements[] = $conf['gallery_url'];
+        $replacements[] = get_gallery_home_url();
     
         if (function_exists('get_user_language_desc'))
@@ -1032,5 +1075,5 @@
       $replacements[] = $conf['gallery_title'];
       $patterns[] = '#\[myurl\]#i';
-      $replacements[] = $conf['gallery_url'];
+      $replacements[] = get_gallery_home_url();
       
       if (isset($conf_UAM_ConfirmMail[0]) and $conf_UAM_ConfirmMail[0] == 'true') // [Kdays] replacement only if related option is active
@@ -1070,4 +1113,6 @@
 {
   global $conf;
+  
+  $subject = "";
 
   $conf_UAM = unserialize($conf['UserAdvManager']);
@@ -1096,5 +1141,19 @@
   {
     case 1: //Generating email content for remind with a new key
-      $subject = '['.$conf['gallery_title'].'] '.l10n_args(get_l10n_args('UAM_Reminder_with_key_of_%s', $username));
+      if (isset($conf_UAM[42]) and $conf_UAM[42] <> '')
+      {
+        // Management of Extension flags ([username], [mygallery])
+        // -------------------------------------------------------
+        $patterns[] = '#\[username\]#i';
+        $replacements[] = $username;
+        $patterns[] = '#\[mygallery\]#i';
+        $replacements[] = $conf['gallery_title'];
+    
+        if (function_exists('get_user_language_desc'))
+        {
+          $subject = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM[42]))."\n\n";
+        }
+        else $subject = l10n(preg_replace($patterns, $replacements, $conf_UAM[42]))."\n\n"; 
+      }
       
       if (isset($conf_UAM_ConfirmMail[2]) and $conf_UAM_ConfirmMail[2] <> '' and isset($conf_UAM_ConfirmMail[3]) and $conf_UAM_ConfirmMail[3] == 'true' and $confirm)
@@ -1107,5 +1166,5 @@
         $replacements[] = $conf['gallery_title'];
         $patterns[] = '#\[myurl\]#i';
-        $replacements[] = $conf['gallery_url'];
+        $replacements[] = get_gallery_home_url();
 
         if (isset($conf_UAM_ConfirmMail[0]) and $conf_UAM_ConfirmMail[0] == 'true') // [Kdays] replacement only if related option is active
@@ -1140,5 +1199,19 @@
       
     case 2: //Generating email content for remind without a new key
-      $subject = '['.$conf['gallery_title'].'] '.l10n_args(get_l10n_args('UAM_Reminder_without_key_of_%s',$username));
+      if (isset($conf_UAM[42]) and $conf_UAM[42] <> '')
+      {
+        // Management of Extension flags ([username], [mygallery])
+        // -------------------------------------------------------
+        $patterns[] = '#\[username\]#i';
+        $replacements[] = $username;
+        $patterns[] = '#\[mygallery\]#i';
+        $replacements[] = $conf['gallery_title'];
+    
+        if (function_exists('get_user_language_desc'))
+        {
+          $subject = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM[42]))."\n\n";
+        }
+        else $subject = l10n(preg_replace($patterns, $replacements, $conf_UAM[42]))."\n\n"; 
+      }
       
       if (isset($conf_UAM_ConfirmMail[4]) and $conf_UAM_ConfirmMail[4] <> '' and isset($conf_UAM_ConfirmMail[3]) and $conf_UAM_ConfirmMail[3] == 'true' and !$confirm)
@@ -1151,5 +1224,5 @@
         $replacements[] = $conf['gallery_title'];
         $patterns[] = '#\[myurl\]#i';
-        $replacements[] = $conf['gallery_url'];
+        $replacements[] = get_gallery_home_url();
 
         if (isset($conf_UAM_ConfirmMail[0]) and $conf_UAM_ConfirmMail[0] == 'true') // [Kdays] replacement only if related option is active
@@ -1200,8 +1273,7 @@
 
   $conf_UAM = unserialize($conf['UserAdvManager']);
+  $subject = "";
   
 	include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php');
-  
-	$infos1_perso = "";
 
 // We have to get the user's language in database
@@ -1220,6 +1292,20 @@
    
   load_language('plugin.lang', UAM_PATH);
-  
-  $subject = '['.$conf['gallery_title'].'] '.l10n_args(get_l10n_args('UAM_Ghost_reminder_of_%s', $username));     
+
+  if (isset($conf_UAM[45]) and $conf_UAM[45] <> '')
+  {
+    // Management of Extension flags ([username], [mygallery])
+    // -------------------------------------------------------
+    $patterns[] = '#\[username\]#i';
+    $replacements[] = $username;
+    $patterns[] = '#\[mygallery\]#i';
+    $replacements[] = $conf['gallery_title'];
+
+    if (function_exists('get_user_language_desc'))
+    {
+      $subject = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM[45]))."\n\n";
+    }
+    else $subject = l10n(preg_replace($patterns, $replacements, $conf_UAM[45]))."\n\n"; 
+  }
 
   if (isset($conf_UAM[17]) and $conf_UAM[17] <> '' and isset($conf_UAM[15]) and $conf_UAM[15] == 'true')
@@ -1232,5 +1318,5 @@
     $replacements[] = $conf['gallery_title'];
     $patterns[] = '#\[myurl\]#i';
-    $replacements[] = $conf['gallery_url'];
+    $replacements[] = get_gallery_home_url();
     $patterns[] = '#\[days\]#i';
     $replacements[] = $conf_UAM[16];
@@ -1274,4 +1360,5 @@
   
 	$custom_txt = "";
+  $subject = "";
 
 // We have to get the user's language in database
@@ -1302,5 +1389,19 @@
   }
 
-  $subject = '['.$conf['gallery_title'].'] '.l10n_args(get_l10n_args('UAM_Demotion of %s', stripslashes($username)));
+  if (isset($conf_UAM[44]) and $conf_UAM[44] <> '')
+  {
+    // Management of Extension flags ([username], [mygallery])
+    // -------------------------------------------------------
+    $patterns[] = '#\[username\]#i';
+    $replacements[] = $username;
+    $patterns[] = '#\[mygallery\]#i';
+    $replacements[] = $conf['gallery_title'];
+
+    if (function_exists('get_user_language_desc'))
+    {
+      $subject = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM[44]))."\n\n";
+    }
+    else $subject = l10n(preg_replace($patterns, $replacements, $conf_UAM[44]))."\n\n"; 
+  }
       
   if (isset($conf_UAM[24]) and $conf_UAM[24] <> '')
@@ -1313,5 +1414,5 @@
     $replacements[] = $conf['gallery_title'];
     $patterns[] = '#\[myurl\]#i';
-    $replacements[] = $conf['gallery_url'];
+    $replacements[] = get_gallery_home_url();
 
     if (function_exists('get_user_language_desc'))
@@ -1364,4 +1465,5 @@
   
 	$custom_txt = "";
+  $subject = "";
 
 // We have to get the user's language in database
@@ -1401,5 +1503,19 @@
   $result = pwg_db_fetch_assoc(pwg_query($query));
 
-  $subject = '['.$conf['gallery_title'].'] '.l10n_args(get_l10n_args('UAM_Validation of %s', stripslashes($result['username'])));
+  if (isset($conf_UAM[46]) and $conf_UAM[46] <> '')
+  {
+    // Management of Extension flags ([username], [mygallery])
+    // -------------------------------------------------------
+    $patterns[] = '#\[username\]#i';
+    $replacements[] = $username;
+    $patterns[] = '#\[mygallery\]#i';
+    $replacements[] = $conf['gallery_title'];
+
+    if (function_exists('get_user_language_desc'))
+    {
+      $subject = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM[46]))."\n\n";
+    }
+    else $subject = l10n(preg_replace($patterns, $replacements, $conf_UAM[46]))."\n\n"; 
+  }
       
   if (isset($conf_UAM[27]) and $conf_UAM[27] <> '')
@@ -1412,5 +1528,5 @@
     $replacements[] = $conf['gallery_title'];
     $patterns[] = '#\[myurl\]#i';
-    $replacements[] = $conf['gallery_url'];
+    $replacements[] = get_gallery_home_url();
 
     if (function_exists('get_user_language_desc'))
Index: /extensions/UserAdvManager/branches/2.40/include/upgradedb.inc.php
===================================================================
--- /extensions/UserAdvManager/branches/2.40/include/upgradedb.inc.php	(revision 14729)
+++ /extensions/UserAdvManager/branches/2.40/include/upgradedb.inc.php	(revision 14730)
@@ -27,5 +27,5 @@
 /* *************************************** */
 function UAM_version_update()
-{  
+{
   // Get current plugin version
   // --------------------------
@@ -589,3 +589,37 @@
   conf_update_param('UserAdvManager', pwg_db_real_escape_string($update_conf));
 }
+
+
+/* upgrade from 2.30.x to 2.40.0 */
+/* ***************************** */
+function upgrade_2300_2400()
+{
+  global $conf;
+  
+  load_language('plugin.lang', UAM_PATH);
+
+  // Upgrading options
+  // -----------------
+  $query = '
+SELECT value
+  FROM '.CONFIG_TABLE.'
+WHERE param = "UserAdvManager"
+;';
+
+  $result = pwg_query($query);
+  $conf_UAM = pwg_db_fetch_assoc($result);
+    
+  $Newconf_UAM = unserialize($conf_UAM['value']);
+
+  $Newconf_UAM[41] = l10n('UAM_Default_ConfirmMail_Subject');        // UAM_CONFIRMMAIL_SUBJECT
+  $Newconf_UAM[42] = l10n('UAM_Default_ConfirmMail_Remail_Subject'); // UAM_CONFIRMMAIL_REMAIL_SUBJECT
+  $Newconf_UAM[43] = l10n('UAM_Default_InfoMail_Subject');           // UAM_INFOMAIL_SUBJECT
+  $Newconf_UAM[44] = l10n('UAM_Default_GTAutoMail_Subject');         // UAM_GTAUTOMAIL_SUBJECT
+  $Newconf_UAM[45] = l10n('UAM_Default_GTReminder_Subject');         // UAM_GTREMINDER_SUBJECT
+  $Newconf_UAM[46] = l10n('UAM_Default_AdminValidationMail_Subject');// UAM_ADMINVALIDATIONMAIL_SUBJECT
+
+  $update_conf = serialize($Newconf_UAM);
+
+  conf_update_param('UserAdvManager', pwg_db_real_escape_string($update_conf));
+}
 ?>
Index: /extensions/UserAdvManager/branches/2.40/language/de_DE/plugin.lang.php
===================================================================
--- /extensions/UserAdvManager/branches/2.40/language/de_DE/plugin.lang.php	(revision 14729)
+++ /extensions/UserAdvManager/branches/2.40/language/de_DE/plugin.lang.php	(revision 14730)
@@ -337,7 +337,7 @@
 
 Dies ist eine Erinnerung, weil eine sehr lange Zeit vergangen, seit Ihrem letzten Besuch auf unserer Galerie [mygallery]. Wenn Sie nicht mehr tun wollen Ihren Zugang Konto verwenden, informieren Sie uns bitte durch eine Beantwortung dieser E-Mail. Ihr Konto wird gel';
-$lang['UAM_Default_InfoMail_Txt'] = 'Hallo [username]! Wir danken Ihnen, auf [mygallery] haben registrieren lassen.
-
-Bitte, finden Sie unten Ihre Verbindung Informationen.';
+$lang['UAM_Default_InfoMail_Txt'] = 'Hallo [username]!
+
+Sie haben wesentliche Veränderungen in Ihrem Profil auf der Galerie [mygallery]. Bitte, finden Sie die neuen Einstellungen:';
 $lang['UAM_Default_PwdRequest_Txt'] = 'Sie haben ein Passwort-Reset auf unserer Galerie anzubieten. Bitte unten Ihre neue Verbindung Einstellungen zu finden.';
 $lang['UAM_Default_RejectConnexion_Txt'] = 'Leider müssen Sie nicht Ihre Anmeldung bestätigt noch haben, so können Sie nicht schließen Sie die Galerie jetzt. Bitte überprüfen Sie Ihre E-Mail-Box. Sie sollten eine E-Mail durch die Galerie geschickt, mit einem Link zu Ihrer Bestätigung durchzuführen. Wenn nicht, wenden Sie sich bitte an den Webmaster.';
Index: /extensions/UserAdvManager/branches/2.40/language/en_UK/help.lang.php
===================================================================
--- /extensions/UserAdvManager/branches/2.40/language/en_UK/help.lang.php	(revision 14729)
+++ /extensions/UserAdvManager/branches/2.40/language/en_UK/help.lang.php	(revision 14730)
@@ -153,19 +153,6 @@
 $lang['UAM_GTAutoGpTitle_d'] = 'The automatic change of group, status or privacy level is like a demotion of the accounts involved and working on the same principle as the group, status or privacy level of confirmation (see &quot;Setting confirmations of registration&quot;). Therefore be to define a group, status and / or level demoting access to the gallery. If this has already been defined with the use of registration confirmation function, you can use the same group / status / level.<br><br>
 <b style=&quot;color: red;&quot;>Important note :</b> If a ghost user still has not heard from after the time limit and despite the automatic notification by email (if enabled), he\'s automatically deleted from the database.';
-$lang['UAM_GTAutoMailTitle_d'] = 'When an account is expired (group / status / privacy level change demoting the visitor), an email information can be sent to clarify the reasons for this change and the means to recover the initial access to the gallery.
-<br>To do this, a link to reconfirmation of registration is attached to the email (automatic generation of a new confirmation key).<b style=&quot;color: red;&quot;>If the user has already been notified, his account is automatically destroyed.</b> 
-<br><br>
-Enter the custom text that also explain the reasons for the demotion, to accompany the confirmation link. The custom text is not mandatory but strongly recommended. In fact, your visitors will not appreciate receiving an email containing only a single link without further explanation. ;-)
-<br><br>
-Further customize the content with special inserted tags:<br>
-- <b style=&quot;color: red;&quot;>[username]</b> to automatically insert the name of the destination user of the email.<br>
-- <b style=&quot;color: red;&quot;>[mygallery]</b> to insert the title of your gallery.<br>
-- <b style=&quot;color: red;&quot;>[myurl]</b> to insert your gallery URL if set in Piwigo\'s configuration options.
-<br><br>
-To use multiple languages, you can use the Extended description plugin\'s tags if it is active.
-<br><br>
-<b style=&quot;color: red;&quot;>Warning: The use of this function is intimately associated with the confirmation of registration by the user (confirmation by mail) and can not be activated without this option.</b>';
 $lang['UAM_GT_MainTitle_d'] = '
-- Automatic or manuel management of ghost users<br>
+- Automatic or manual management of ghost users<br>
 - E-mailing<br>
 ...
@@ -306,3 +293,61 @@
 $lang['UAM_Tracking registered users_d'] = 'This activates a table in the &quot;Tracking registered users&quot; tab where are listed registered users on the gallery with the date of their last visit and time spent (in days) since their last visit. Monitoring is purely informative for the administrator of the gallery.';
 // --------- End: New or revised $lang ---- from version 2.30.3
+
+
+// --------- Starting below: New or revised $lang ---- from version 2.40
+$lang['UAM_AdminValidationMail_Subject_d'] = 'When an administrator or Webmaster of the gallery manually confirm registration pending, a notification email is automatically sent to the user. Enter here your customized manual validation email subject.<br>
+By default, the field has a generic text in English but you can change it and use the translation tags [lang =?] of the Extended Description plugin if installed.
+<br><br>
+The following additional customizations tags are available without using the Extended Description plugin:<br>
+- <b style=&quot;color: red;&quot;>[username]</b> to automatically insert the name of the destination user of the email.<br>
+- <b style=&quot;color: red;&quot;>[mygallery]</b> to insert the title of your gallery.<br>
+';
+$lang['UAM_ConfirmMail_Subject_d'] = 'Enter here your customized registration confirmation email subject.<br>
+By default, the field has a generic text in English but you can change it and use the translation tags [lang =?] of the Extended Description plugin if installed.
+<br><br>
+The following additional customizations tags are available without using the Extended Description plugin:<br>
+- <b style=&quot;color: red;&quot;>[username]</b> to automatically insert the name of the destination user of the email.<br>
+- <b style=&quot;color: red;&quot;>[mygallery]</b> to insert the title of your gallery.<br>
+';
+$lang['UAM_ConfirmMail_ReMail_Subject_d'] = 'Enter here your customized registration confirmation reminder email subject (with or without new key generation).<br>
+By default, the field has a generic text in English but you can change it and use the translation tags [lang =?] of the Extended Description plugin if installed.
+<br><br>
+The following additional customizations tags are available without using the Extended Description plugin:<br>
+- <b style=&quot;color: red;&quot;>[username]</b> to automatically insert the name of the destination user of the email.<br>
+- <b style=&quot;color: red;&quot;>[mygallery]</b> to insert the title of your gallery.<br>
+';
+$lang['UAM_GTReminder_Subject_d'] = 'Enter here your customized manual Ghost Tracker reminder email subject.<br>
+By default, the field has a generic text in English but you can change it and use the translation tags [lang =?] of the Extended Description plugin if installed.
+<br><br>
+The following additional customizations tags are available without using the Extended Description plugin:<br>
+- <b style=&quot;color: red;&quot;>[username]</b> to automatically insert the name of the destination user of the email.<br>
+- <b style=&quot;color: red;&quot;>[mygallery]</b> to insert the title of your gallery.<br>
+';
+$lang['UAM_GTAutomail_Subject_d'] = 'Enter here your customized automatic Ghost Tracker demotion email subject.<br>
+By default, the field has a generic text in English but you can change it and use the translation tags [lang =?] of the Extended Description plugin if installed.
+<br><br>
+The following additional customizations tags are available without using the Extended Description plugin:<br>
+- <b style=&quot;color: red;&quot;>[username]</b> to automatically insert the name of the destination user of the email.<br>
+- <b style=&quot;color: red;&quot;>[mygallery]</b> to insert the title of your gallery.<br>
+';
+$lang['UAM_GTAutoMailTitle_d'] = 'When an account is expired (group / status / privacy level change demoting the visitor), an email information can be sent to clarify the reasons for this change and the means to recover the initial access to the gallery.
+<br>To do this, a link to reconfirmation of registration is attached to the email (automatic generation of a new confirmation key).<b style=&quot;color: red;&quot;>If the user has already been notified, his account is automatically destroyed.</b> 
+<br><br>
+<b style=&quot;color: red;&quot;>Warning: The use of this function is intimately associated with the confirmation of registration by the user (confirmation by mail) and can not be activated without this option.</b>';
+$lang['UAM_GTAutomail_Text_d'] = 'Enter the custom text that also explain the reasons for the demotion, to accompany the confirmation link. The custom text is not mandatory but strongly recommended. In fact, your visitors will not appreciate receiving an email containing only a single link without further explanation. ;-)
+<br><br>
+Further customize the content with special inserted tags:<br>
+- <b style=&quot;color: red;&quot;>[username]</b> to automatically insert the name of the destination user of the email.<br>
+- <b style=&quot;color: red;&quot;>[mygallery]</b> to insert the title of your gallery.<br>
+- <b style=&quot;color: red;&quot;>[myurl]</b> to insert your gallery URL if set in Piwigo\'s configuration options.
+<br><br>
+To use multiple languages, you can use the Extended description plugin\'s tags if it is active.';
+$lang['UAM_MailInfo_Subject_d'] = 'Enter here your customized information email subject.<br>
+By default, the field has a generic text in English but you can change it and use the translation tags [lang =?] of the Extended Description plugin if installed.
+<br><br>
+The following additional customizations tags are available without using the Extended Description plugin:<br>
+- <b style=&quot;color: red;&quot;>[username]</b> to automatically insert the name of the destination user of the email.<br>
+- <b style=&quot;color: red;&quot;>[mygallery]</b> to insert the title of your gallery.<br>
+';
+// --------- End: New or revised $lang ---- from version 2.40
 ?>
Index: /extensions/UserAdvManager/branches/2.40/language/en_UK/plugin.lang.php
===================================================================
--- /extensions/UserAdvManager/branches/2.40/language/en_UK/plugin.lang.php	(revision 14729)
+++ /extensions/UserAdvManager/branches/2.40/language/en_UK/plugin.lang.php	(revision 14730)
@@ -235,7 +235,7 @@
 $lang['UAM %d users pwdreseted'] = 'Password renewal required for %d users';
 $lang['UAM_Error_Using_illegal_Kdays'] = 'Using the [Kdays] tag is allowed only if the deadline for registration confirmation limited is active. Refer to the text field in red to correct the problem.';
-$lang['UAM_Default_InfoMail_Txt'] = 'Hello [username]! Thank you to have register on [mygallery].
-
-Please, find find below your connexion information.';
+$lang['UAM_Default_InfoMail_Txt'] = 'Hello [username]!
+
+You made significant changes in your profile on the gallery [mygallery]. Please, find below your new settings:';
 $lang['UAM_Default_ConfirmMail_Txt'] = 'Hello [username]! Thank you to have register on [mygallery].
 
@@ -403,3 +403,20 @@
 $lang['UAM_Tracking confirmations'] = 'Tracking confirmations';
 // --------- End: New or revised $lang ---- from version 2.30.3
+
+
+// --------- Starting below: New or revised $lang ---- from version 2.40
+$lang['UAM_AdminValidationMail_Subject'] = 'Customize manual validation email subject';
+$lang['UAM_ConfirmMail_Subject'] = 'Customize registration confirmation email subject';
+$lang['UAM_ConfirmMail_ReMail_Subject'] = 'Customize registration confirmation reminder email subject';
+$lang['UAM_GTReminder_Subject'] = 'Customize manual Ghost Tracker reminder email subject';
+$lang['UAM_GTAutomail_Subject'] = 'Customize automatic Ghost Tracker demotion email subject';
+$lang['UAM_GTAutomail_Text'] = 'Customize demotion email text';
+$lang['UAM_MailInfo_Subject'] = 'Customize information email subject';
+$lang['UAM_Default_ConfirmMail_Subject'] = '[username] registration confirmation on [mygallery]';
+$lang['UAM_Default_ConfirmMail_Remail_Subject'] = 'Reminder - [username] registration confirmation on [mygallery]';
+$lang['UAM_Default_InfoMail_Subject'] = '[username] - Your registration information on [mygallery]';
+$lang['UAM_Default_GTAutoMail_Subject'] = '[username] - Your account has been demoted on [mygallery]';
+$lang['UAM_Default_GTReminder_Subject'] = '[username] - A long time passed since your last visit on [mygallery]';
+$lang['UAM_Default_AdminValidationMail_Subject'] = '[username] - Registration validated on [mygallery]';
+// --------- End: New or revised $lang ---- from version 2.40
 ?>
Index: /extensions/UserAdvManager/branches/2.40/language/fr_FR/help.lang.php
===================================================================
--- /extensions/UserAdvManager/branches/2.40/language/fr_FR/help.lang.php	(revision 14729)
+++ /extensions/UserAdvManager/branches/2.40/language/fr_FR/help.lang.php	(revision 14730)
@@ -185,17 +185,4 @@
 $lang['UAM_GTAutoGpTitle_d'] = 'Le changement automatique de groupe, de statut ou de niveau de confidentialité équivaut à une rétrogradation des comptes concernés et fonctionne sur le même principe que le groupe, le statut ou le niveau de confidentialité à la confirmation (voir &quot;Paramétrage des confirmations d\'inscriptions&quot;). Il conviendra donc de définir un groupe ou un statut et/ou un niveau de confidentialité rétrogradant l\'accès à la galerie. Si cela a déjà été défini avec l\'utilisation de la fonction Confirmation d\'inscription, on peut utiliser ces mêmes groupes / statuts / niveaux.<br><br>
 <b style=&quot;color: red;&quot;>Point important :</b> Si un utilisateur fantôme n\'a toujours pas donné signe de vie après le délai imparti et malgré la notification automatique par mail (si activée), il est automatiquement supprimé de la base de données.';
-$lang['UAM_GTAutoMailTitle_d'] = 'Lorsqu\'un compte est expiré (changement de groupe, de statut ou de niveau de confidentialité rétrogradant le visiteur), un email d\'information peut être envoyé pour préciser les raisons de ce changement et le moyen de recouvrer l\'accès initial à la galerie.
-<br>Pour ce faire, un lien de reconfirmation de l\'inscription est joint à l\'email (génération automatique d\'une nouvelle clé de confirmation).<b style=&quot;color: red;&quot;>Si l\'utilisateur a déjà été notifié, son compte est automatiquement détruit.</b> 
-<br><br>
-Saisissez aussi le texte personnalisé qui expliquera les raisons de la rétrogradation et qui accompagnera le lien de confirmation. Le texte personnalisé n\'est pas obligatoire mais vivement conseillé. En effet, vos visiteurs inscrits n\'apprécieront que moyennement de recevoir un email ne contenant qu\'un simple lien sans plus d\'explications. ;-)
-<br><br>
-Personnalisez encore plus le contenu avec les balises d\'insertion spéciales :<br>
-- <b style=&quot;color: red;&quot;>[username]</b> pour insérer automatiquement le nom de l\'utilisateur destinataire de l\'email.<br>
-- <b style=&quot;color: red;&quot;>[mygallery]</b> pour insérer le titre de votre galerie.<br>
-- <b style=&quot;color: red;&quot;>[myurl]</b> pour insérer l\'URL de votre galerie si renseigné dans les options de configuration de Piwigo.
-<br><br>
-Pour une utilisation multi-langues, vous pouvez utiliser les balises [lang] du plugin Extended Description si celui-ci est actif.
-<br><br>
-<b style=&quot;color: red;&quot;>Attention : L\'emploi de cette fonction est intimement lié à l\'option de confirmation d\'inscription par l\'utilisateur (confirmation par mail) et ne peut pas être activée sans cette option.</b>';
 $lang['UAM_GT_MainTitle_d'] = '
 - Gestion automatique ou manuelle des visiteurs fantômes<br>
@@ -302,3 +289,61 @@
 $lang['UAM_Tracking registered users_d'] = 'Cette option active, dans l\'onglet &quot;Suivi des utilisateurs inscrits&quot;, un tableau recensant les utilisateurs inscrits, la date de leur dernière visite et le nombre de jours écoulés depuis leur dernière visite. Il s\'agit d\'un suivi purement informatif pour l\'administrateur de la galerie.';
 // --------- End: New or revised $lang ---- from version 2.30.3
+
+
+// --------- Starting below: New or revised $lang ---- from version 2.40
+$lang['UAM_AdminValidationMail_Subject_d'] = 'Lorsqu\'un administrateur ou un webmestre de la galerie valide manuellement une inscription en attente, un email de notification est automatiquement envoyé à l\'utilisateur concerné. Saisissez ici un sujet personnalisé pour l\'email de validation manuelle.<br>
+Par défaut, le champ comporte un texte générique en français mais vous pouvez le changer et utiliser les balises de traduction [lang=??] du plugin Extended Description s\'il est installé.
+<br><br>
+De plus les balises de personnalisations suivantes sont utilisables sans l\'aide du plugin Extended Description:<br>
+- <b style=&quot;color: red;&quot;>[username]</b> pour insérer automatiquement le nom de l\'utilisateur destinataire de l\'email.<br>
+- <b style=&quot;color: red;&quot;>[mygallery]</b> pour insérer le titre de votre galerie.<br>
+';
+$lang['UAM_ConfirmMail_Subject_d'] = 'Saisissez ici un sujet personnalisé pour l\'email de confirmation d\'inscription.<br>
+Par défaut, le champ comporte un texte générique en français mais vous pouvez le changer et utiliser les balises de traduction [lang=??] du plugin Extended Description s\'il est installé.
+<br><br>
+De plus les balises de personnalisations suivantes sont utilisables sans l\'aide du plugin Extended Description:<br>
+- <b style=&quot;color: red;&quot;>[username]</b> pour insérer automatiquement le nom de l\'utilisateur destinataire de l\'email.<br>
+- <b style=&quot;color: red;&quot;>[mygallery]</b> pour insérer le titre de votre galerie.<br>
+';
+$lang['UAM_ConfirmMail_ReMail_Subject_d'] = 'Saisissez ici un sujet personnalisé pour l\'email de rappel de confirmation d\'inscription (avec ou sans renouvellement de clé).<br>
+Par défaut, le champ comporte un texte générique en français mais vous pouvez le changer et utiliser les balises de traduction [lang=??] du plugin Extended Description s\'il est installé.
+<br><br>
+De plus les balises de personnalisations suivantes sont utilisables sans l\'aide du plugin Extended Description:<br>
+- <b style=&quot;color: red;&quot;>[username]</b> pour insérer automatiquement le nom de l\'utilisateur destinataire de l\'email.<br>
+- <b style=&quot;color: red;&quot;>[mygallery]</b> pour insérer le titre de votre galerie.<br>
+';
+$lang['UAM_GTReminder_Subject_d'] = 'Saisissez ici un sujet personnalisé pour l\'email de rappel du Ghost Tracker.<br>
+Par défaut, le champ comporte un texte générique en français mais vous pouvez le changer et utiliser les balises de traduction [lang=??] du plugin Extended Description s\'il est installé.
+<br><br>
+De plus les balises de personnalisations suivantes sont utilisables sans l\'aide du plugin Extended Description:<br>
+- <b style=&quot;color: red;&quot;>[username]</b> pour insérer automatiquement le nom de l\'utilisateur destinataire de l\'email.<br>
+- <b style=&quot;color: red;&quot;>[mygallery]</b> pour insérer le titre de votre galerie.<br>
+';
+$lang['UAM_GTAutomail_Subject_d'] = 'Saisissez ici un sujet personnalisé pour l\'email de rétrogradation automatique du Ghost Tracker.<br>
+Par défaut, le champ comporte un texte générique en français mais vous pouvez le changer et utiliser les balises de traduction [lang=??] du plugin Extended Description s\'il est installé.
+<br><br>
+De plus les balises de personnalisations suivantes sont utilisables sans l\'aide du plugin Extended Description:<br>
+- <b style=&quot;color: red;&quot;>[username]</b> pour insérer automatiquement le nom de l\'utilisateur destinataire de l\'email.<br>
+- <b style=&quot;color: red;&quot;>[mygallery]</b> pour insérer le titre de votre galerie.<br>
+';
+$lang['UAM_GTAutoMailTitle_d'] = 'Lorsqu\'un compte est expiré (changement de groupe, de statut ou de niveau de confidentialité rétrogradant le visiteur), un email d\'information peut être envoyé pour préciser les raisons de ce changement et le moyen de recouvrer l\'accès initial à la galerie.
+<br>Pour ce faire, un lien de reconfirmation de l\'inscription est joint à l\'email (génération automatique d\'une nouvelle clé de confirmation). <b style=&quot;color: red;&quot;>Si l\'utilisateur a déjà été notifié, son compte est automatiquement détruit.</b> 
+<br><br>
+<b style=&quot;color: red;&quot;>Attention : L\'emploi de cette fonction est intimement lié à l\'option de confirmation d\'inscription par l\'utilisateur (confirmation par mail) et ne peut pas être activée sans cette option.</b>';
+$lang['UAM_GTAutomail_Text_d'] = 'Saisissez ici le texte personnalisé qui expliquera les raisons de la rétrogradation et qui accompagnera le lien de confirmation. Le texte personnalisé n\'est pas obligatoire mais vivement conseillé. En effet, vos visiteurs inscrits n\'apprécieront que moyennement de recevoir un email ne contenant qu\'un simple lien sans plus d\'explications. ;-)
+<br><br>
+Personnalisez encore plus le contenu avec les balises d\'insertion spéciales :<br>
+- <b style=&quot;color: red;&quot;>[username]</b> pour insérer automatiquement le nom de l\'utilisateur destinataire de l\'email.<br>
+- <b style=&quot;color: red;&quot;>[mygallery]</b> pour insérer le titre de votre galerie.<br>
+- <b style=&quot;color: red;&quot;>[myurl]</b> pour insérer l\'URL de votre galerie si renseigné dans les options de configuration de Piwigo.
+<br><br>
+Pour une utilisation multi-langues, vous pouvez utiliser les balises [lang] du plugin Extended Description si celui-ci est actif.';
+$lang['UAM_MailInfo_Subject_d'] = 'Saisissez ici un sujet personnalisé pour l\'email d\'information.<br>
+Par défaut, le champ comporte un texte générique en français mais vous pouvez le changer et utiliser les balises de traduction [lang=??] du plugin Extended Description s\'il est installé.
+<br><br>
+De plus les balises de personnalisations suivantes sont utilisables sans l\'aide du plugin Extended Description:<br>
+- <b style=&quot;color: red;&quot;>[username]</b> pour insérer automatiquement le nom de l\'utilisateur destinataire de l\'email.<br>
+- <b style=&quot;color: red;&quot;>[mygallery]</b> pour insérer le titre de votre galerie.<br>
+';
+// --------- End: New or revised $lang ---- from version 2.40
 ?>
Index: /extensions/UserAdvManager/branches/2.40/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/UserAdvManager/branches/2.40/language/fr_FR/plugin.lang.php	(revision 14729)
+++ /extensions/UserAdvManager/branches/2.40/language/fr_FR/plugin.lang.php	(revision 14730)
@@ -248,7 +248,7 @@
 $lang['UAM %d users pwdreseted'] = 'Renouvellement de mot de passe demandé pour %d utilisateurs';
 $lang['UAM_Error_Using_illegal_Kdays'] = 'L\'utilisation de la balise [Kdays] n\'est autorisée que si la limitation du délai de confirmation d\'inscription est active. Reportez vous au champ de texte en rouge pour corriger le problème.';
-$lang['UAM_Default_InfoMail_Txt'] = 'Bonjour [username] et merci de vous être inscrit sur la galerie [mygallery].
-
-Vous trouverez ci-dessous vos informations de connexion sur la galerie.';
+$lang['UAM_Default_InfoMail_Txt'] = 'Bonjour [username]!
+
+Vous avez effectué des modifications importantes de profil sur la galerie [mygallery]. Voici vos nouveaux paramètres :';
 $lang['UAM_Default_GhstReminder_Txt'] = 'Bonjour [username].
 	
@@ -408,3 +408,20 @@
 $lang['UAM_Tracking confirmations'] = 'Suivi des confirmations';
 // --------- End: New or revised $lang ---- from version 2.30.3
+
+
+// --------- Starting below: New or revised $lang ---- from version 2.40
+$lang['UAM_AdminValidationMail_Subject'] = 'Personnaliser le sujet de l\'email de validation manuelle';
+$lang['UAM_ConfirmMail_Subject'] = 'Personnaliser le sujet de l\'email de confirmation d\'inscription';
+$lang['UAM_ConfirmMail_ReMail_Subject'] = 'Personnaliser le sujet de l\'email de rappel de la confirmation d\'inscription';
+$lang['UAM_GTReminder_Subject'] = 'Personnaliser le sujet de l\'email de rappel manuel du Ghost Tracker';
+$lang['UAM_GTAutomail_Subject'] = 'Personnaliser le sujet de l\'email de rétrogradation automatique du Ghost Tracker';
+$lang['UAM_GTAutomail_Text'] = 'Texte de rétrogradation personnalisé';
+$lang['UAM_MailInfo_Subject'] = 'Personnaliser le sujet de l\'email d\'information';
+$lang['UAM_Default_ConfirmMail_Subject'] = 'Confirmation d\'inscription de [username] sur [mygallery]';
+$lang['UAM_Default_ConfirmMail_Remail_Subject'] = 'Rappel - Confirmation d\'inscription de [username] sur [mygallery]';
+$lang['UAM_Default_InfoMail_Subject'] = '[username] - Vos paramètres d\'inscription sur [mygallery]';
+$lang['UAM_Default_GTAutoMail_Subject'] = '[username] - Rétrogradation de votre compte sur [mygallery]';
+$lang['UAM_Default_GTReminder_Subject'] = '[username] - Votre dernière visite sur [mygallery] remonte à longtemps';
+$lang['UAM_Default_AdminValidationMail_Subject'] = '[username] - Inscription validée sur [mygallery]';
+// --------- End: New or revised $lang ---- from version 2.40
 ?>
Index: /extensions/UserAdvManager/branches/2.40/language/it_IT/plugin.lang.php
===================================================================
--- /extensions/UserAdvManager/branches/2.40/language/it_IT/plugin.lang.php	(revision 14729)
+++ /extensions/UserAdvManager/branches/2.40/language/it_IT/plugin.lang.php	(revision 14730)
@@ -352,6 +352,7 @@
 Distinti saluti,
 l\'amministratore della galleria [mygallery] - [myurl]';
-$lang['UAM_Default_InfoMail_Txt'] = 'Ciao [username]! Grazie per esserti registrato su [mygallery]
-Qui sotto trovi le informazioni per la connessione';
+$lang['UAM_Default_InfoMail_Txt'] = 'Ciao [username]!
+
+Sono state apportate modifiche significative nel tuo profilo sul gallery [mygallery]. Per favore, di seguito troverete le nuove impostazioni:';
 $lang['UAM_Default_PwdRequest_Txt'] = 'Hai richiesto il rinnovo della password. Qui sotto trovi i nuovi dati di connessione';
 $lang['UAM_Default_RejectConnexion_Txt'] = 'Siamo spiacenti, non hai ancora confermato la registrazione, perciò non ti puoi connettere ora alla galleria. Controlla la tua casella mail. Dovresti trovare un email inviata dalla galleria, contenente un link per eseguire la conferma. Se non la trovi, contatta il webmaster.';
Index: /extensions/UserAdvManager/branches/2.40/maintain.inc.php
===================================================================
--- /extensions/UserAdvManager/branches/2.40/maintain.inc.php	(revision 14729)
+++ /extensions/UserAdvManager/branches/2.40/maintain.inc.php	(revision 14730)
@@ -25,45 +25,51 @@
   // Default global parameters for UserAdvManager conf
   // -------------------------------------------------
-  $defaultUAM[0] = 'false';                                   // UAM_MAIL_INFO_TRUE/FALSE
-  $defaultUAM[1] = 'false';                                   // UAM_CONFIRM_MAIL_TRUE/FALSE
-  $defaultUAM[2] = '-1';                                      // UAM_No_Confirm_Group
-  $defaultUAM[3] = '-1';                                      // UAM_Validated_Group
-  $defaultUAM[4] = '-1';                                      // UAM_Validated_Status
-  $defaultUAM[5] = 'false';                                   // UAM_USERNAME_CHAR_TRUE
-  $defaultUAM[6] = '';                                        // UAM_USERNAME_CHAR_LIST
-  $defaultUAM[7] = '-1';                                      // UAM_No_Confirm_Status
-  $defaultUAM[8] = l10n('UAM_Default_InfoMail_Txt');          // UAM_MAILINFO_TEXT
-  $defaultUAM[9] = l10n('UAM_Default_ConfirmMail_Txt');       // UAM_CONFIRMMAIL_TEXT
-  $defaultUAM[10] = 'false';                                  // UAM_MAILEXCLUSION_TRUE/FALSE
-  $defaultUAM[11] = '';                                       // UAM_MAILEXCLUSION_LIST
-  $defaultUAM[12] = 'false';                                  // UAM_PASSWORDENF_TRUE/FALSE
-  $defaultUAM[13] = '100';                                    // UAM_PASSWORD_SCORE
-  $defaultUAM[14] = 'false';                                  // UAM_ADMINPASSWENF_TRUE/FALSE
-  $defaultUAM[15] = 'false';                                  // UAM_GHOSTRACKER_TRUE/FALSE
-  $defaultUAM[16] = '10';                                     // UAM_GHOSTRACKER_DAYLIMIT
-  $defaultUAM[17] = l10n('UAM_Default_GhstReminder_Txt');     // UAM_GHOSTRACKER_REMINDERTEXT
-  $defaultUAM[18] = 'false';                                  // UAM_ADDLASTVISIT_TRUE/FALSE
-  $defaultUAM[19] = 'false';                                  // UAM_ADMINCONFMAIL_TRUE/FALSE
-  $defaultUAM[20] = 'false';                                  // UAM_REDIRTOPROFILE_TRUE/FALSE
-  $defaultUAM[21] = 'false';                                  // UAM_GTAUTO_TRUE/FALSE
-  $defaultUAM[22] = 'false';                                  // UAM_GTAUTOMAIL_TRUE/FALSE
-  $defaultUAM[23] = l10n('UAM_Default_GhstDeletion_Txt');     // UAM_GTAUTODEL_TEXT
-  $defaultUAM[24] = l10n('UAM_Default_GhstDemotion_Txt');     // UAM_GTAUTOMAILTEXT
-  $defaultUAM[25] = '-1';                                     // UAM_Downgrade_Group
-  $defaultUAM[26] = '-1';                                     // UAM_Downgrade_Status
-  $defaultUAM[27] = l10n('UAM_Default_AdminValidation_Txt');  // UAM_ADMINVALIDATIONMAIL_TEXT
-  $defaultUAM[28] = 'false';                                  // UAM_CUSTOMPASSWRETR_TRUE/FALSE
-  $defaultUAM[29] = l10n('UAM_Default_PwdRequest_Txt');       // UAM_CUSTOMPASSWRETR_TEXT
-  $defaultUAM[30] = 'false';                                  // UAM_USRAUTO_TRUE/FALSE
-  $defaultUAM[31] = l10n('UAM_Default_ValidationTimeout_Txt');// UAM_USRAUTODEL_TEXT
-  $defaultUAM[32] = 'false';                                  // UAM_USRAUTOMAIL_TRUE/FALSE
-  $defaultUAM[33] = 'false';                                  // UAM_STUFFS_TRUE/FALSE
-  $defaultUAM[34] = 'false';                                  // UAM_HIDEPASSW_TRUE/FALSE
-  $defaultUAM[35] = '-1';                                     // UAM_NO_VALID_LEVEL
-  $defaultUAM[36] = '-1';                                     // UAM_VALID_LEVEL
-  $defaultUAM[37] = '-1';                                     // UAM_DOWNGRADE_LEVEL
-  $defaultUAM[38] = 'false';                                  // UAM_PWDRESET_TRUE/FALSE
-  $defaultUAM[39] = 'false';                                  // UAM_REJECTCONNECT_TRUE/FALSE
-  $defaultUAM[40] = l10n('UAM_Default_RejectConnexion_Txt');  // UAM_REJECTCONNECT_TEXT
+  $defaultUAM[0] = 'false';                                         // UAM_MAIL_INFO_TRUE/FALSE
+  $defaultUAM[1] = 'false';                                         // UAM_CONFIRM_MAIL_TRUE/FALSE
+  $defaultUAM[2] = '-1';                                            // UAM_No_Confirm_Group
+  $defaultUAM[3] = '-1';                                            // UAM_Validated_Group
+  $defaultUAM[4] = '-1';                                            // UAM_Validated_Status
+  $defaultUAM[5] = 'false';                                         // UAM_USERNAME_CHAR_TRUE
+  $defaultUAM[6] = '';                                              // UAM_USERNAME_CHAR_LIST
+  $defaultUAM[7] = '-1';                                            // UAM_No_Confirm_Status
+  $defaultUAM[8] = l10n('UAM_Default_InfoMail_Txt');                // UAM_MAILINFO_TEXT
+  $defaultUAM[9] = l10n('UAM_Default_ConfirmMail_Txt');             // UAM_CONFIRMMAIL_TEXT
+  $defaultUAM[10] = 'false';                                        // UAM_MAILEXCLUSION_TRUE/FALSE
+  $defaultUAM[11] = '';                                             // UAM_MAILEXCLUSION_LIST
+  $defaultUAM[12] = 'false';                                        // UAM_PASSWORDENF_TRUE/FALSE
+  $defaultUAM[13] = '100';                                          // UAM_PASSWORD_SCORE
+  $defaultUAM[14] = 'false';                                        // UAM_ADMINPASSWENF_TRUE/FALSE
+  $defaultUAM[15] = 'false';                                        // UAM_GHOSTRACKER_TRUE/FALSE
+  $defaultUAM[16] = '10';                                           // UAM_GHOSTRACKER_DAYLIMIT
+  $defaultUAM[17] = l10n('UAM_Default_GhstReminder_Txt');           // UAM_GHOSTRACKER_REMINDERTEXT
+  $defaultUAM[18] = 'false';                                        // UAM_ADDLASTVISIT_TRUE/FALSE
+  $defaultUAM[19] = 'false';                                        // UAM_ADMINCONFMAIL_TRUE/FALSE
+  $defaultUAM[20] = 'false';                                        // UAM_REDIRTOPROFILE_TRUE/FALSE
+  $defaultUAM[21] = 'false';                                        // UAM_GTAUTO_TRUE/FALSE
+  $defaultUAM[22] = 'false';                                        // UAM_GTAUTOMAIL_TRUE/FALSE
+  $defaultUAM[23] = l10n('UAM_Default_GhstDeletion_Txt');           // UAM_GTAUTODEL_TEXT
+  $defaultUAM[24] = l10n('UAM_Default_GhstDemotion_Txt');           // UAM_GTAUTOMAILTEXT
+  $defaultUAM[25] = '-1';                                           // UAM_Downgrade_Group
+  $defaultUAM[26] = '-1';                                           // UAM_Downgrade_Status
+  $defaultUAM[27] = l10n('UAM_Default_AdminValidation_Txt');        // UAM_ADMINVALIDATIONMAIL_TEXT
+  $defaultUAM[28] = 'false';                                        // UAM_CUSTOMPASSWRETR_TRUE/FALSE
+  $defaultUAM[29] = l10n('UAM_Default_PwdRequest_Txt');             // UAM_CUSTOMPASSWRETR_TEXT
+  $defaultUAM[30] = 'false';                                        // UAM_USRAUTO_TRUE/FALSE
+  $defaultUAM[31] = l10n('UAM_Default_ValidationTimeout_Txt');      // UAM_USRAUTODEL_TEXT
+  $defaultUAM[32] = 'false';                                        // UAM_USRAUTOMAIL_TRUE/FALSE
+  $defaultUAM[33] = 'false';                                        // UAM_STUFFS_TRUE/FALSE
+  $defaultUAM[34] = 'false';                                        // UAM_HIDEPASSW_TRUE/FALSE
+  $defaultUAM[35] = '-1';                                           // UAM_NO_VALID_LEVEL
+  $defaultUAM[36] = '-1';                                           // UAM_VALID_LEVEL
+  $defaultUAM[37] = '-1';                                           // UAM_DOWNGRADE_LEVEL
+  $defaultUAM[38] = 'false';                                        // UAM_PWDRESET_TRUE/FALSE
+  $defaultUAM[39] = 'false';                                        // UAM_REJECTCONNECT_TRUE/FALSE
+  $defaultUAM[40] = l10n('UAM_Default_RejectConnexion_Txt');        // UAM_REJECTCONNECT_TEXT
+  $defaultUAM[41] = l10n('UAM_Default_ConfirmMail_Subject');        // UAM_CONFIRMMAIL_SUBJECT
+  $defaultUAM[42] = l10n('UAM_Default_ConfirmMail_Remail_Subject'); // UAM_CONFIRMMAIL_REMAIL_SUBJECT
+  $defaultUAM[43] = l10n('UAM_Default_InfoMail_Subject');           // UAM_INFOMAIL_SUBJECT
+  $defaultUAM[44] = l10n('UAM_Default_GTAutoMail_Subject');         // UAM_GTAUTOMAIL_SUBJECT
+  $defaultUAM[45] = l10n('UAM_Default_GTReminder_Subject');         // UAM_GTREMINDER_SUBJECT
+  $defaultUAM[46] = l10n('UAM_Default_AdminValidationMail_Subject');// UAM_ADMINVALIDATIONMAIL_SUBJECT
   
   // Default specific parameters for UserAdvManager ConfirmMail conf
@@ -366,4 +372,11 @@
       upgrade_2300_2302();
     }
+
+    if (version_compare($conf['UserAdvManager_Version'], '2.40.0') < 0)
+    {
+    /* upgrade from version 2.30.x to 2.40.0 */
+    /* ************************************* */
+      upgrade_2300_2400();
+    }
   }
 
Index: /extensions/UserAdvManager/branches/2.40/rejected.php
===================================================================
--- /extensions/UserAdvManager/branches/2.40/rejected.php	(revision 14729)
+++ /extensions/UserAdvManager/branches/2.40/rejected.php	(revision 14730)
@@ -28,5 +28,5 @@
   $replacements[] = $conf['gallery_title'];
   $patterns[] = '#\[myurl\]#i';
-  $replacements[] = $conf['gallery_url'];
+  $replacements[] = get_gallery_home_url();
 
   if (function_exists('get_user_language_desc'))
@@ -42,5 +42,4 @@
   array(
     'UAM_PATH'             => $Path_UAM,
-    'GALLERY_URL'          => make_index_url(),
     'CUSTOM_REJECT_MSG'    => $custom_text,
   )
Index: /extensions/UserAdvManager/branches/2.40/template/ConfirmMail.tpl
===================================================================
--- /extensions/UserAdvManager/branches/2.40/template/ConfirmMail.tpl	(revision 14729)
+++ /extensions/UserAdvManager/branches/2.40/template/ConfirmMail.tpl	(revision 14730)
@@ -1,4 +1,5 @@
 {html_head}<link rel="stylesheet" type="text/css" href="template/confmail.css">{/html_head}
 
+{if $themeconf.name|strstr:"stripped"}
 <div class="titrePage">
   <ul class="categoryActions">
@@ -9,5 +10,22 @@
       </a>
     {else}
-      <a href="{$GALLERY_URL}" title="{'return to homepage'|@translate}">
+      <a href="{$ROOT_URL}" title="{'return to homepage'|@translate}">
+        <img src="{$UAM_PATH}template/icon/home.png" class="button" alt="{'home'|@translate}">
+      </a>
+    {/if}
+    </li>
+  </ul>
+  &nbsp;&nbsp;&nbsp;<h2 class="confmail">{'UAM_title_confirm_mail'|@translate}</h2>
+</div>
+{else}
+<div class="titrePage">
+  <ul class="categoryActions">
+    <li>
+    {if $REDIRECT}
+      <a href="{$ROOT_URL}identification.php" title="{'return to homepage'|@translate}">
+        <img src="{$UAM_PATH}template/icon/home.png" class="button" alt="{'home'|@translate}">
+      </a>
+    {else}
+      <a href="{$ROOT_URL}" title="{'return to homepage'|@translate}">
         <img src="{$UAM_PATH}template/icon/home.png" class="button" alt="{'home'|@translate}">
       </a>
@@ -17,4 +35,5 @@
   <h2 class="confmail">{'UAM_title_confirm_mail'|@translate}</h2>
 </div>
+{/if}
 
 <ul>
Index: /extensions/UserAdvManager/branches/2.40/template/del_account.tpl
===================================================================
--- /extensions/UserAdvManager/branches/2.40/template/del_account.tpl	(revision 14729)
+++ /extensions/UserAdvManager/branches/2.40/template/del_account.tpl	(revision 14730)
@@ -1,8 +1,20 @@
 {html_head}<link rel="stylesheet" type="text/css" href="template/confmail.css">{/html_head}
 
+{if $themeconf.name|strstr:"stripped"}
 <div class="titrePage">
   <ul class="categoryActions">
     <li>
-      <a href="{$GALLERY_URL}" title="{'return to homepage'|@translate}">
+      <a href="{$ROOT_URL}" title="{'return to homepage'|@translate}">
+        <img src="{$UAM_PATH}template/icon/home.png" class="button" alt="{'home'|@translate}">
+      </a>
+    </li>
+  </ul>
+  &nbsp;&nbsp;&nbsp;<h2 class="confmail">{'UAM_title_redir_page'|@translate}</h2>
+</div>
+{else}
+<div class="titrePage">
+  <ul class="categoryActions">
+    <li>
+      <a href="{$ROOT_URL}" title="{'return to homepage'|@translate}">
         <img src="{$UAM_PATH}template/icon/home.png" class="button" alt="{'home'|@translate}">
       </a>
@@ -11,4 +23,5 @@
   <h2 class="confmail">{'UAM_title_redir_page'|@translate}</h2>
 </div>
+{/if}
 
 <ul>
Index: /extensions/UserAdvManager/branches/2.40/template/rejected.tpl
===================================================================
--- /extensions/UserAdvManager/branches/2.40/template/rejected.tpl	(revision 14729)
+++ /extensions/UserAdvManager/branches/2.40/template/rejected.tpl	(revision 14730)
@@ -1,8 +1,20 @@
 {html_head}<link rel="stylesheet" type="text/css" href="template/confmail.css">{/html_head}
 
+{if $themeconf.name|strstr:"stripped"}
 <div class="titrePage">
   <ul class="categoryActions">
     <li>
-      <a href="{$GALLERY_URL}" title="{'return to homepage'|@translate}">
+      <a href="{$ROOT_URL}" title="{'return to homepage'|@translate}">
+        <img src="{$UAM_PATH}template/icon/home.png" class="button" alt="{'home'|@translate}">
+      </a>
+    </li>
+  </ul>
+  &nbsp;&nbsp;&nbsp;<h2 class="confmail">{'UAM_Reject_Page_Title'|@translate}</h2>
+</div>
+{else}
+<div class="titrePage">
+  <ul class="categoryActions">
+    <li>
+      <a href="{$ROOT_URL}" title="{'return to homepage'|@translate}">
         <img src="{$UAM_PATH}template/icon/home.png" class="button" alt="{'home'|@translate}">
       </a>
@@ -11,5 +23,5 @@
   <h2 class="confmail">{'UAM_Reject_Page_Title'|@translate}</h2>
 </div>
-
+{/if}
 <ul>
   <div class="errors">{$CUSTOM_REJECT_MSG}</div>
