Index: /trunk/admin/configuration.php
===================================================================
--- /trunk/admin/configuration.php	(revision 29220)
+++ /trunk/admin/configuration.php	(revision 29221)
@@ -420,5 +420,6 @@
       $action,
       '',
-      $edit_user
+      $edit_user,
+      'GUEST_'
       );
     $template->assign('default', array());
Index: /trunk/admin/themes/default/template/configuration.tpl
===================================================================
--- /trunk/admin/themes/default/template/configuration.tpl	(revision 29220)
+++ /trunk/admin/themes/default/template/configuration.tpl	(revision 29221)
@@ -855,5 +855,54 @@
 {if isset($default)}
 <div id="configContent">
-{$PROFILE_CONTENT}
+<form method="post" name="profile" action="{$GUEST_F_ACTION}" id="profile" class="properties">
+
+{if $GUEST_USERNAME!='guest'}
+  <fieldset>
+      {'The settings for the guest are from the %s user'|@translate:$GUEST_USERNAME}
+  </fieldset>
+{/if}
+
+  <fieldset>
+    <legend>{'Preferences'|@translate}</legend>
+    <input type="hidden" name="redirect" value="{$GUEST_REDIRECT}">
+
+    <ul>
+      <li>
+        <span class="property">
+          <label for="nb_image_page">{'Number of photos per page'|@translate}</label>
+        </span>
+        <input type="text" size="4" maxlength="3" name="nb_image_page" id="nb_image_page" value="{$GUEST_NB_IMAGE_PAGE}">
+      </li>
+      <li>
+        <span class="property">
+          <label for="recent_period">{'Recent period'|@translate}</label>
+        </span>
+        <input type="text" size="3" maxlength="2" name="recent_period" id="recent_period" value="{$GUEST_RECENT_PERIOD}">
+      </li>
+      <li>
+        <span class="property">{'Expand all albums'|@translate}</span>
+        {html_radios name='expand' options=$radio_options selected=$GUEST_EXPAND}
+      </li>
+    {if $GUEST_ACTIVATE_COMMENTS}
+      <li>
+        <span class="property">{'Show number of comments'|@translate}</span>
+        {html_radios name='show_nb_comments' options=$radio_options selected=$GUEST_NB_COMMENTS}
+      </li>
+    {/if}
+      <li>
+        <span class="property">{'Show number of hits'|@translate}</span>
+        {html_radios name='show_nb_hits' options=$radio_options selected=$GUEST_NB_HITS}
+      </li>
+    </ul>
+  </fieldset>
+
+  <p class="bottomButtons">
+    <input type="hidden" name="pwg_token" value="{$PWG_TOKEN}">
+    <input class="submit" type="submit" name="validate" value="{'Submit'|@translate}">
+    <input class="submit" type="reset" name="reset" value="{'Reset'|@translate}">
+  </p>
+
+</form>
+
 </div>
 {/if}
Index: unk/admin/themes/default/template/profile.tpl
===================================================================
--- /trunk/admin/themes/default/template/profile.tpl	(revision 29220)
+++ 	(revision )
@@ -1,5 +1,0 @@
-<div class="titrePage">
-  <h2>{'Profile'|@translate}</h2>
-</div>
-
-{$PROFILE_CONTENT}
Index: unk/admin/themes/default/template/profile_content.tpl
===================================================================
--- /trunk/admin/themes/default/template/profile_content.tpl	(revision 29220)
+++ 	(revision )
@@ -1,93 +1,0 @@
-<form method="post" name="profile" action="{$F_ACTION}" id="profile" class="properties">
-
-  <fieldset>
-    <legend>{'Registration'|@translate}</legend>
-    <input type="hidden" name="redirect" value="{$REDIRECT}">
-    <ul>
-      <li>
-        <span class="property">
-          <label for="username">{'Username'|@translate}</label>
-        </span>
-      {if not $SPECIAL_USER}
-        <input type="text" name="username" id="username" value="{$USERNAME}">
-      {else}
-        {$USERNAME}
-      {/if}
-      </li>
-    {if not $SPECIAL_USER} {* can modify password + email*}
-      <li>
-        <span class="property">
-          <label for="mail_address">{'Email address'|@translate}</label>
-        </span>
-        <input type="text" name="mail_address" id="mail_address" value="{$EMAIL}">
-      </li>
-      <li>
-        <span class="property">
-          <label for="use_new_pwd">{'New password'|@translate}</label>
-        </span>
-        <input type="password" name="use_new_pwd" id="use_new_pwd" value="">
-      </li>
-      <li>
-        <span class="property">
-          <label for="passwordConf">{'Confirm Password'|@translate}</label>
-        </span>
-        <input type="password" name="passwordConf" id="passwordConf" value="">
-      </li>
-    {/if}
-    </ul>
-  </fieldset>
-
-  <fieldset>
-    <legend>{'Preferences'|@translate}</legend>
-
-    <ul>
-      <li>
-        <span class="property">
-          <label for="nb_image_page">{'Number of photos per page'|@translate}</label>
-        </span>
-        <input type="text" size="4" maxlength="3" name="nb_image_page" id="nb_image_page" value="{$NB_IMAGE_PAGE}">
-      </li>
-    {if not $SPECIAL_USER}
-      <li>
-        <span class="property">
-          <label for="template">{'Theme'|@translate}</label>
-        </span>
-        {html_options id=template name=theme options=$template_options selected=$template_selection}
-      </li>
-      <li>
-        <span class="property">
-          <label for="language">{'Language'|@translate}</label>
-        </span>
-        {html_options id=language name=language options=$language_options selected=$language_selection}
-      </li>
-    {/if}
-      <li>
-        <span class="property">
-          <label for="recent_period">{'Recent period'|@translate}</label>
-        </span>
-        <input type="text" size="3" maxlength="2" name="recent_period" id="recent_period" value="{$RECENT_PERIOD}">
-      </li>
-      <li>
-        <span class="property">{'Expand all albums'|@translate}</span>
-        {html_radios name='expand' options=$radio_options selected=$EXPAND}
-      </li>
-    {if $ACTIVATE_COMMENTS}
-      <li>
-        <span class="property">{'Show number of comments'|@translate}</span>
-        {html_radios name='show_nb_comments' options=$radio_options selected=$NB_COMMENTS}
-      </li>
-    {/if}
-      <li>
-        <span class="property">{'Show number of hits'|@translate}</span>
-        {html_radios name='show_nb_hits' options=$radio_options selected=$NB_HITS}
-      </li>
-    </ul>
-  </fieldset>
-
-  <p class="bottomButtons">
-    <input type="hidden" name="pwg_token" value="{$PWG_TOKEN}">
-    <input class="submit" type="submit" name="validate" value="{'Submit'|@translate}">
-    <input class="submit" type="reset" name="reset" value="{'Reset'|@translate}">
-  </p>
-
-</form>
Index: /trunk/language/en_UK/admin.lang.php
===================================================================
--- /trunk/language/en_UK/admin.lang.php	(revision 29220)
+++ /trunk/language/en_UK/admin.lang.php	(revision 29221)
@@ -803,4 +803,5 @@
 $lang['The Piwigo export plugin allows you to create albums and export photos.'] = 'The Piwigo export plugin allows you to create albums and export photos.';
 $lang['The Piwigo publish Plug-in allows you to export and synchronize photos from Lightroom directly to your Piwigo photo gallery.'] = 'The Piwigo publish Plug-in allows you to export and synchronize photos from Lightroom directly to your Piwigo photo gallery.';
