Index: /extensions/CommentEditor/branches/2.0/admin/config.tab.php
===================================================================
--- /extensions/CommentEditor/branches/2.0/admin/config.tab.php	(revision 3556)
+++ /extensions/CommentEditor/branches/2.0/admin/config.tab.php	(revision 3556)
@@ -0,0 +1,37 @@
+<?php
+/* $Id: config.tab.php,v 1.1 2009/06/26 08:56:33 Criss Exp $ */
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+check_status(ACCESS_ADMINISTRATOR);
+if (isset($_POST['submit'])) {
+    $new_value = false;
+    if (isset($_POST['ce_display_info'])) {
+        if ("1" == $_POST['ce_display_info']) {
+            $new_value = true;
+        }
+    }
+    $ce_config->setValue(CE_CFG_DISPLAY_INFO, $new_value);
+    $new_value = false;
+    if (isset($_POST['ce_display_error'])) {
+        if ("1" == $_POST['ce_display_error']) {
+            $new_value = true;
+        }
+    }
+    $ce_config->setValue(CE_CFG_DISPLAY_ERROR, $new_value);
+
+
+    // Save config
+    $saved = $ce_config->saveConfig();
+    global $page;
+    if ($saved) {
+        array_push($page['infos'], l10n('ce_config_saved'));
+    } else {
+        array_push($page['errors'], l10n('ce_config_saved_with_errors'));
+    }
+}
+
+$template->assign('display_info',
+  ($ce_config->getValue(CE_CFG_DISPLAY_INFO))? CE_CHECKED:'');
+$template->assign('display_error',
+  ($ce_config->getValue(CE_CFG_DISPLAY_ERROR))? CE_CHECKED:'');
+
+?>
Index: /extensions/CommentEditor/branches/2.0/admin/index.php
===================================================================
--- /extensions/CommentEditor/branches/2.0/admin/index.php	(revision 3556)
+++ /extensions/CommentEditor/branches/2.0/admin/index.php	(revision 3556)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id: index.php,v 1.1 2009/06/26 08:56:33 Criss Exp $
+// | last update   : $Date: 2009/06/26 08:56:33 $
+// | last modifier : $Author: Criss $
+// | revision      : $Revision: 1.1 $
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/CommentEditor/branches/2.0/admin/template/config.tab.tpl
===================================================================
--- /extensions/CommentEditor/branches/2.0/admin/template/config.tab.tpl	(revision 3556)
+++ /extensions/CommentEditor/branches/2.0/admin/template/config.tab.tpl	(revision 3556)
@@ -0,0 +1,27 @@
+{* $Id: config.tab.tpl,v 1.1 2009/06/26 08:56:33 Criss Exp $ *}
+<div class="titrePage">
+    <h2>{$CE.title} [{$CE.version}]<br>{'ce_tab_config'|@translate}</h2>
+</div>
+<h3>{'ce_config_desc'|@translate}</h3>
+<form method="post" action="{$CE_F_ACTION}" id="update" enctype="multipart/form-data">
+<fieldset>
+  <legend>{'ce_label_config'|@translate}</legend>
+  <ul>
+    <li>
+      <label>
+        <input type="checkbox" name="ce_display_info" value="1" {$display_info} />
+        {'ce_label_display_info'|@translate}
+      </label>
+    </li>
+    <li>
+      <label>
+        <input type="checkbox" name="ce_display_error" value="1" {$display_error} />
+        {'ce_label_display_error'|@translate}
+      </label>
+    </li>
+  </ul>
+  
+</fieldset>
+{* ----------- CONFIGURATION ----------- *}
+<p><input class="submit" type="submit" value="{'button_submit'|@translate}" name="submit"></p>
+</form>
Index: /extensions/CommentEditor/branches/2.0/admin/template/index.php
===================================================================
--- /extensions/CommentEditor/branches/2.0/admin/template/index.php	(revision 3556)
+++ /extensions/CommentEditor/branches/2.0/admin/template/index.php	(revision 3556)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id: index.php,v 1.1 2009/06/26 08:56:33 Criss Exp $
+// | last update   : $Date: 2009/06/26 08:56:33 $
+// | last modifier : $Author: Criss $
+// | revision      : $Revision: 1.1 $
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/CommentEditor/branches/2.0/administration.php
===================================================================
--- /extensions/CommentEditor/branches/2.0/administration.php	(revision 3556)
+++ /extensions/CommentEditor/branches/2.0/administration.php	(revision 3556)
@@ -0,0 +1,61 @@
+<?php
+/* $Id: administration.php,v 1.3 2009/06/29 11:43:18 Criss Exp $ */
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php');
+
+$config_tabs[]='config';
+
+global $template, $page;
+// Include language advices
+load_language('plugin.lang', CE_PATH);
+
+$ce_plugin = get_plugin_data($plugin_id);
+$ce_config = $ce_plugin->getConfig();
+
+// Tabs management
+if (!isset($_GET['tab'])) {
+    $page['tab'] = $config_tabs[0];
+} else {
+    $page['tab'] = $_GET['tab'];
+}
+
+if (!in_array($page['tab'], $config_tabs)) {
+    $page['tab'] = $config_tabs[0];
+}
+
+
+$base_admin_url = get_admin_plugin_menu_link(__FILE__);
+
+$tabsheet = new tabsheet();
+
+foreach ($config_tabs as $current_tab) {
+    $tab_name = 'ce_tab_'.$current_tab;
+    $tabsheet->add($current_tab,
+                   l10n($tab_name),
+                   $base_admin_url.'&amp;tab='.$current_tab);
+}
+$tabsheet->select($page['tab']);
+$tabsheet->assign();
+
+// Define common values
+$template->set_filenames(array(
+                            'plugin_admin_content' => CE_AMDIN_TPL
+                                                      . $page['tab']
+                                                      . '.tab.tpl'
+                          )
+                      );
+
+
+// Define common values
+$ce_common = array(
+    'version' => $ce_plugin->getVersion(),
+    'title'   => $ce_plugin->plugin_id,
+);
+$template->assign('CE', $ce_common);
+
+// Include specific tab
+include_once (CE_ADMIN . $page['tab'] . '.tab.php');
+
+$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
+
+?>
Index: /extensions/CommentEditor/branches/2.0/classes/ce_comment.class.php
===================================================================
--- /extensions/CommentEditor/branches/2.0/classes/ce_comment.class.php	(revision 3556)
+++ /extensions/CommentEditor/branches/2.0/classes/ce_comment.class.php	(revision 3556)
@@ -0,0 +1,96 @@
+<?php
+/* $Id: ce_comment.class.php,v 1.6 2009/06/26 08:56:33 Criss Exp $ */
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+
+/**
+ * CE_Plugin class
+ */
+class CE_Comment {
+  var $id;
+  var $infos = array();
+  var $query;
+  private static $s_user_list = null;
+
+  private static function updateUsers() {
+    $users = array();
+    $query = '
+      SELECT username
+      FROM '. USERS_TABLE .'
+      ORDER BY username';
+    $result = pwg_query( $query );
+    while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
+      $users = array_merge($users, array($row['username'] => $row['username']));
+    }
+    return $users;
+  }
+
+  static function getUsers() {
+    if (null == self::$s_user_list) {
+      // Init user list
+      self::$s_user_list = self::updateUsers();
+    }
+    return self::$s_user_list;
+  }
+
+  function CE_Comment($comment_id) {
+    $this->id = $comment_id;
+    $this->query = '
+      SELECT com.id AS comment_id
+         , com.image_id
+         , com.author
+         , com.date
+         , com.content
+         , com.validated
+        FROM '.COMMENTS_TABLE.' AS com
+        WHERE com.id = ' . $comment_id;
+    $result = pwg_query($this->query);
+    $this->infos = mysql_fetch_array($result, MYSQL_ASSOC);
+  }
+
+  function validateAuthor($author) {
+    $user_list = self::getUsers();
+    if (array_key_exists( strtolower($author),
+                          array_change_key_case($user_list, CASE_LOWER))) {
+      // Look in user list to have right case !
+      foreach ($user_list as $user) {
+        if (0 == strcasecmp($author, $user)) {
+          return $user;
+        }
+      }
+    }
+    return $author;
+  }
+
+  function isKnownAuthor() {
+    if (in_array($this->infos['author'], self::getUsers())) {
+      return true;
+    }
+    return false;
+  }
+
+  function setInfo($key, $value) {
+    if (null == $key) {
+      return;
+    }
+    $this->infos[$key] = $value;
+  }
+
+  function getInfo($key = null) {
+    if (null == $key) {
+      return $this->infos;
+    }
+    return $this->infos[$key];
+  }
+
+  function isAuthor($user) {
+    if (!isset ($this->infos['author'])) {
+      return false;
+    }
+    return (0 == strcmp($this->infos['author'], $user))?true:false;
+  }
+
+  function __toString() {
+    return print_r($this->infos, true);
+  }
+}
+?>
Index: /extensions/CommentEditor/branches/2.0/classes/ce_config.class.php
===================================================================
--- /extensions/CommentEditor/branches/2.0/classes/ce_config.class.php	(revision 3556)
+++ /extensions/CommentEditor/branches/2.0/classes/ce_config.class.php	(revision 3556)
@@ -0,0 +1,141 @@
+<?php
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+
+/**
+ * CE_Config class
+ */
+class CE_Config {
+
+  var $config_values;
+  var $default_config;
+  var $db_key = null;
+  var $db_comment = null;
+
+  /* ************************ */
+  /* ** Constructor        ** */
+  /* ************************ */
+
+  function CE_Config($default_config = array()) {
+    $this->default_config = $default_config;
+  }
+
+  /* ************************ */
+  /* ** Get/Set methods    ** */
+  /* ************************ */
+
+  function getValue($key) {
+      if (isset($this->config_values[$key])) {
+          return $this->config_values[$key];
+      }
+      return null;
+  }
+
+  function setValue($key, $value) {
+      $this->config_values[$key] = $value;
+  }
+
+  function getVersion() {
+    if (isset($this->config_values[CE_CFG_VERSION])) {
+      return $this->config_values[CE_CFG_VERSION];
+    }
+    return CE_VERSION;
+  }
+
+  function setDBKey($key) {
+    $this->db_key = $key;
+  }
+
+  /* ************************ */
+  /* ** Loading methods    ** */
+  /* ************************ */
+
+  function loadConfig() {
+    if (null != $this->db_key) {
+      $query = '
+          SELECT value
+          FROM '.CONFIG_TABLE.'
+          WHERE param = \''. $this->db_key .'\'
+          ;';
+      $result = pwg_query($query);
+      if($result) {
+        $row = mysql_fetch_row($result);
+        if(is_string($row[0])) {
+          $this->config_values = unserialize($row[0]);
+        }
+      }
+    }
+    $this->loadDefaultConfig();
+  }
+
+  private function loadDefaultConfig() {
+    foreach ($this->default_config as $key => $value) {
+      if (!isset($this->config_values[$key])) {
+        $this->config_values[$key] = $value;
+      }
+    }
+  }
+
+  /* ************************ */
+  /* ** Saving  methods    ** */
+  /* ************************ */
+
+  function saveConfig() {
+    if (null == $this->db_key) {
+      return false;
+    }
+
+    if (!isset($this->config_values[CE_CFG_COMMENT])) {
+      $this->setValue(CE_CFG_COMMENT, CE_CFG_DB_COMMENT);
+    }
+    $db_comment = sprintf($this->config_values[CE_CFG_COMMENT],
+                          $this->db_key,
+                          $this->getVersion());
+    $query = '
+        REPLACE INTO '.CONFIG_TABLE.'
+        VALUES(
+          \''. $this->db_key .'\',
+          \''.serialize($this->config_values).'\',
+          \''. $db_comment . '\')
+        ;';
+    $result = pwg_query($query);
+    if($result) {
+      return true;
+    } else {
+      return false;
+    }
+  }
+
+  /* ************************ */
+  /* ** Maintain  methods  ** */
+  /* ************************ */
+
+  static function install($plugin_id, $default_config = array()) {
+    $config = new CE_Config($default_config);
+    $config->setDBKey($plugin_id);
+    $config->loadConfig();
+    if (isset($default_config[CE_CFG_VERSION])) {
+      // Override version
+      $config->setValue(CE_CFG_VERSION, $default_config[CE_CFG_VERSION]);
+    }
+    if (isset($default_config[CE_CFG_COMMENT])) {
+      // Override comment
+      $config->setValue(CE_CFG_COMMENT, $default_config[CE_CFG_COMMENT]);
+    }
+    $result = $config->saveConfig();
+    return $result;
+  }
+
+  static function uninstall($plugin_id) {
+    $query = '
+        DELETE FROM '.CONFIG_TABLE.'
+        WHERE param = \'' . $plugin_id . '\'
+        ;';
+    $result = pwg_query($query);
+    if($result) {
+      return true;
+    } else {
+      return false;
+    }
+  }
+}
+?>
Index: /extensions/CommentEditor/branches/2.0/classes/ce_plugin.class.php
===================================================================
--- /extensions/CommentEditor/branches/2.0/classes/ce_plugin.class.php	(revision 3556)
+++ /extensions/CommentEditor/branches/2.0/classes/ce_plugin.class.php	(revision 3556)
@@ -0,0 +1,468 @@
+<?php
+/* $Id: ce_plugin.class.php,v 1.14 2009/06/30 21:36:20 Criss Exp $ */
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+
+/**
+ * CE_Plugin class
+ */
+class CE_Plugin {
+
+  var $comments_ids;
+  var $config;
+  var $plugin_id;
+
+  /* ************************ */
+  /* ** Constructor        ** */
+  /* ************************ */
+
+  function CE_Plugin($plugin_id, $config = null) {
+    $this->plugin_id = $plugin_id;
+    $this->config = $config;
+    if (null != $this->config) {
+      $this->config->setDBKey(CE_CFG_DB_KEY);
+      $this->config->loadConfig();
+      $this->config->setValue(CE_CFG_COMMENT, CE_CFG_DB_COMMENT);
+    }
+  }
+
+  function getConfig() {
+    return $this->config;
+  }
+
+  /* ************************ */
+  /* ** Trigger management ** */
+  /* ************************ */
+
+  function get_admin_plugin_menu_links($menu) {
+    array_push(
+        $menu,
+        array(
+            'NAME' => $this->plugin_id,
+            'URL' => $this->get_plugin_admin_url()
+        )
+    );
+    return $menu;
+  }
+
+  /**
+   * Update comment ID array
+   */
+  function render_comment_content($content) {
+    $author = null;
+    $id = null;
+    switch (script_basename()) {
+      case "comments":
+        global $comment;
+        $author = $comment['author'];
+        $id = $comment['comment_id'];
+        break;
+      case "picture":
+        global $row;
+        $author = $row['author'];
+        $id = $row['id'];
+        break;
+      default:
+        // Not in right script
+        return $content;
+    }
+    global $template, $conf, $user;
+    if ((!is_a_guest()
+          and ($user[$conf['user_fields']['username']] == $author))
+        or is_admin()) {
+      $key = count($template->get_template_vars('comments'));
+      $this->comments_ids[$key] = $id;
+    }
+    return $content;
+  }
+
+  /**
+   * Check whether the page contains comments.
+   * Add an edit link if user is allowed to edit comment
+   */
+  function loc_begin_page_header() {
+    global $template;
+    $comments = $template->get_template_vars('comments');
+    if (!isset($comments) or (null == $comments)) {
+      // No comment...
+      return;
+    }
+    // Include language advices
+    load_language('plugin.lang', CE_PATH);
+    foreach ($comments as $key => $value) {
+      if (isset($this->comments_ids[$key])) {
+        // User allowed to have edit link
+        $current_id = $this->comments_ids[$key];
+        $comments[$key]['U_ID'] =  $current_id;
+        $comments[$key]['DATE'] .= ' - <a href="';
+        $comments[$key]['DATE'] .= $this->getEditUrl($current_id);
+        $comments[$key]['DATE'] .= '">';
+        $comments[$key]['DATE'] .= l10n('ce_edit_tool');
+        $comments[$key]['DATE'] .= '</a>';
+      }
+    }
+    $template->assign('comments', $comments);
+  }
+
+  /**
+   * Check whether a comment edit or update is requested.
+   */
+  function loc_begin_index() {
+    $this->doAction();
+  }
+
+  function loc_begin_picture() {
+    $this->doAction();
+  }
+
+  /* ************************ */
+  /* ** Accessors          ** */
+  /* ************************ */
+
+  function getVersion() {
+    return $this->config->getVersion();
+  }
+
+  /* ************************ */
+  /* ** Private functions  ** */
+  /* ************************ */
+
+  function doAction() {
+    $comment_id = "";
+    $action = $this->isCommentEdit($comment_id);
+    switch ($action) {
+      case CE_ACTION_EDIT:
+        // Edit
+        $this->editComment($comment_id);
+        break;
+      case CE_ACTION_UPDATE:
+        $this->updateComment();
+        break;
+      case CE_ACTION_ERROR:
+        $infos = array('ce_edit_forbidden');
+        $this->displayError($infos);
+        break;
+      case CE_ACTION_NONE:
+        // Not an edit mode
+        break;
+    }
+  }
+
+  function getTemplate($p_template = 'edit.tpl') {
+    return realpath(CE_TEMPLATE . $p_template);
+  }
+
+  function isCommentEdit(&$p_comment_id) {
+    $action = CE_ACTION_NONE;
+    $comment_id = "";
+    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) {
+      if (is_numeric($comment_id)) {
+        $p_comment_id = intval($comment_id);
+      } else {
+        $action = CE_ACTION_ERROR;
+      }
+    }
+    return $action;
+  }
+
+  function isEditAllowed($p_comment) {
+    if ((FALSE == $p_comment->getInfo()) or
+        is_a_guest()) {
+      return false;
+    }
+    if (is_admin() and !is_adviser()) {
+      return true;
+    }
+    global $conf, $user;
+    return $p_comment->isAuthor($user[$conf['user_fields']['username']]);
+  }
+
+  function editComment($p_comment_id) {
+    $comment = new CE_Comment($p_comment_id);
+    $infos = array();
+    if (!$this->isEditAllowed($comment)) {
+      // Not allowed
+      array_push($infos, 'ce_edit_forbidden');
+      $this->displayError($infos);
+      return;
+    }
+    $this->displayComment($comment);
+  }
+
+  function updateComment() {
+    $infos = array();
+    if ((!isset($_POST['ce_commentid'])) or
+        (!isset($_POST['ce_imageid']))) {
+      array_push($infos, 'ce_access_invalid');
+      $this->displayError($infos);
+      return;
+    }
+    if (!is_numeric($_POST['ce_imageid'])) {
+      array_push($infos, 'ce_access_invalid');
+      $this->displayError($infos);
+      return;
+    }
+    $comment = new CE_Comment($_POST['ce_commentid']);
+
+    if (!$this->isEditAllowed($comment)) {
+      array_push($infos, 'ce_edit_forbidden');
+      $this->displayError($infos);
+      return;
+    }
+    $image_id = $comment->getInfo('image_id');
+    if (intval($_POST['ce_imageid']) != intval($image_id)) {
+      array_push($infos, 'ce_access_invalid');
+      $this->displayError($infos);
+      return;
+    }
+    if (isset($_POST['ce_author'])) {
+      $comment->setInfo('author', $_POST['ce_author']);
+    } else if ((isset($_POST['ce_freeauthorck'])) and
+               (isset($_POST['ce_freeauthor']))) {
+      // Free author
+      $new_author = trim(stripslashes($_POST['ce_freeauthor']));
+      $new_author = $comment->validateAuthor($new_author);
+      $comment->setInfo('author', $new_author);
+    }
+
+    $comment_array = array(
+      'author'      => trim( stripslashes($comment->getInfo('author')) ),
+      'content'     => trim( stripslashes($_POST['ce_content']) ),
+      'image_id'    => $image_id,
+      'comment_id'  => $comment->getInfo('comment_id'),
+    );
+
+    // Deactivate anti-flood system
+    global $conf;
+    $old_anti_flood = $conf['anti-flood_time'];
+    $conf['anti-flood_time'] = 0;
+
+    $comment_action = update_user_comment($comment_array,
+                                          @$_POST['key'],
+                                          $infos );
+
+    // Reactivate anti-flood system
+    $conf['anti-flood_time'] = $old_anti_flood;
+
+    switch ($comment_action) {
+      case 'moderate':
+        array_push( $infos, 'comment_to_validate' );
+      case 'validate':
+        array_push( $infos, 'comment_added');
+        break;
+      case 'reject':
+        set_status_header(403);
+        array_push($infos, 'comment_not_added' );
+        break;
+      default:
+        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)));
+    if ($comment_action=='reject') {
+      $this->displayError($infos);
+    } else {
+      $this->displayInfo($infos);
+    }
+  }
+
+  function getCommentId($p_string_delete) {
+    $comment_id = "";
+    $elements = split('\?', $p_string_delete);
+    if (count($elements) > 1) {
+      $elem_var = split('\&amp;', $elements[1]);
+      foreach ($elem_var as $var) {
+        $key_value = split('=', $var);
+        if (count($key_value) > 1) {
+          switch ($key_value[0]) {
+            case 'comment_to_delete':
+            case 'delete':
+              $comment_id = $key_value[1];
+              break;
+            default:
+              // No ID
+          }
+        }
+      }
+    }
+    return $comment_id;
+  }
+
+  function displayError($p_error) {
+    if ($this->config->getValue(CE_CFG_DISPLAY_ERROR)) {
+        $this->displayMessage($p_error, CE_TYPE_ERROR, CE_ERRORS);
+    }
+  }
+
+  function displayInfo($p_info) {
+    if ($this->config->getValue(CE_CFG_DISPLAY_INFO)) {
+      $this->displayMessage($p_info, CE_TYPE_INFO, CE_INFOS);
+    }
+  }
+
+  function displayMessage($p_message, $p_type, $p_image) {
+    // Include language advices
+    load_language('plugin.lang', CE_PATH);
+
+    $messages = array();
+    foreach ($p_message as $message) {
+      array_push($messages, l10n($message));
+    }
+    $message_array = array(
+      'TYPE'  => $p_type,
+      'IMG'   => $p_image,
+      'TITLE' => l10n('ce_'.$p_type),
+      'MSG'   => $messages
+    );
+
+    global $template;
+
+    $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="'
+                  .CE_INCLUDE . $this->getScriptName() . '.css'
+                  .'">',
+    $smarty, $repeat);
+    if (!$this->setBeginEndFields($begin, $end)) {
+      return;
+    }
+
+    $template->assign('ce_message', $message_array);
+    $old_begin = $template->get_template_vars($begin);
+    $template->assign($begin, $template->parse('ce_message', true));
+    $template->concat($begin, $old_begin);
+  }
+
+  function displayComment($p_comment) {
+    // Include language advices
+    load_language('plugin.lang', CE_PATH);
+
+    global $template;
+    $template->set_filenames(array('ce_edit'=>$this->getTemplate()));
+    $template->block_html_head( '',
+                  '<link rel="stylesheet" type="text/css" href="'
+                  .CE_INCLUDE . $this->getScriptName() . '.css'
+                  .'">',
+    $smarty, $repeat);
+
+    if (!$this->setBeginEndFields($begin, $end)) {
+      return;
+    }
+
+    $tpl_comment = array(
+      'CONTENT'   => $p_comment->getInfo('content'),
+      'KEY'       => $p_comment->getInfo('comment_id'),
+      'AUTHOR'    => $p_comment->getInfo('author'),
+      'IMAGE'     => $p_comment->getInfo('image_id'),
+      'F_ACTION'  => $this->getUpdateUrl()
+      );
+
+    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);
+  }
+
+  function setBeginEndFields(&$begin, &$end) {
+    switch (script_basename()) {
+      case 'index':
+        $begin = 'PLUGIN_INDEX_CONTENT_BEFORE';
+        $end = 'PLUGIN_INDEX_CONTENT_AFTER';
+        break;
+      case 'picture':
+        $begin = 'PLUGIN_PICTURE_BEFORE';
+        $end = 'PLUGIN_PICTURE_AFTER';
+        break;
+      default:
+        return FALSE;
+    }
+    return TRUE;
+  }
+
+  function getScriptName() {
+    switch (script_basename()) {
+      case 'index':
+      case 'picture':
+        return script_basename();
+      default:
+        return 'index';
+    }
+  }
+
+  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(
+                            CE_ACTION => CE_ACTION_EDIT,
+                            CE_ID=>$comment_id
+                          )
+            );
+    return $url;
+  }
+
+  function getUpdateUrl() {
+    $url = $this->getBaseUrl();
+    $url = add_url_params($url,
+                          array(
+                            CE_ACTION => CE_ACTION_UPDATE
+                          )
+            );
+    return $url;
+  }
+
+  function get_plugin_admin_url() {
+    return get_admin_plugin_menu_link(CE_PATH . 'administration.php');
+  }
+
+}
+?>
Index: /extensions/CommentEditor/branches/2.0/classes/index.php
===================================================================
--- /extensions/CommentEditor/branches/2.0/classes/index.php	(revision 3556)
+++ /extensions/CommentEditor/branches/2.0/classes/index.php	(revision 3556)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id: index.php,v 1.1 2009/06/15 21:42:11 cmarchad Exp $
+// | last update   : $Date: 2009/06/15 21:42:11 $
+// | last modifier : $Author: cmarchad $
+// | revision      : $Revision: 1.1 $
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/CommentEditor/branches/2.0/include/ce_common.inc.php
===================================================================
--- /extensions/CommentEditor/branches/2.0/include/ce_common.inc.php	(revision 3556)
+++ /extensions/CommentEditor/branches/2.0/include/ce_common.inc.php	(revision 3556)
@@ -0,0 +1,72 @@
+<?php
+/* $Id: ce_common.inc.php,v 1.18 2009/07/01 20:01:37 Criss Exp $ */
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+
+/* ************************** */
+/* ** Constants            ** */
+/* ************************** */
+
+// Version
+define('CE_VERSION',            '1.0.o');
+
+// 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_FACTORY',     'Factory settings for plugin %s [%s]');
+define('CE_CFG_DB_COMMENT',     'Configuration of plugin %s [%s]');
+define('CE_CFG_DISPLAY_ERROR',  'display_error');
+define('CE_CFG_DISPLAY_INFO',   'display_info');
+define('CE_CFG_COMMENT',        'comment');
+define('CE_CFG_VERSION',        'version');
+
+/* ************************** */
+/* ** Includes             ** */
+/* ************************** */
+
+// Include plugin functions
+@include_once(CE_INCLUDE.'ce_functions.inc.php');
+
+// Load class files
+ce_require_class("CE_Config");
+ce_require_class("CE_Comment");
+ce_require_class("CE_Plugin");
+
+/* ************************** */
+/* ** Variable definitions ** */
+/* ************************** */
+
+// Config default values
+$ce_config_default[CE_CFG_DISPLAY_ERROR]  = true;
+$ce_config_default[CE_CFG_DISPLAY_INFO]   = true;
+
+?>
Index: /extensions/CommentEditor/branches/2.0/include/ce_functions.inc.php
===================================================================
--- /extensions/CommentEditor/branches/2.0/include/ce_functions.inc.php	(revision 3556)
+++ /extensions/CommentEditor/branches/2.0/include/ce_functions.inc.php	(revision 3556)
@@ -0,0 +1,196 @@
+<?php
+/* $Id: ce_functions.inc.php,v 1.7 2009/06/29 11:43:18 Criss Exp $ */
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+
+/**
+ * Include class file
+ * @param $aClassName
+ * @return unknown_type
+ */
+function ce_require_class($aClassName) {
+  require_once CE_CLASSES .strtolower($aClassName) . '.class.php';
+}
+
+function ce_clean_obsolete_files($obsolete_file_list) {
+  if (!file_exists(CE_PATH.$obsolete_file_list)) {
+    return TRUE;
+  }
+  $obsolete = file(CE_PATH.$obsolete_file_list);
+  array_push($obsolete, $obsolete_file_list);
+  return ce_clean_obsolete_list($obsolete);
+}
+
+function ce_clean_obsolete_list($file_list = array(), &$errors = array()) {
+  if (!function_exists('unlink')) {
+      // No unlink available...
+      array_push($errors, l10n('ce_no_unlink'));
+      return FALSE;
+  }
+  $success = TRUE;
+  foreach ($file_list as $file) {
+    $file = CE_PATH . $file;
+    if (file_exists($file)) {
+      // Remove obsolete file
+      $success &= unlink($file);
+    }
+  }
+  if (!$success) {
+      array_push($errors, l10n('ce_unlink_errors'));
+  }
+  return $success;
+}
+
+if (!function_exists('update_user_comment')) {
+
+/**
+ * Changed from Piwigo core function  insert_user_comment
+ */
+
+/**
+ * Tries to update a user comment in the database and returns one of :
+ * validate, moderate, reject
+ * @param array comm contains author, content, image_id
+ * @param string key secret key sent back to the browser
+ * @param array infos out array of messages
+ */
+function update_user_comment( &$comm, $key, &$infos )
+{
+  global $conf, $user;
+
+  $comm = array_merge( $comm,
+    array(
+      'ip' => $_SERVER['REMOTE_ADDR'],
+      'agent' => $_SERVER['HTTP_USER_AGENT']
+    )
+   );
+
+  $infos = array();
+  if (!$conf['comments_validation'] or is_admin())
+  {
+    $comment_action='validate'; //one of validate, moderate, reject
+  }
+  else
+  {
+    $comment_action='moderate'; //one of validate, moderate, reject
+  }
+
+  // display author field if the user status is guest or generic
+  if (!is_classic_user())
+  {
+    if ( empty($comm['author']) )
+    {
+      $comm['author'] = 'guest';
+    }
+    // if a guest try to use the name of an already existing user, he must be
+    // rejected
+    if ( $comm['author'] != 'guest' )
+    {
+      $query = '
+SELECT COUNT(*) AS user_exists
+  FROM '.USERS_TABLE.'
+  WHERE '.$conf['user_fields']['username']." = '".addslashes($comm['author'])."'";
+      $row = mysql_fetch_assoc( pwg_query( $query ) );
+      if ( $row['user_exists'] == 1 )
+      {
+        array_push($infos, l10n('comment_user_exists') );
+        $comment_action='reject';
+      }
+    }
+  }
+  else
+  {
+    if ( empty($comm['author'])) {
+        $comm['author'] = $user[$conf['user_fields']['username']];
+    }
+  }
+  if ( empty($comm['content']) )
+  { // empty comment content
+    $comment_action='reject';
+  }
+
+//  $key = explode( ':', @$key );
+//  if ( count($key)!=2
+//        or $key[0]>time()-2 // page must have been retrieved more than 2 sec ago
+//        or $key[0]<time()-3600 // 60 minutes expiration
+//        or hash_hmac(
+//              'md5', $key[0].':'.$comm['image_id'], $conf['secret_key']
+//            ) != $key[1]
+//      )
+//  {
+//    $comment_action='reject';
+//  }
+
+  if ($comment_action!='reject' and $conf['anti-flood_time']>0 )
+  { // anti-flood system
+    $reference_date = time() - $conf['anti-flood_time'];
+    $query = '
+SELECT id FROM '.COMMENTS_TABLE.'
+  WHERE date > FROM_UNIXTIME('.$reference_date.')
+    AND author = "'.addslashes($comm['author']).'"';
+    if ( mysql_num_rows( pwg_query( $query ) ) > 0 )
+    {
+      array_push( $infos, l10n('comment_anti-flood') );
+      $comment_action='reject';
+    }
+  }
+
+  // perform more spam check
+  $comment_action = trigger_event('user_comment_check',
+      $comment_action, $comm
+    );
+
+  if ( $comment_action!='reject' )
+  {
+
+    $query = 'UPDATE '.COMMENTS_TABLE;
+    $query.= ' SET author="'.addslashes($comm['author']).'"';
+    $query.= '    ,content="'.addslashes($comm['content']).'"';
+    if ('moderate' == $comment_action) {
+        $query.=',validated="false"';
+        $query.=', validation_date=NULL';
+    }
+    $query.=' WHERE (id='.$comm['comment_id'].' AND image_id='.$comm['image_id'].')';
+    pwg_query($query);
+
+    if
+      (
+        ($comment_action=='validate' and $conf['email_admin_on_comment'])
+        or
+        ($comment_action!='validate' and $conf['email_admin_on_comment_validation'])
+      )
+    {
+      include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php');
+
+      $del_url =
+          get_absolute_root_url().'comments.php?delete='.$comm['comment_id'];
+
+      $keyargs_content = array
+      (
+        get_l10n_args('Author: %s', $comm['author']),
+        get_l10n_args('Comment: %s', $comm['content']),
+        get_l10n_args('', ''),
+        get_l10n_args('Delete: %s', $del_url)
+      );
+
+      if ($comment_action!='validate')
+      {
+        $keyargs_content[] =
+          get_l10n_args('', '');
+        $keyargs_content[] =
+          get_l10n_args('Validate: %s',
+            get_absolute_root_url().'comments.php?validate='.$comm['comment_id']);
+      }
+
+      pwg_mail_notification_admins
+      (
+        get_l10n_args('Comment by %s', $comm['author']),
+        $keyargs_content
+      );
+    }
+  }
+  return $comment_action;
+}
+
+} // function_exists
+
+?>
Index: /extensions/CommentEditor/branches/2.0/include/index.css
===================================================================
--- /extensions/CommentEditor/branches/2.0/include/index.css	(revision 3556)
+++ /extensions/CommentEditor/branches/2.0/include/index.css	(revision 3556)
@@ -0,0 +1,27 @@
+/* Comment edition */
+div#ce-comments {
+	padding-top: 5px;
+	padding-bottom: 5px;
+}
+/* Message display */
+div.ce-message-img, div.ce-message-list {
+  float: left;
+	overflow: auto;
+}
+div.ce-message-img {
+	padding-left: 10px;
+	padding-top: 5px;
+	padding-bottom: 5px;
+}
+ul.ce-message-list {
+  list-style: none;
+}
+div#ce-message-block {
+  overflow: auto;
+}
+div.ce-message-error, div.ce-message-info {
+  font-weight: bold;
+}
+div.ce-message-error {
+	color: #ff0000;
+}
Index: /extensions/CommentEditor/branches/2.0/include/index.php
===================================================================
--- /extensions/CommentEditor/branches/2.0/include/index.php	(revision 3556)
+++ /extensions/CommentEditor/branches/2.0/include/index.php	(revision 3556)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id: index.php,v 1.1 2009/06/15 21:42:10 cmarchad Exp $
+// | last update   : $Date: 2009/06/15 21:42:10 $
+// | last modifier : $Author: cmarchad $
+// | revision      : $Revision: 1.1 $
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/CommentEditor/branches/2.0/include/picture.css
===================================================================
--- /extensions/CommentEditor/branches/2.0/include/picture.css	(revision 3556)
+++ /extensions/CommentEditor/branches/2.0/include/picture.css	(revision 3556)
@@ -0,0 +1,31 @@
+/* Comment edition */
+div#ce-comments {
+	padding-top: 5px;
+	padding-bottom: 5px;
+}
+div#ce-content {
+  margin: 0;
+}
+/* Message display */
+div.ce-message-img, div.ce-message-list {
+  float: left;
+	overflow: auto;
+}
+div.ce-message-img {
+	padding-left: 10px;
+	padding-top: 5px;
+	padding-bottom: 5px;
+}
+ul.ce-message-list {
+  list-style: none;
+}
+div#ce-message-block {
+  overflow: auto;
+  margin: 0;
+}
+div.ce-message-error, div.ce-message-info {
+  font-weight: bold;
+}
+div.ce-message-error {
+	color: #ff0000;
+}
Index: /extensions/CommentEditor/branches/2.0/index.php
===================================================================
--- /extensions/CommentEditor/branches/2.0/index.php	(revision 3556)
+++ /extensions/CommentEditor/branches/2.0/index.php	(revision 3556)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id: index.php,v 1.1 2009/06/15 21:42:11 cmarchad Exp $
+// | last update   : $Date: 2009/06/15 21:42:11 $
+// | last modifier : $Author: cmarchad $
+// | revision      : $Revision: 1.1 $
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/CommentEditor/branches/2.0/language/en_UK/index.php
===================================================================
--- /extensions/CommentEditor/branches/2.0/language/en_UK/index.php	(revision 3556)
+++ /extensions/CommentEditor/branches/2.0/language/en_UK/index.php	(revision 3556)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id: index.php,v 1.1 2009/06/15 21:42:11 cmarchad Exp $
+// | last update   : $Date: 2009/06/15 21:42:11 $
+// | last modifier : $Author: cmarchad $
+// | revision      : $Revision: 1.1 $
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/CommentEditor/branches/2.0/language/en_UK/plugin.lang.php
===================================================================
--- /extensions/CommentEditor/branches/2.0/language/en_UK/plugin.lang.php	(revision 3556)
+++ /extensions/CommentEditor/branches/2.0/language/en_UK/plugin.lang.php	(revision 3556)
@@ -0,0 +1,42 @@
+<?php
+/* $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;
+
+// ==================================================================
+// Edit block
+$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_'.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';
+
+// ==================================================================
+// Config
+$lang['ce_inconsistent_version'] = '%s: inconsistent version numbers';
+$lang['ce_no_unlink'] = 'Function \'unlink\' not available...';
+$lang['ce_unlink_errors'] = 'Error occured during file deletion';
+$lang['ce_config_saved'] = 'Configuration successfully saved';
+$lang['ce_config_saved_with_errors'] = 'Configuration saved with errors';
+$lang['ce_button_submit'] = 'Submit';
+
+// ==================================================================
+// Config tab
+$lang['ce_tab_config'] = 'Configuration';
+$lang['ce_config_desc'] = 'Plugin main configuration';
+$lang['ce_label_config'] = 'General configuration';
+$lang['ce_label_display_info'] = 'Display informative messages';
+$lang['ce_label_display_error'] = 'Display error messages';
+
+?>
Index: /extensions/CommentEditor/branches/2.0/language/fr_FR/index.php
===================================================================
--- /extensions/CommentEditor/branches/2.0/language/fr_FR/index.php	(revision 3556)
+++ /extensions/CommentEditor/branches/2.0/language/fr_FR/index.php	(revision 3556)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id: index.php,v 1.1 2009/06/15 21:42:12 cmarchad Exp $
+// | last update   : $Date: 2009/06/15 21:42:12 $
+// | last modifier : $Author: cmarchad $
+// | revision      : $Revision: 1.1 $
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/CommentEditor/branches/2.0/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/CommentEditor/branches/2.0/language/fr_FR/plugin.lang.php	(revision 3556)
+++ /extensions/CommentEditor/branches/2.0/language/fr_FR/plugin.lang.php	(revision 3556)
@@ -0,0 +1,41 @@
+<?php
+/* $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;
+
+// ==================================================================
+// Edit block
+$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_'.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';
+
+// ==================================================================
+// Config
+$lang['ce_inconsistent_version'] = '%s : numéros de version incohérentes';
+$lang['ce_no_unlink'] = 'La fonction \'unlink\' n\'est pas disponible';
+$lang['ce_unlink_errors'] = 'Des erreurs ont eu lieu lors de la suppression de fichiers';
+$lang['ce_config_saved'] = 'Configuration sauvée avec succès';
+$lang['ce_config_saved_with_errors'] = 'Configuration sauvée mais avec des erreurs';
+$lang['ce_button_submit'] = 'Valider';
+
+// ==================================================================
+// Config tab
+$lang['ce_tab_config'] = 'Configuration';
+$lang['ce_config_desc'] = 'Configuration principale du plugin';
+$lang['ce_label_config'] = 'Configuration générale';
+$lang['ce_label_display_info'] = 'Afficher les messages informatifs';
+$lang['ce_label_display_error'] = 'Afficher les messages d\'erreurs';
+?>
Index: /extensions/CommentEditor/branches/2.0/language/index.php
===================================================================
--- /extensions/CommentEditor/branches/2.0/language/index.php	(revision 3556)
+++ /extensions/CommentEditor/branches/2.0/language/index.php	(revision 3556)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id: index.php,v 1.1 2009/06/15 21:42:11 cmarchad Exp $
+// | last update   : $Date: 2009/06/15 21:42:11 $
+// | last modifier : $Author: cmarchad $
+// | revision      : $Revision: 1.1 $
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/CommentEditor/branches/2.0/language/it_IT/index.php
===================================================================
--- /extensions/CommentEditor/branches/2.0/language/it_IT/index.php	(revision 3556)
+++ /extensions/CommentEditor/branches/2.0/language/it_IT/index.php	(revision 3556)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id: index.php,v 1.1 2009/06/29 11:51:59 Criss Exp $
+// | last update   : $Date: 2009/06/29 11:51:59 $
+// | last modifier : $Author: Criss $
+// | revision      : $Revision: 1.1 $
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/CommentEditor/branches/2.0/language/it_IT/plugin.lang.php
===================================================================
--- /extensions/CommentEditor/branches/2.0/language/it_IT/plugin.lang.php	(revision 3556)
+++ /extensions/CommentEditor/branches/2.0/language/it_IT/plugin.lang.php	(revision 3556)
@@ -0,0 +1,42 @@
+<?php
+/* $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;
+
+// ==================================================================
+// Edit block
+$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'] = 'Editare';
+$lang['ce_close_editor_title'] = 'Chiudere il blocco d\'edizione';
+$lang['ce_close_editor_alt'] = 'Chiudere';
+
+
+// ==================================================================
+// Message block
+$lang['ce_'.CE_TYPE_INFO] = 'Informazione';
+$lang['ce_'.CE_TYPE_ERROR] = 'Errore';
+$lang['ce_edit_forbidden'] = 'Non siete autorizati a modificare questo commento';
+$lang['ce_access_invalid'] = 'Accesso invalido';
+$lang['ce_close_message_title'] = 'Chiudere il blocco messaggi';
+$lang['ce_close_message_alt'] = 'Chiudere';
+
+// ==================================================================
+// Config
+$lang['ce_inconsistent_version'] = '%s : versioni incoerenti';
+$lang['ce_no_unlink'] = 'La funzione \'unlink\' non è disponibile';
+$lang['ce_unlink_errors'] = 'Errori durante la sopressione dei file';
+$lang['ce_config_saved'] = 'Configurazione salvata con successo';
+$lang['ce_config_saved_with_errors'] = 'Configurazione salvata con errori';
+$lang['ce_button_submit'] = 'Confermare';
+
+// ==================================================================
+// Config tab
+$lang['ce_tab_config'] = 'Configurazione';
+$lang['ce_config_desc'] = 'Configurazione principale del plugin';
+$lang['ce_label_config'] = 'Configurazione generale';
+$lang['ce_label_display_info'] = 'Visualizzare i messaggi informativi';
+$lang['ce_label_display_error'] = 'Visualizzare i messaggi d\'errore';
+?>
Index: /extensions/CommentEditor/branches/2.0/main.inc.php
===================================================================
--- /extensions/CommentEditor/branches/2.0/main.inc.php	(revision 3556)
+++ /extensions/CommentEditor/branches/2.0/main.inc.php	(revision 3556)
@@ -0,0 +1,96 @@
+<?php
+/* $Id: main.inc.php,v 1.22 2009/07/01 20:01:37 Criss Exp $ */
+/*
+ Plugin Name: Comment Editor
+ Version: 1.0.o
+ Description: Allow to edit comment
+ Plugin URI: http://piwigo.org/ext/extension_view.php?eid=296
+ Author: Criss
+ Author URI: http://piwigo.org/
+*/
+
+/** History **
+
+  2009-06-30 1.0.o
+                    Langue IT
+
+  2009-06-30 1.0.n
+                    Fix another bug on plugin update...
+
+  2009-06-30 1.0.m
+                    Fix another bug on plugin update...
+
+  2009-06-30 1.0.l
+                    Fix bug on plugin update
+
+  2009-06-30 1.0.k
+                    Add toolbar trigger for edit template
+
+  2009-06-29 1.0.j
+                    Add obsolete files management
+                    Add italian language (thanks to Rio)
+
+  2009-06-26 1.0.i
+                    Fix bug on administration page (text)
+
+  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
+
+  2009-06-22 1.0.g
+                    Deactivate anti-flood on update
+                    Adviser can edit only its comments
+                    Language file converted in UTF-8
+                    Add home link in edit and message block title bar
+
+  2009-06-22 1.0.f
+                    Add edit link for author even if he's not an admin
+                    Code cleanup
+
+  2009-06-18 1.0.e
+                    Check existence of function update_user_comment()
+
+  2009-06-18 1.0.d
+                    Improve sanity checking
+
+  2009-06-18 1.0.c
+                    Add maintain.inc.php file
+                    Fix bug in CE_Comment::validateAuthor()
+
+  2009-06-18 1.0.b
+                    Fix plugin URI to be available in plugin update check page.
+                    Reduce code line size.
+
+*/
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+
+define('CE_PATH',     PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/');
+define('CE_ROOT',     dirname(__FILE__).'/');
+include_once(CE_PATH . 'include/ce_common.inc.php');
+
+$ce_config = new CE_Config($ce_config_default);
+$ce_plugin = new CE_Plugin($plugin['id'], $ce_config);
+
+add_event_handler('get_admin_plugin_menu_links',
+                  array(&$ce_plugin, 'get_admin_plugin_menu_links'));
+add_event_handler('render_comment_content',
+                  array(&$ce_plugin, 'render_comment_content'));
+add_event_handler('loc_begin_page_header',
+                  array(&$ce_plugin, 'loc_begin_page_header'));
+switch (script_basename()) {
+  case 'index':
+    add_event_handler('loc_begin_index',
+                      array(&$ce_plugin, 'loc_begin_index'), 1);
+    break;
+  case 'picture':
+    add_event_handler('loc_begin_picture',
+                      array(&$ce_plugin, 'loc_begin_picture'), 1);
+    break;
+  default:
+}
+set_plugin_data($plugin['id'], $ce_plugin);
+
+?>
Index: /extensions/CommentEditor/branches/2.0/maintain.inc.php
===================================================================
--- /extensions/CommentEditor/branches/2.0/maintain.inc.php	(revision 3556)
+++ /extensions/CommentEditor/branches/2.0/maintain.inc.php	(revision 3556)
@@ -0,0 +1,45 @@
+<?php
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+if (!defined('IN_ADMIN') or !IN_ADMIN) die('Hacking attempt!');
+
+if (!defined('CE_PATH')) {
+  define('CE_PATH',     PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/');
+}
+if (!defined('CE_ROOT')) {
+  define('CE_ROOT',     dirname(__FILE__).'/');
+}
+
+function plugin_install($plugin_id, $version, &$errors) {
+  include_once(CE_PATH . 'include/ce_common.inc.php');
+  // Include language advices
+  load_language('plugin.lang', CE_PATH);
+  if ($version != CE_VERSION) {
+    array_push($errors, sprintf(l10n('ce_inconsistent_version'), $plugin_id));
+    return;
+  }
+  update_config($plugin_id, CE_CFG_DB_FACTORY);
+}
+
+function plugin_activate($plugin_id, $version, &$errors) {
+  update_config($plugin_id);
+}
+
+function plugin_deactivate($plugin_id) {
+  // Nothing special
+}
+
+function plugin_uninstall($plugin_id) {
+  include_once(CE_PATH . 'include/ce_common.inc.php');
+  $uninstall = CE_Config::uninstall($plugin_id);
+}
+
+function update_config($plugin_id, $db_comment=null) {
+  include_once(CE_PATH . 'include/ce_common.inc.php');
+  $clean = ce_clean_obsolete_files(CE_OBSOLETE);
+  $ce_config_default[CE_CFG_VERSION] = CE_VERSION;
+  if (null != $db_comment) {
+    $ce_config_default[CE_CFG_COMMENT] = $db_comment;
+  }
+  $install = CE_Config::install($plugin_id, $ce_config_default);
+}
+?>
Index: /extensions/CommentEditor/branches/2.0/obsolete.list
===================================================================
--- /extensions/CommentEditor/branches/2.0/obsolete.list	(revision 3556)
+++ /extensions/CommentEditor/branches/2.0/obsolete.list	(revision 3556)
@@ -0,0 +1,1 @@
+include/edit.css
Index: /extensions/CommentEditor/branches/2.0/template/edit.tpl
===================================================================
--- /extensions/CommentEditor/branches/2.0/template/edit.tpl	(revision 3556)
+++ /extensions/CommentEditor/branches/2.0/template/edit.tpl	(revision 3556)
@@ -0,0 +1,63 @@
+{* $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}
+  var lCheckBox = document.getElementById(aToggle);
+  var lList1 = document.getElementById(aList1);
+  var lList2 = document.getElementById(aList2);
+  lList1.disabled = lCheckBox.checked;
+  lList2.disabled = !lCheckBox.checked;
+}
+</script>
+{/if}        
+<div id="ce-content" class="content">
+  <div class="titrePage">
+    <ul class="categoryActions">
+      <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>{'ce_edit'|@translate}</h2>
+  </div>
+  <div id="ce-comments">
+    <form  method="post" action="{$comment_editor.F_ACTION}" class="filter" id="editComment">
+    <table>
+    <tr>
+      <td>{'ce_author'|@translate}</td>
+      {if isset($comment_editor.USERS)}
+      <td>
+        {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_editor.FREEAUTHOR}> {'ce_author_free'|@translate}
+      </td>
+      <td align="right">
+        <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>&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_editor.CONTENT}</textarea>
+      </td>
+    </tr>
+    <tr>
+      <td colspan="4" align="center">
+        <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>
+    </tr>
+    </table>
+    </form>
+  </div>
+</div>
Index: /extensions/CommentEditor/branches/2.0/template/index.php
===================================================================
--- /extensions/CommentEditor/branches/2.0/template/index.php	(revision 3556)
+++ /extensions/CommentEditor/branches/2.0/template/index.php	(revision 3556)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id: index.php,v 1.1 2009/06/15 21:42:10 cmarchad Exp $
+// | last update   : $Date: 2009/06/15 21:42:10 $
+// | last modifier : $Author: cmarchad $
+// | revision      : $Revision: 1.1 $
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/CommentEditor/branches/2.0/template/message.tpl
===================================================================
--- /extensions/CommentEditor/branches/2.0/template/message.tpl	(revision 3556)
+++ /extensions/CommentEditor/branches/2.0/template/message.tpl	(revision 3556)
@@ -0,0 +1,21 @@
+{* $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="{$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} - {$ce_message.TITLE}</h2>
+  </div>
+  <div class="ce-message-{$ce_message.TYPE}">
+    <div class="ce-message-img">
+      <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=$ce_message.MSG item=msg}
+        <li>{$msg}</li>
+        {/foreach}
+      </ul>
+    </div>
+  </div>
+</div>
