Index: /extensions/CommentEditor/classes/ce_config.class.php
===================================================================
--- /extensions/CommentEditor/classes/ce_config.class.php	(revision 3474)
+++ /extensions/CommentEditor/classes/ce_config.class.php	(revision 3475)
@@ -9,4 +9,6 @@
   var $config_values;
   var $default_config;
+  var $db_key;
+  var $db_comment;
 
   /* ************************ */
@@ -16,4 +18,6 @@
   function CE_Config($default_config = array()) {
     $this->default_config = $default_config;
+    $this->db_key = CE_CFG_DB_KEY;
+    $this->db_comment = CE_CFG_DB_COMMENT;
   }
 
@@ -27,4 +31,12 @@
       }
       return null;
+  }
+
+  function setDBKey($key) {
+    $this->db_key = $key;
+  }
+
+  function setDBComment($comment) {
+    $this->db_comment = $comment;
   }
 
@@ -69,7 +81,7 @@
         REPLACE INTO '.CONFIG_TABLE.'
         VALUES(
-          \''.CE_CFG_DB_KEY.'\',
+          \''. $this->db_key .'\',
           \''.serialize($this->config_values).'\',
-          \''. CE_CFG_DB_COMMENT . '\')
+          \''. $this->db_comment . '\')
         ;';
     $result = pwg_query($query);
@@ -86,17 +98,10 @@
 
   static function install($plugin_id, $default_config = array()) {
-    $query = '
-        REPLACE INTO '.CONFIG_TABLE.'
-        VALUES(
-          \'' . $plugin_id . '\',
-          \'' . serialize($default_config) . '\',
-          \'Factory settings for '. $plugin_id . '\')
-        ;';
-    $result = pwg_query($query);
-    if($result) {
-      return true;
-    } else {
-      return false;
-    }
+    $config = new CE_Config($default_config);
+    $config->setDBComment('Factory settings for '. $plugin_id);
+    $config->setDBKey($plugin_id);
+    $config->loadConfig();
+    $result = $config->saveConfig();
+    return $result;
   }
 
Index: /extensions/CommentEditor/classes/ce_plugin.class.php
===================================================================
--- /extensions/CommentEditor/classes/ce_plugin.class.php	(revision 3474)
+++ /extensions/CommentEditor/classes/ce_plugin.class.php	(revision 3475)
@@ -1,4 +1,4 @@
 <?php
-/* $Id: ce_plugin.class.php,v 1.12 2009/06/29 11:43:18 Criss Exp $ */
+/* $Id: ce_plugin.class.php,v 1.13 2009/06/30 19:01:50 Criss Exp $ */
 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
 
@@ -65,5 +65,6 @@
     }
     global $template, $conf, $user;
-    if ((!is_a_guest() and ($user[$conf['user_fields']['username']] == $author))
+    if ((!is_a_guest()
+          and ($user[$conf['user_fields']['username']] == $author))
         or is_admin()) {
       $key = count($template->get_template_vars('comments'));
@@ -94,5 +95,5 @@
         $comments[$key]['DATE'] .= $this->getEditUrl($current_id);
         $comments[$key]['DATE'] .= '">';
-        $comments[$key]['DATE'] .= l10n('comment_edit_tool');
+        $comments[$key]['DATE'] .= l10n('ce_edit_tool');
         $comments[$key]['DATE'] .= '</a>';
       }
@@ -129,5 +130,5 @@
   function doAction() {
     $comment_id = "";
-    $action = $this->isCommentEdit($_SERVER['QUERY_STRING'], $comment_id);
+    $action = $this->isCommentEdit($comment_id);
     switch ($action) {
       case CE_ACTION_EDIT:
@@ -139,5 +140,5 @@
         break;
       case CE_ACTION_ERROR:
-        $infos = array('comment_edit_forbidden');
+        $infos = array('ce_edit_forbidden');
         $this->displayError($infos);
         break;
@@ -152,24 +153,18 @@
   }
 
-  function isCommentEdit($p_query_string, &$p_comment_id) {
-    $params = split('\&', $p_query_string);
+  function isCommentEdit(&$p_comment_id) {
     $action = CE_ACTION_NONE;
     $comment_id = "";
-    foreach ($params as $current_param) {
-      $key_value = split('=', $current_param);
-      if (isset($key_value[1])) {
-        if (CE_ACTION == $key_value[0] && CE_ACTION_NONE == $action) {
-          switch ($key_value[1]) {
-            case CE_ACTION_EDIT:
-            case CE_ACTION_UPDATE:
-              $action = $key_value[1];
-              break;
-            default:
-          }
-        }
-        if (CE_ID == $key_value[0]) {
-          $comment_id = $key_value[1];
-        }
+    if (isset($_GET[CE_ACTION])) {
+      switch ($_GET[CE_ACTION]) {
+        case CE_ACTION_EDIT:
+        case CE_ACTION_UPDATE:
+          $action = $_GET[CE_ACTION];
+          break;
+        default:
       }
+    }
+    if (isset($_GET[CE_ID])) {
+        $comment_id = $_GET[CE_ID];
     }
     if (CE_ACTION_EDIT == $action) {
@@ -200,5 +195,5 @@
     if (!$this->isEditAllowed($comment)) {
       // Not allowed
-      array_push($infos, 'comment_edit_forbidden');
+      array_push($infos, 'ce_edit_forbidden');
       $this->displayError($infos);
       return;
@@ -211,10 +206,10 @@
     if ((!isset($_POST['ce_commentid'])) or
         (!isset($_POST['ce_imageid']))) {
-      array_push($infos, 'comment_access_invalid');
+      array_push($infos, 'ce_access_invalid');
       $this->displayError($infos);
       return;
     }
     if (!is_numeric($_POST['ce_imageid'])) {
-      array_push($infos, 'comment_access_invalid');
+      array_push($infos, 'ce_access_invalid');
       $this->displayError($infos);
       return;
@@ -223,5 +218,5 @@
 
     if (!$this->isEditAllowed($comment)) {
-      array_push($infos, 'comment_edit_forbidden');
+      array_push($infos, 'ce_edit_forbidden');
       $this->displayError($infos);
       return;
@@ -229,5 +224,5 @@
     $image_id = $comment->getInfo('image_id');
     if (intval($_POST['ce_imageid']) != intval($image_id)) {
-      array_push($infos, 'comment_access_invalid');
+      array_push($infos, 'ce_access_invalid');
       $this->displayError($infos);
       return;
@@ -255,5 +250,7 @@
     $conf['anti-flood_time'] = 0;
 
-    $comment_action = update_user_comment($comment_array, @$_POST['key'], $infos );
+    $comment_action = update_user_comment($comment_array,
+                                          @$_POST['key'],
+                                          $infos );
 
     // Reactivate anti-flood system
@@ -271,10 +268,12 @@
         break;
       default:
-        trigger_error('Invalid comment action '.$comment_action, E_USER_WARNING);
+        trigger_error('Invalid comment action '.$comment_action,
+                      E_USER_WARNING);
     }
 
     // allow plugins to notify what's going on
     trigger_action( 'user_comment_insertion',
-                    array_merge($comment_array, array('action'=>$comment_action)));
+                    array_merge($comment_array, array('action'=>
+                                                      $comment_action)));
     if ($comment_action=='reject') {
       $this->displayError($infos);
@@ -329,13 +328,19 @@
       'TYPE'  => $p_type,
       'IMG'   => $p_image,
-      'TITLE' => l10n($p_type),
+      'TITLE' => l10n('ce_'.$p_type),
       'MSG'   => $messages
     );
 
     global $template;
-    if ("" == $template->get_template_vars('U_HOME')) {
-      $template->assign('U_HOME', make_index_url());
-    }
-    $template->set_filenames(array('ce_message'=>$this->getTemplate('message.tpl')));
+
+    $ce_exit = array(
+      'URL'   => $this->getBaseUrl(),
+      'TITLE' => 'ce_close_message_title',
+      'ALT'   => 'ce_close_message_alt',
+      'IMG'   => CE_CLOSE_IMG
+    );
+    $template->assign('ce_exit', $ce_exit);
+    $template->set_filenames( array('ce_message'=>
+                                    $this->getTemplate('message.tpl')));
     $template->block_html_head( '',
                   '<link rel="stylesheet" type="text/css" href="'
@@ -347,5 +352,5 @@
     }
 
-    $template->assign('message', $message_array);
+    $template->assign('ce_message', $message_array);
     $old_begin = $template->get_template_vars($begin);
     $template->assign($begin, $template->parse('ce_message', true));
@@ -374,16 +379,32 @@
       'AUTHOR'    => $p_comment->getInfo('author'),
       'IMAGE'     => $p_comment->getInfo('image_id'),
-      'DISABLED'  => !is_admin(),
-      'USERS'     => CE_Comment::getUsers(),
-      'F_ACTION'  => $this->getUpdateUrl(),
-      'FREEAUTHOR'=> ($p_comment->isKnownAuthor())?'':'checked="checked"'
+      'F_ACTION'  => $this->getUpdateUrl()
       );
-      if ("" == $template->get_template_vars('U_HOME')) {
-        $template->assign('U_HOME', make_index_url());
-      }
-      $template->assign('comment', $tpl_comment);
-      $old_begin = $template->get_template_vars($begin);
-      $template->assign($begin, $template->parse('ce_edit', true));
-      $template->concat($begin, $old_begin);
+
+    if (is_admin()) {
+      $tpl_comment['USERS'] = CE_Comment::getUsers();
+      $tpl_comment['FREEAUTHOR'] = ($p_comment->isKnownAuthor())?
+                                        '':CE_CHECKED;
+    }
+
+    $additional_toolbar = "";
+    $additional_toolbar = trigger_event('comment_editor_toolbar',
+                                        $additional_toolbar);
+    if ("" != $additional_toolbar) {
+        $tpl_comment['TOOLBAR'] = $additional_toolbar;
+    }
+
+    $ce_exit = array(
+      'URL'   => $this->getBaseUrl(),
+      'TITLE' => 'ce_close_editor_title',
+      'ALT'   => 'ce_close_editor_alt',
+      'IMG'   => CE_CLOSE_IMG
+    );
+    $template->assign('ce_exit', $ce_exit);
+
+    $template->assign('comment_editor', $tpl_comment);
+    $old_begin = $template->get_template_vars($begin);
+    $template->assign($begin, $template->parse('ce_edit', true));
+    $template->concat($begin, $old_begin);
   }
 
@@ -414,7 +435,12 @@
   }
 
-  function getEditUrl($comment_id) {
+  function getBaseUrl() {
     $url  = get_root_url() . $this->getScriptName() . '.php';
     $url .= get_query_string_diff(array(CE_ACTION, CE_ID));
+    return $url;
+  }
+
+  function getEditUrl($comment_id) {
+    $url = $this->getBaseUrl();
     $url = add_url_params($url,
                           array(
@@ -427,6 +453,5 @@
 
   function getUpdateUrl() {
-    $url  = get_root_url() . $this->getScriptName() .'.php';
-    $url .= get_query_string_diff(array(CE_ACTION, CE_ID));
+    $url = $this->getBaseUrl();
     $url = add_url_params($url,
                           array(
Index: /extensions/CommentEditor/include/ce_common.inc.php
===================================================================
--- /extensions/CommentEditor/include/ce_common.inc.php	(revision 3474)
+++ /extensions/CommentEditor/include/ce_common.inc.php	(revision 3475)
@@ -1,4 +1,4 @@
 <?php
-/* $Id: ce_common.inc.php,v 1.12 2009/06/29 11:43:18 Criss Exp $ */
+/* $Id: ce_common.inc.php,v 1.13 2009/06/30 19:01:51 Criss Exp $ */
 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
 
@@ -7,45 +7,44 @@
 /* ************************** */
 
-// Version update
-define('CE_VERSION',  '1.0.j');
+// Version
+define('CE_VERSION',            '1.0.k');
 
-// Define constants
-define('CE_INCLUDE_DIR',   'include/');
-define('CE_CLASSES_DIR',   'classes/');
-define('CE_IMAGES_DIR',    'images/');
-define('CE_TEMPLATE_DIR',  'template/');
-define('CE_ADMIN_DIR',     'admin/');
-
-define('CE_CLASSES',       CE_PATH.CE_CLASSES_DIR);
-define('CE_INCLUDE',       CE_PATH.CE_INCLUDE_DIR);
-define('CE_TEMPLATE',      CE_PATH.CE_TEMPLATE_DIR);
-define('CE_ADMIN',         CE_PATH.CE_ADMIN_DIR);
-define('CE_AMDIN_TPL',     CE_ROOT.CE_ADMIN_DIR.CE_TEMPLATE_DIR);
-
-define('CE_OBSOLETE',      'obsolete.list');
-define('CE_ERRORS',        CE_INCLUDE.'errors.png');
-define('CE_INFOS',         CE_INCLUDE.'infos.png');
-define('CE_TYPE_INFO',     'info');
-define('CE_TYPE_ERROR',    'error');
-define('CE_PAGE',          'page');
-define('CE_PARAMS',        'params');
-define('CE_ID',            'comment_id');
-define('CE_ACTION',        'comment_action');
-define('CE_ACTION_NONE',   'none');
-define('CE_ACTION_EDIT',   'edit_comment');
-define('CE_ACTION_UPDATE', 'update_comment');
-define('CE_ACTION_ERROR',  'error_comment');
-
+// Directories
+define('CE_INCLUDE_DIR',        'include/');
+define('CE_CLASSES_DIR',        'classes/');
+define('CE_IMAGES_DIR',         'images/');
+define('CE_TEMPLATE_DIR',       'template/');
+define('CE_ADMIN_DIR',          'admin/');
+// Path
+define('CE_CLASSES',            CE_PATH.CE_CLASSES_DIR);
+define('CE_INCLUDE',            CE_PATH.CE_INCLUDE_DIR);
+define('CE_TEMPLATE',           CE_PATH.CE_TEMPLATE_DIR);
+define('CE_ADMIN',              CE_PATH.CE_ADMIN_DIR);
+define('CE_AMDIN_TPL',          CE_ROOT.CE_ADMIN_DIR.CE_TEMPLATE_DIR);
+// Files
+define('CE_OBSOLETE',           'obsolete.list');
+define('CE_ERRORS',             CE_INCLUDE.'errors.png');
+define('CE_INFOS',              CE_INCLUDE.'infos.png');
+define('CE_CLOSE_IMG',          'exit.png');
+// Constants
+define('CE_TYPE_INFO',          'info');
+define('CE_TYPE_ERROR',         'error');
+define('CE_PAGE',               'page');
+define('CE_PARAMS',             'params');
+define('CE_ID',                 'comment_id');
+define('CE_ACTION',             'comment_action');
+define('CE_ACTION_NONE',        'none');
+define('CE_ACTION_EDIT',        'edit_comment');
+define('CE_ACTION_UPDATE',      'update_comment');
+define('CE_ACTION_ERROR',       'error_comment');
+define('CE_CHECKED',            'checked="checked"');
 // Config keys
 if (isset($plugin)) {
-  define('CE_CFG_DB_KEY',     $plugin['id']);
-  define('CE_CFG_DB_COMMENT', 'Configuration of plugin ' . $plugin['id']);
+  define('CE_CFG_DB_KEY',       $plugin['id']);
+  define('CE_CFG_DB_COMMENT',   'Configuration of plugin ' . $plugin['id']);
 }
 define('CE_CFG_DISPLAY_ERROR',  'display_error');
 define('CE_CFG_DISPLAY_INFO',   'display_info');
 define('CE_CFG_VERSION',        'version');
-
-// Templates usage
-define('CE_CHECKED',  'checked="checked"');
 
 /* ************************** */
Index: /extensions/CommentEditor/language/en_UK/plugin.lang.php
===================================================================
--- /extensions/CommentEditor/language/en_UK/plugin.lang.php	(revision 3474)
+++ /extensions/CommentEditor/language/en_UK/plugin.lang.php	(revision 3475)
@@ -1,4 +1,4 @@
 <?php
-/* $Id: plugin.lang.php,v 1.6 2009/06/29 11:43:18 Criss Exp $ */
+/* $Id: plugin.lang.php,v 1.7 2009/06/30 19:01:51 Criss Exp $ */
 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
 global $lang;
@@ -6,17 +6,20 @@
 // ==================================================================
 // Edit block
-$lang['comment_edit'] = 'Comment edition';
-$lang['comment_author'] = 'Author';
-$lang['comment_author_free'] = 'Free choice of the author';
-$lang['comment_content'] = 'Comment';
-$lang['comment_edit_tool'] = 'Edit';
-
+$lang['ce_edit'] = 'Comment edition';
+$lang['ce_author'] = 'Author';
+$lang['ce_author_free'] = 'Free choice of the author';
+$lang['ce_content'] = 'Comment';
+$lang['ce_edit_tool'] = 'Edit';
+$lang['ce_close_editor_title'] = 'Close edition block';
+$lang['ce_close_editor_alt'] = 'Close';
 
 // ==================================================================
 // Message block
-$lang[CE_TYPE_INFO] = 'Information';
-$lang[CE_TYPE_ERROR] = 'Error';
-$lang['comment_edit_forbidden'] = 'You are not allowed to edit this comment';
-$lang['comment_access_invalid'] = 'Invalid access';
+$lang['ce_'.CE_TYPE_INFO] = 'Information';
+$lang['ce_'.CE_TYPE_ERROR] = 'Error';
+$lang['ce_edit_forbidden'] = 'You are not allowed to edit this comment';
+$lang['ce_access_invalid'] = 'Invalid access';
+$lang['ce_close_message_title'] = 'Close message block';
+$lang['ce_close_message_alt'] = 'Close';
 
 // ==================================================================
Index: /extensions/CommentEditor/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/CommentEditor/language/fr_FR/plugin.lang.php	(revision 3474)
+++ /extensions/CommentEditor/language/fr_FR/plugin.lang.php	(revision 3475)
@@ -1,4 +1,4 @@
 <?php
-/* $Id: plugin.lang.php,v 1.7 2009/06/29 11:43:18 Criss Exp $ */
+/* $Id: plugin.lang.php,v 1.8 2009/06/30 19:01:50 Criss Exp $ */
 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
 global $lang;
@@ -6,16 +6,20 @@
 // ==================================================================
 // Edit block
-$lang['comment_edit'] = 'Edition de commentaire';
-$lang['comment_author'] = 'Auteur';
-$lang['comment_author_free'] = 'Choix libre de l\'auteur';
-$lang['comment_content'] = 'Commentaire';
-$lang['comment_edit_tool'] = 'Editer';
+$lang['ce_edit'] = 'Edition de commentaire';
+$lang['ce_author'] = 'Auteur';
+$lang['ce_author_free'] = 'Choix libre de l\'auteur';
+$lang['ce_content'] = 'Commentaire';
+$lang['ce_edit_tool'] = 'Editer';
+$lang['ce_close_editor_title'] = 'Fermer le bloc d\'édition';
+$lang['ce_close_editor_alt'] = 'Fermer';
 
 // ==================================================================
 // Message block
-$lang[CE_TYPE_INFO] = 'Information';
-$lang[CE_TYPE_ERROR] = 'Erreur';
-$lang['comment_edit_forbidden'] = 'Vous n\'êtes pas autorisé à  éditer ce commentaire';
-$lang['comment_access_invalid'] = 'Accès invalide';
+$lang['ce_'.CE_TYPE_INFO] = 'Information';
+$lang['ce_'.CE_TYPE_ERROR] = 'Erreur';
+$lang['ce_edit_forbidden'] = 'Vous n\'êtes pas autorisé à  éditer ce commentaire';
+$lang['ce_access_invalid'] = 'Accès invalide';
+$lang['ce_close_message_title'] = 'Fermer le bloc de message';
+$lang['ce_close_message_alt'] = 'Fermer';
 
 // ==================================================================
Index: /extensions/CommentEditor/language/it_IT/plugin.lang.php
===================================================================
--- /extensions/CommentEditor/language/it_IT/plugin.lang.php	(revision 3474)
+++ /extensions/CommentEditor/language/it_IT/plugin.lang.php	(revision 3475)
@@ -1,4 +1,4 @@
 <?php
-/* $Id: plugin.lang.php,v 1.1 2009/06/29 11:51:59 Criss Exp $ */
+/* $Id: plugin.lang.php,v 1.2 2009/06/30 19:01:51 Criss Exp $ */
 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
 global $lang;
@@ -6,17 +6,21 @@
 // ==================================================================
 // Edit block
-$lang['comment_edit'] = 'Edizione dei commenti';
-$lang['comment_author'] = 'Autore';
-$lang['comment_author_free'] = 'Scelta libera del\'autore';
-$lang['comment_content'] = 'Commento';
-//$lang['comment_edit_tool'] = ''; // TODO
+$lang['ce_edit'] = 'Edizione dei commenti';
+$lang['ce_author'] = 'Autore';
+$lang['ce_author_free'] = 'Scelta libera del\'autore';
+$lang['ce_content'] = 'Commento';
+//$lang['ce_edit_tool'] = ''; // TODO
+//$lang['ce_close_editor_title'] = ''; // TODO
+//$lang['ce_close_editor_alt'] = ''; // TODO
 
 
 // ==================================================================
 // Message block
-$lang[CE_TYPE_INFO] = 'Informazione';
-$lang[CE_TYPE_ERROR] = 'Errore';
-$lang['comment_edit_forbidden'] = 'Non siete autorizati ad editare questo commento';
-$lang['comment_access_invalid'] = 'Accesso invalido';
+$lang['ce_'.CE_TYPE_INFO] = 'Informazione';
+$lang['ce_'.CE_TYPE_ERROR] = 'Errore';
+$lang['ce_edit_forbidden'] = 'Non siete autorizati ad editare questo commento';
+$lang['ce_access_invalid'] = 'Accesso invalido';
+//$lang['ce_close_message_title'] = ''; // TODO
+//$lang['ce_close_message_alt'] = ''; // TODO
 
 // ==================================================================
Index: /extensions/CommentEditor/main.inc.php
===================================================================
--- /extensions/CommentEditor/main.inc.php	(revision 3474)
+++ /extensions/CommentEditor/main.inc.php	(revision 3475)
@@ -1,7 +1,7 @@
 <?php
-/* $Id: main.inc.php,v 1.17 2009/06/29 11:51:59 Criss Exp $ */
+/* $Id: main.inc.php,v 1.18 2009/06/30 19:01:50 Criss Exp $ */
 /*
  Plugin Name: Comment Editor
- Version: 1.0.j
+ Version: 1.0.k
  Description: Allow to edit comment
  Plugin URI: http://piwigo.org/ext/extension_view.php?eid=296
@@ -11,4 +11,7 @@
 
 /** History **
+  2009-06-30 1.0.k
+                    Add toolbar trigger for edit template
+
   2009-06-29 1.0.j
                     Add obsolete files management
@@ -18,10 +21,10 @@
                     Fix bug on administration page (text)
 
-  2009-06-26 1.0.i
-                    Display edit block on picture page if request comes
-                    from this page
+  2009-06-26 1.0.h
+                    Display edit block on picture page if request comes from
+                    this page
                     Add simple administration configuration management
-                    Add and remove default configuration from database
-                    on plugin install / uninstall
+                    Add and remove default configuration from database on
+                    plugin install / uninstall
 
   2009-06-22 1.0.g
@@ -46,6 +49,5 @@
 
   2009-06-18 1.0.b
-                    Fix plugin URI to be available in plugin update
-                    check page.
+                    Fix plugin URI to be available in plugin update check page.
                     Reduce code line size.
 
Index: /extensions/CommentEditor/maintain.inc.php
===================================================================
--- /extensions/CommentEditor/maintain.inc.php	(revision 3474)
+++ /extensions/CommentEditor/maintain.inc.php	(revision 3475)
@@ -15,6 +15,6 @@
   load_language('plugin.lang', CE_PATH);
   if ($version != CE_VERSION) {
-      array_push($errors, sprintf(l10n('ce_inconsistent_version'), $plugin_id));
-      return;
+    array_push($errors, sprintf(l10n('ce_inconsistent_version'), $plugin_id));
+    return;
   }
   $clean = ce_clean_obsolete_files(CE_OBSOLETE);
Index: /extensions/CommentEditor/template/edit.tpl
===================================================================
--- /extensions/CommentEditor/template/edit.tpl	(revision 3474)
+++ /extensions/CommentEditor/template/edit.tpl	(revision 3475)
@@ -1,4 +1,4 @@
-{* $Id: edit.tpl,v 1.7 2009/06/26 09:17:01 Criss Exp $ *}
-{if !$comment.DISABLED}
+{* $Id: edit.tpl,v 1.8 2009/06/30 19:01:51 Criss Exp $ *}
+{if isset($comment_editor.USERS)}
 <script type="text/javascript">
 function toggleDisabled(aToggle, aList1, aList2) {ldelim}
@@ -14,39 +14,45 @@
   <div class="titrePage">
     <ul class="categoryActions">
-      <li><a href="{$U_HOME}" title="{'return to homepage'|@translate}"><img src="{$themeconf.icon_dir}/home.png" class="button" alt="{'home'|@translate}"/></a></li>
+      <li><a href="{$ce_exit.URL}" title="{$ce_exit.TITLE|@translate}"><img src="{$themeconf.icon_dir}/{$ce_exit.IMG}" class="button" alt="{$ce_exit.ALT|@translate}"/></a></li>
     </ul>
-  <h2>{'comment_edit'|@translate}</h2>
+  <h2>{'ce_edit'|@translate}</h2>
   </div>
   <div id="ce-comments">
-    <form  method="post" action="{$comment.F_ACTION}" class="filter" id="editComment">
+    <form  method="post" action="{$comment_editor.F_ACTION}" class="filter" id="editComment">
     <table>
     <tr>
-      <td>{'comment_author'|@translate}</td>
-      {if $comment.DISABLED}
-      <td colspan="3">
-        <input type="text" name="ce_author" disabled="disabled" value="{$comment.AUTHOR}">
-      {else}
+      <td>{'ce_author'|@translate}</td>
+      {if isset($comment_editor.USERS)}
       <td>
-        {html_options name=ce_author id=ce_authorlist options=$comment.USERS selected=$comment.AUTHOR}
+        {html_options name=ce_author id=ce_authorlist options=$comment_editor.USERS selected=$comment_editor.AUTHOR}
       </td>
       <td align="right">
-        <input type="checkbox" name="ce_freeauthorck" id="ce_freeauthorck" value="1" onchange="toggleDisabled('ce_freeauthorck', 'ce_authorlist', 'ce_freeauthorfield');" {$comment.FREEAUTHOR}> {'comment_author_free'|@translate}
+        <input type="checkbox" name="ce_freeauthorck" id="ce_freeauthorck" value="1" onchange="toggleDisabled('ce_freeauthorck', 'ce_authorlist', 'ce_freeauthorfield');" {$comment_editor.FREEAUTHOR}> {'ce_author_free'|@translate}
       </td>
       <td align="right">
-        <input type="text" name="ce_freeauthor" id="ce_freeauthorfield" value="{$comment.AUTHOR}" >
+        <input type="text" name="ce_freeauthor" id="ce_freeauthorfield" value="{$comment_editor.AUTHOR}" >
         <script type="text/javascript">toggleDisabled('ce_freeauthorck', 'ce_authorlist', 'ce_freeauthorfield');</script>
+      {else}
+      <td colspan="3">
+        <input type="text" name="ce_author" disabled="disabled" value="{$comment_editor.AUTHOR}">
       {/if}
       </td>
     </tr>
+    {if isset($comment_editor.TOOLBAR)}
     <tr>
-      <td>{'comment_content'|@translate}</td>
+      <td>&nbsp;</td>
+      <td colspan="4">{$comment_editor.TOOLBAR}</td>
+    </tr>
+    {/if}
+    <tr>
+      <td>{'ce_content'|@translate}</td>
       <td colspan="3">
-        <textarea name="ce_content" id="ce_contentid" rows="5" cols="80">{$comment.CONTENT}</textarea>
+        <textarea name="ce_content" id="ce_contentid" rows="5" cols="80">{$comment_editor.CONTENT}</textarea>
       </td>
     </tr>
     <tr>
       <td colspan="4" align="center">
-        <input type="hidden" name="ce_imageid" value="{$comment.IMAGE}" />
-        <input type="hidden" name="ce_commentid" value="{$comment.KEY}" />
+        <input type="hidden" name="ce_imageid" value="{$comment_editor.IMAGE}" />
+        <input type="hidden" name="ce_commentid" value="{$comment_editor.KEY}" />
         <input class="submit" type="submit" value="{'Submit'|@translate}">
       </td>
Index: /extensions/CommentEditor/template/message.tpl
===================================================================
--- /extensions/CommentEditor/template/message.tpl	(revision 3474)
+++ /extensions/CommentEditor/template/message.tpl	(revision 3475)
@@ -1,17 +1,17 @@
-{* $Id: message.tpl,v 1.6 2009/06/26 09:17:01 Criss Exp $ *}
+{* $Id: message.tpl,v 1.7 2009/06/30 19:01:51 Criss Exp $ *}
 <div class="content" id="ce-message-block">
   <div class="titrePage">
     <ul class="categoryActions">
-      <li><a href="{$U_HOME}" title="{'return to homepage'|@translate}"><img src="{$themeconf.icon_dir}/home.png" class="button" alt="{'home'|@translate}"/></a></li>
+      <li><a href="{$ce_exit.URL}" title="{$ce_exit.TITLE|@translate}"><img src="{$themeconf.icon_dir}/{$ce_exit.IMG}" class="button" alt="{$ce_exit.ALT|@translate}"/></a></li>
     </ul>
-    <h2 id="ce-message-header">{'CommentEditor'|@translate} - {$message.TITLE}</h2>
+    <h2 id="ce-message-header">{'CommentEditor'|@translate} - {$ce_message.TITLE}</h2>
   </div>
-  <div class="ce-message-{$message.TYPE}">
+  <div class="ce-message-{$ce_message.TYPE}">
     <div class="ce-message-img">
-      <img src="{$message.IMG}" alt="{$message.TITLE}" title="{$message.TITLE}" class="button">
+      <img src="{$ce_message.IMG}" alt="{$ce_message.TITLE}" title="{$ce_message.TITLE}" class="button">
     </div>
     <div class="ce-message-list">
       <ul class="ce-message-list">
-        {foreach from=$message.MSG item=msg}
+        {foreach from=$ce_message.MSG item=msg}
         <li>{$msg}</li>
         {/foreach}