+$lang['The settings for the guest are from the %s user']='The settings for the guest are from the %s user'
 $lang['The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form'] = 'The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form';
 $lang['The uploaded file exceeds the upload_max_filesize directive in php.ini: %sB'] = 'The uploaded file exceeds the upload_max_filesize directive in php.ini: %sB';
Index: /trunk/profile.php
===================================================================
--- /trunk/profile.php	(revision 29220)
+++ /trunk/profile.php	(revision 29221)
@@ -70,4 +70,5 @@
   $page['body_id'] = 'theProfilePage';
   $template->set_filename('profile', 'profile.tpl');
+  $template->set_filename('profile_content', 'profile_content.tpl');
 
   load_profile_in_template(
@@ -75,4 +76,6 @@
     make_index_url(), // for redirect
     $userdata );
+  $template->assign_var_from_handle('PROFILE_CONTENT', 'profile_content');
+
 
   
@@ -290,10 +293,15 @@
 }
 
-
-function load_profile_in_template($url_action, $url_redirect, $userdata)
+/**
+ * Assign template variables, from arguments
+ * Used to build profile edition pages
+ * 
+ * @param string $url_action
+ * @param string $url_redirect
+ * @param array $userdata
+ */
+function load_profile_in_template($url_action, $url_redirect, $userdata, $template_prefixe=null)
 {
   global $template, $conf;
-
-  $template->set_filename('profile_content', 'profile_content.tpl');
 
   $template->assign('radio_options',
@@ -304,15 +312,15 @@
   $template->assign(
     array(
-      'USERNAME'=>stripslashes($userdata['username']),
-      'EMAIL'=>@$userdata['email'],
-      'ALLOW_USER_CUSTOMIZATION'=>$conf['allow_user_customization'],
-      'ACTIVATE_COMMENTS'=>$conf['activate_comments'],
-      'NB_IMAGE_PAGE'=>$userdata['nb_image_page'],
-      'RECENT_PERIOD'=>$userdata['recent_period'],
-      'EXPAND' =>$userdata['expand'] ? 'true' : 'false',
-      'NB_COMMENTS'=>$userdata['show_nb_comments'] ? 'true' : 'false',
-      'NB_HITS'=>$userdata['show_nb_hits'] ? 'true' : 'false',
-      'REDIRECT' => $url_redirect,
-      'F_ACTION'=>$url_action,
+      $template_prefixe.'USERNAME'=>stripslashes($userdata['username']),
+      $template_prefixe.'EMAIL'=>@$userdata['email'],
+      $template_prefixe.'ALLOW_USER_CUSTOMIZATION'=>$conf['allow_user_customization'],
+      $template_prefixe.'ACTIVATE_COMMENTS'=>$conf['activate_comments'],
+      $template_prefixe.'NB_IMAGE_PAGE'=>$userdata['nb_image_page'],
+      $template_prefixe.'RECENT_PERIOD'=>$userdata['recent_period'],
+      $template_prefixe.'EXPAND' =>$userdata['expand'] ? 'true' : 'false',
+      $template_prefixe.'NB_COMMENTS'=>$userdata['show_nb_comments'] ? 'true' : 'false',
+      $template_prefixe.'NB_HITS'=>$userdata['show_nb_hits'] ? 'true' : 'false',
+      $template_prefixe.'REDIRECT' => $url_redirect,
+      $template_prefixe.'F_ACTION'=>$url_action,
       ));
 
@@ -339,5 +347,4 @@
 
   $template->assign('PWG_TOKEN', get_pwg_token());
-  $template->assign_var_from_handle('PROFILE_CONTENT', 'profile_content');
 }
 ?>
