Index: extensions/Comments_on_Albums/changelog.txt
===================================================================
--- extensions/Comments_on_Albums/changelog.txt	(revision 9624)
+++ extensions/Comments_on_Albums/changelog.txt	(revision 9634)
@@ -1,4 +1,7 @@
-0.1.a
+0.2
+- Test version
 - bug corrected on coa_admin_comments.php
+- public listing is available
+- table is created in utf8
 
 0.1
Index: extensions/Comments_on_Albums/include/coa_admin_comments.php
===================================================================
--- extensions/Comments_on_Albums/include/coa_admin_comments.php	(revision 9624)
+++ extensions/Comments_on_Albums/include/coa_admin_comments.php	(revision 9634)
@@ -127,5 +127,5 @@
 
 	// template
-	$template->set_filename('comments', dirname(__FILE__) .'/../template/coa_admin.tpl');
+	$template->set_filename('comments', dirname(__FILE__) .'/../template/coa_admin_comments.tpl');
 	$template->assign(array(
 		'F_ACTION' => get_root_url().'admin.php?page=comments&amp;section=albums',
Index: extensions/Comments_on_Albums/include/coa_admin_intro.php
===================================================================
--- extensions/Comments_on_Albums/include/coa_admin_intro.php	(revision 9624)
+++ extensions/Comments_on_Albums/include/coa_admin_intro.php	(revision 9634)
@@ -10,5 +10,5 @@
 list($nb_comments) = pwg_db_fetch_row(pwg_query($query));
 
-$template->assign('NB_COMMENTS', l10n_dec('%d comment', '%d comments', $nb_comments) .' ('. l10n('Albums') .')');
+$template->assign('DB_COMMENTS_ALBUMS', l10n_dec('%d comment', '%d comments', $nb_comments));
 
 // unvalidated comments
@@ -28,5 +28,5 @@
 
 // template
-$template->set_filename('comments_on_albums', dirname(__FILE__) .'/../template/coa_intro.tpl');
+$template->set_filename('comments_on_albums', dirname(__FILE__) .'/../template/coa_admin_intro.tpl');
 $template->concat('ADMIN_CONTENT', $template->parse('comments_on_albums', true));
 
Index: extensions/Comments_on_Albums/include/coa_albums.php
===================================================================
--- extensions/Comments_on_Albums/include/coa_albums.php	(revision 9624)
+++ extensions/Comments_on_Albums/include/coa_albums.php	(revision 9634)
@@ -27,9 +27,9 @@
 			include_once(COA_PATH.'include/functions_comment.inc.php'); // custom fonctions
 			check_input_parameter('comment_to_edit', $_GET, false, PATTERN_ID);
-			$author_id = get_comment_author_id($_GET['comment_to_edit']);
+			$author_id = get_comment_author_id_albums($_GET['comment_to_edit']);
 
 			if (can_manage_comment('edit', $author_id)) {
 				if (!empty($_POST['content'])) {
-					update_user_comment(array(
+					update_user_comment_albums(array(
 						'comment_id' => $_GET['comment_to_edit'],
 						'image_id' => $category['id'],
@@ -49,8 +49,8 @@
 			include_once(COA_PATH.'include/functions_comment.inc.php');
 			check_input_parameter('comment_to_delete', $_GET, false, PATTERN_ID);
-			$author_id = get_comment_author_id($_GET['comment_to_delete']);
+			$author_id = get_comment_author_id_albums($_GET['comment_to_delete']);
 
 			if (can_manage_comment('delete', $author_id)) {
-				delete_user_comment($_GET['comment_to_delete']);
+				delete_user_comment_albums($_GET['comment_to_delete']);
 			}
 
@@ -62,8 +62,8 @@
 			include_once(COA_PATH.'include/functions_comment.inc.php');
 			check_input_parameter('comment_to_validate', $_GET, false, PATTERN_ID);
-			$author_id = get_comment_author_id($_GET['comment_to_validate']);
+			$author_id = get_comment_author_id_albums($_GET['comment_to_validate']);
 
 			if (can_manage_comment('validate', $author_id)) {
-				validate_user_comment($_GET['comment_to_validate']);
+				validate_user_comment_albums($_GET['comment_to_validate']);
 			}
 
@@ -124,5 +124,5 @@
 	}
 
-	// number of comments for this picture
+	// number of comments for this category
 	$query = 'SELECT COUNT(*) AS nb_comments
 		FROM '.COA_TABLE.'
Index: extensions/Comments_on_Albums/include/coa_comments_page.php
===================================================================
--- extensions/Comments_on_Albums/include/coa_comments_page.php	(revision 9634)
+++ extensions/Comments_on_Albums/include/coa_comments_page.php	(revision 9634)
@@ -0,0 +1,255 @@
+<?php 
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+
+$template->assign(array(
+	'COA_PATH' => COA_PATH,
+	'ICON_COLOR' => 'ff3363',
+	'ICON_COLOR_OVER' => 'ff7700',
+));
+
+// ajout d'un bouton sur la page principale
+if (!isset($_GET['display_mode'])) {	
+	
+	$template->set_prefilter('comments', 'coa_add_button');
+
+	function coa_add_button($content, &$smarty) {
+		$search = '#<ul class="categoryActions">#';
+
+		$replacement = '
+		{html_head}
+			<style type="text/css">
+				.pwg-icon-comments-albums {ldelim}
+					background-image: url({$COA_PATH}template/s26/outline_{$ICON_COLOR}.png);
+					background-position: -26px 0;
+				}
+				a:hover .pwg-icon-comments-albums {ldelim}
+					background-image: url({$COA_PATH}template/s26/outline_{$ICON_COLOR_OVER}.png);
+					background-position: -26px 0;
+				}
+			</style>
+		{/html_head}
+
+		<ul class="categoryActions">
+			<li><a href="comments.php?display_mode=albums" title="Commentaires albums" class="pwg-state-default pwg-button">
+				<span class="pwg-icon pwg-icon-comments-albums">&nbsp;</span><span class="pwg-button-text">Commentaires albums</span>
+			</a></li>';
+
+		return preg_replace($search, $replacement, $content);
+	}
+	
+// page modifiée pour les commentaires albums
+} else if ($_GET['display_mode'] == 'albums') {
+	$template->clear_assign(array('comments', 'navbar', 'sort_by_options'));
+	
+// sort_by : database fields proposed for sorting comments list
+$sort_by = array(
+	'date' => l10n('comment date'),
+	'category_id' => l10n('album')
+);
+$template->assign('sort_by_options', $sort_by);
+
+// +-----------------------------------------------------------------------+
+// |                         comments management                           |
+// +-----------------------------------------------------------------------+
+
+$comment_id = null;
+$action = null;
+
+$actions = array('delete_albums', 'validate_albums', 'edit_albums');
+foreach ($actions as $loop_action) {
+	if (isset($_GET[$loop_action])) {
+		$action = $loop_action;
+		check_input_parameter($action, $_GET, false, PATTERN_ID);
+		$comment_id = $_GET[$action];
+		break;
+	}
+}
+
+if (isset($action)) {
+	include_once(COA_PATH.'include/functions_comment.inc.php');
+	check_pwg_token();
+	$comment_author_id = get_comment_author_id_albums($comment_id);
+	$true_action = str_replace('_albums', null, $action);
+
+	if (can_manage_comment($true_action, $comment_author_id)) {
+		$perform_redirect = false;
+
+		if ('delete_albums' == $action) {
+			delete_user_comment_albums($comment_id);
+			$perform_redirect = true;
+		}
+
+		if ('validate_albums' == $action) {
+			validate_user_comment_albums($comment_id);
+			$perform_redirect = true;
+		}
+
+		if ('edit_albums' == $action) {
+			if (!empty($_POST['content'])) {
+				update_user_comment_albums(array(
+					'comment_id' => $_GET['edit_albums'],
+					'image_id' => $_POST['image_id'],
+					'content' => $_POST['content']
+					), $_POST['key']
+				);
+				$perform_redirect = true;
+			} else {
+				$edit_comment = $_GET['edit_albums'];
+			}
+		}
+
+		if ($perform_redirect) {
+			$redirect_url = PHPWG_ROOT_PATH.'comments.php'.get_query_string_diff(array('delete_albums','validate_albums','edit_albums','pwg_token'));
+			redirect($redirect_url);
+		}
+	}
+}
+
+// +-----------------------------------------------------------------------+
+// |                            navigation bar                             |
+// +-----------------------------------------------------------------------+
+
+if (isset($_GET['start']) and is_numeric($_GET['start'])) {
+	$start = $_GET['start'];
+} else {
+	$start = 0;
+}
+
+$query = 'SELECT COUNT(DISTINCT(com.id))
+	FROM '.COA_TABLE.' AS com
+	LEFT JOIN '.USERS_TABLE.' As u
+	ON u.'.$conf['user_fields']['id'].' = com.author_id
+	WHERE '.implode('
+	AND ', $page['where_clauses']).'
+;';
+
+list($counter) = pwg_db_fetch_row(pwg_query($query));
+
+$url = PHPWG_ROOT_PATH . 'comments.php' . get_query_string_diff(array('start','delete','validate','pwg_token'));
+$navbar = create_navigation_bar($url, $counter, $start, $page['items_number'], '');
+$template->assign('navbar', $navbar);
+
+// +-----------------------------------------------------------------------+
+// |                        last comments display                          |
+// +-----------------------------------------------------------------------+
+
+$comments = array();
+$element_ids = array();
+$category_ids = array();
+
+$query = 'SELECT
+		com.id AS comment_id,
+		com.category_id,
+		com.author,
+		com.author_id,
+		com.date,
+		com.content,
+		com.validated
+	FROM '.COA_TABLE.' AS com
+	LEFT JOIN '.USERS_TABLE.' As u
+	ON u.'.$conf['user_fields']['id'].' = com.author_id
+	WHERE '.implode('
+	AND ', $page['where_clauses']).'
+	GROUP BY
+		comment_id,
+		com.category_id,
+		com.author,
+		com.author_id,
+		com.date,
+		com.content,
+		com.validated
+	ORDER BY '.$page['sort_by'].' '.$page['sort_order'];
+	if ('all' != $page['items_number']) {
+		$query.= '
+		LIMIT '.$page['items_number'].' OFFSET '.$start;
+	}
+	$query.= '
+;';
+$result = pwg_query($query);
+
+while ($row = pwg_db_fetch_assoc($result)) {
+	array_push($comments, $row);
+	array_push($element_ids, $row['category_id']);
+}
+
+if (count($comments) > 0) {
+	// retrieving category informations
+	$query = 'SELECT 
+			cat.id, 
+			cat.name, 
+			cat.permalink, 
+			cat.uppercats, 
+			com.id as comment_id
+		FROM '.CATEGORIES_TABLE.' AS cat
+		LEFT JOIN '.COA_TABLE.' AS com
+		ON cat.id=com.category_id
+		'.get_sql_condition_FandF(array(
+			'forbidden_categories' => 'cat.id',
+			'visible_categories' => 'cat.id'
+		), 'WHERE').'
+		AND cat.id IN ('.implode(',', $element_ids).')
+	;';
+	$categories = hash_from_query($query, 'comment_id');
+
+	foreach ($comments as $comment) {
+		$name = $categories[$comment['comment_id']]['name'];
+
+		$url = duplicate_index_url(array(
+			'category' => array(
+				'id' => $categories[$comment['comment_id']]['id'], 
+				'name' => $categories[$comment['comment_id']]['name'], 
+				'permalink' => $categories[$comment['comment_id']]['permalink'],
+			),array('start')
+		));
+
+		$tpl_comment = array(
+			'U_PICTURE' => $url,
+			'TN_SRC' => $url,
+			'ALT' => $name,
+			'AUTHOR' => trigger_event('render_comment_author', $comment['author']),
+			'DATE' => format_date($comment['date'], true),
+			'CONTENT' => trigger_event('render_comment_content',$comment['content']),
+		);
+
+		if (can_manage_comment('delete', $comment['author_id'])) {
+			$url = get_root_url().'comments.php'.get_query_string_diff(array('delete','validate','edit', 'pwg_token'));
+
+			$tpl_comment['U_DELETE'] = add_url_params($url, array(
+				'delete_albums' => $comment['comment_id'],
+				'pwg_token' => get_pwg_token(),
+			));
+		}
+		if (can_manage_comment('edit', $comment['author_id'])) {
+			$url = get_root_url().'comments.php'.get_query_string_diff(array('edit', 'delete','validate', 'pwg_token'));
+
+			$tpl_comment['U_EDIT'] = add_url_params($url, array(
+				'edit_albums' => $comment['comment_id'],
+				'pwg_token' => get_pwg_token(),
+			));
+
+			if (isset($edit_comment) and ($comment['comment_id'] == $edit_comment)) {
+				$key = get_ephemeral_key(2, $comment['category_id']);
+				$tpl_comment['IN_EDIT'] = true;
+				$tpl_comment['KEY'] = $key;
+				$tpl_comment['IMAGE_ID'] = $comment['category_id'];
+				$tpl_comment['CONTENT'] = $comment['content'];
+			}
+		}
+		if (can_manage_comment('validate', $comment['author_id'])) {
+			if ('true' != $comment['validated']) {
+				$tpl_comment['U_VALIDATE'] = add_url_params($url, array(
+					'validate_albums'=> $comment['comment_id'],
+					'pwg_token' => get_pwg_token(),
+				));
+			}
+		}
+		
+		$template->append('comments', $tpl_comment);
+	}
+}
+
+	
+	$template->set_filenames(array('comments'=> dirname(__FILE__).'/../template/coa_comments_page.tpl'));
+}
+
+?>
Index: extensions/Comments_on_Albums/include/functions_comment.inc.php
===================================================================
--- extensions/Comments_on_Albums/include/functions_comment.inc.php	(revision 9624)
+++ extensions/Comments_on_Albums/include/functions_comment.inc.php	(revision 9634)
@@ -3,32 +3,34 @@
 
 //returns string action to perform on a new comment: validate, moderate, reject
-function user_comment_check($action, $comment)
-{
-  global $conf,$user;
-
-  if ($action=='reject')
-    return $action;
-
-  $my_action = $conf['comment_spam_reject'] ? 'reject':'moderate';
-
-  if ($action==$my_action)
-    return $action;
-
-  // we do here only BASIC spam check (plugins can do more)
-  if ( !is_a_guest() )
-    return $action;
-
-  $link_count = preg_match_all( '/https?:\/\//',
-    $comment['content'], $matches);
-
-  if ( strpos($comment['author'], 'http://')!==false )
-  {
-    $link_count++;
-  }
-
-  if ( $link_count>$conf['comment_spam_max_links'] )
-    return $my_action;
-
-  return $action;
+if (!function_exists('user_comment_check')) {
+	function user_comment_check($action, $comment)
+	{
+	  global $conf,$user;
+
+	  if ($action=='reject')
+		return $action;
+
+	  $my_action = $conf['comment_spam_reject'] ? 'reject':'moderate';
+
+	  if ($action==$my_action)
+		return $action;
+
+	  // we do here only BASIC spam check (plugins can do more)
+	  if ( !is_a_guest() )
+		return $action;
+
+	  $link_count = preg_match_all( '/https?:\/\//',
+		$comment['content'], $matches);
+
+	  if ( strpos($comment['author'], 'http://')!==false )
+	  {
+		$link_count++;
+	  }
+
+	  if ( $link_count>$conf['comment_spam_max_links'] )
+		return $my_action;
+
+	  return $action;
+	}
 }
 
@@ -44,5 +46,5 @@
  * @param array infos out array of messages
  */
-function insert_user_comment( &$comm, $key, &$infos )
+function insert_user_comment_albums( &$comm, $key, &$infos )
 {
   global $conf, $user;
@@ -185,5 +187,5 @@
  * @param comment_id
  */
-function delete_user_comment($comment_id) {
+function delete_user_comment_albums($comment_id) {
   $user_where_clause = '';
   if (!is_admin())
@@ -216,5 +218,5 @@
  */
 
-function update_user_comment($comment, $post_key)
+function update_user_comment_albums($comment, $post_key)
 {
   global $conf;
@@ -259,38 +261,40 @@
 }
 
-function email_admin($action, $comment)
-{
-  global $conf;
-
-  if (!in_array($action, array('edit', 'delete'))
-      or (($action=='edit') and !$conf['email_admin_on_comment_edition'])
-      or (($action=='delete') and !$conf['email_admin_on_comment_deletion']))
-  {
-    return;
-  }
-
-  include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php');
-
-  $keyargs_content = array();
-  $keyargs_content[] = get_l10n_args('Author: %s', $comment['author']);
-  if ($action=='delete')
-  {
-    $keyargs_content[] = get_l10n_args('This author removed the comment with id %d',
-				       $comment['comment_id']
-				       );
-  }
-  else
-  {
-    $keyargs_content[] = get_l10n_args('This author modified following comment:', '');
-    $keyargs_content[] = get_l10n_args('Comment: %s', $comment['content']);
-  }
-
-  pwg_mail_notification_admins(get_l10n_args('Comment by %s',
-					     $comment['author']),
-			       $keyargs_content
-			       );
-}
-
-function get_comment_author_id($comment_id, $die_on_error=true)
+if (!function_exists('email_admin')) {
+	function email_admin($action, $comment)
+	{
+	  global $conf;
+
+	  if (!in_array($action, array('edit', 'delete'))
+		  or (($action=='edit') and !$conf['email_admin_on_comment_edition'])
+		  or (($action=='delete') and !$conf['email_admin_on_comment_deletion']))
+	  {
+		return;
+	  }
+
+	  include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php');
+
+	  $keyargs_content = array();
+	  $keyargs_content[] = get_l10n_args('Author: %s', $comment['author']);
+	  if ($action=='delete')
+	  {
+		$keyargs_content[] = get_l10n_args('This author removed the comment with id %d',
+						   $comment['comment_id']
+						   );
+	  }
+	  else
+	  {
+		$keyargs_content[] = get_l10n_args('This author modified following comment:', '');
+		$keyargs_content[] = get_l10n_args('Comment: %s', $comment['content']);
+	  }
+
+	  pwg_mail_notification_admins(get_l10n_args('Comment by %s',
+							 $comment['author']),
+					   $keyargs_content
+					   );
+	}
+}
+
+function get_comment_author_id_albums($comment_id, $die_on_error=true)
 {
   $query = '
@@ -318,5 +322,5 @@
 }
 
-function validate_user_comment($comment_id)
+function validate_user_comment_albums($comment_id)
 {
   $query = '
Index: extensions/Comments_on_Albums/main.inc.php
===================================================================
--- extensions/Comments_on_Albums/main.inc.php	(revision 9624)
+++ extensions/Comments_on_Albums/main.inc.php	(revision 9634)
@@ -2,5 +2,5 @@
 /*
 Plugin Name: Comment on Albums
-Version: 0.1.a
+Version: 0.2
 Description: Allows users to comment albums
 Plugin URI: http://piwigo.org/ext/extension_view.php?eid=512
@@ -17,5 +17,5 @@
 // +-----------------------------------------------------------------------+
 define('COA_NAME' , 'Comment on Albums');
-define('COA_VERSION', '0.1.a');
+define('COA_VERSION', '0.2');
 define('COA_DIR' , basename(dirname(__FILE__)));
 define('COA_PATH' , PHPWG_PLUGINS_PATH . COA_DIR . '/');
@@ -27,9 +27,10 @@
 // +-----------------------------------------------------------------------+
 add_event_handler('loc_end_index', 'COA_index');
+add_event_handler('loc_after_page_header', 'COA_comments_page');
 add_event_handler('loc_end_admin', 'COA_admin');
 
 
 // +-----------------------------------------------------------------------+
-//					Fonctions
+//					Functions
 // +-----------------------------------------------------------------------+
 
@@ -39,4 +40,12 @@
 	if ($page['section'] == 'categories' AND isset($page['category'])) {	
 		include(COA_PATH . 'include/coa_albums.php');
+	}
+}
+
+function COA_comments_page() {
+	global $template, $page, $conf;
+	
+	if ($page['body_id'] == 'theCommentsPage') {
+		include(COA_PATH . 'include/coa_comments_page.php');
 	}
 }
Index: extensions/Comments_on_Albums/maintain.inc.php
===================================================================
--- extensions/Comments_on_Albums/maintain.inc.php	(revision 9624)
+++ extensions/Comments_on_Albums/maintain.inc.php	(revision 9634)
@@ -16,5 +16,5 @@
 		`validation_date` datetime DEFAULT NULL,
 		PRIMARY KEY (`id`)
-	);");
+	) DEFAULT CHARSET=utf8;");
 }
 
Index: extensions/Comments_on_Albums/template/coa_admin.tpl
===================================================================
--- extensions/Comments_on_Albums/template/coa_admin.tpl	(revision 9624)
+++ 	(revision )
@@ -1,67 +1,0 @@
-{literal}
-<script type="text/javascript">
-	$(document).ready(function(){
-		$(".checkComment").click(function(event) {
-			if (event.target.type !== 'checkbox') {
-				var checkbox = $(this).children("input[type=checkbox]");
-				$(checkbox).attr('checked', !$(checkbox).is(':checked'));
-			}
-		});
-		$("#commentSelectAll").click(function () {
-			$(".checkComment input[type=checkbox]").attr('checked', true);
-			return false;
-		});
-		$("#commentSelectNone").click(function () {
-			$(".checkComment input[type=checkbox]").attr('checked', false);
-			return false;
-		});
-		$("#commentSelectInvert").click(function () {
-			$(".checkComment input[type=checkbox]").each(function() {
-				$(this).attr('checked', !$(this).is(':checked'));
-			});
-			return false;
-		});
-	});
-</script>
-{/literal}
-
-<div class="titrePage">
-	<h2>{'Waiting'|@translate} {$TABSHEET_TITLE}</h2>
-</div>
-
-<h3>{'User comments validation'|@translate}</h3>
-
-{if !empty($comments) }
-<form method="post" action="{$F_ACTION}">
-
-	<table width="99%">
-	{foreach from=$comments item=comment name=comment}
-		<tr valign="top" class="{if $smarty.foreach.comment.index is odd}row2{else}row1{/if}">
-			<td style="width:50px;" class="checkComment">
-				<input type="checkbox" name="comments[]" value="{$comment.ID}">
-			</td>
-			<td>
-				<div class="comment">
-					<a class="illustration" href="{$comment.CAT_URL}">{$comment.CAT_NAME}</a>
-					<p class="commentHeader"><strong>{$comment.AUTHOR}</strong> - <em>{$comment.DATE}</em></p>
-					<blockquote>{$comment.CONTENT}</blockquote>
-				</div>
-			</td>
-		</tr>
-	{/foreach}
-	</table>
-
-	<p class="checkActions">
-		{'Select:'|@translate}
-		<a href="#" id="commentSelectAll">{'All'|@translate}</a>,
-		<a href="#" id="commentSelectNone">{'None'|@translate}</a>,
-		<a href="#" id="commentSelectInvert">{'Invert'|@translate}</a>
-	</p>
-
-	<p class="bottomButtons">
-		<input class="submit" type="submit" name="validate_albums" value="{'Validate'|@translate}">
-		<input class="submit" type="submit" name="reject_albums" value="{'Reject'|@translate}">
-	</p>
-
-</form>
-{/if}
Index: extensions/Comments_on_Albums/template/coa_admin_comments.tpl
===================================================================
--- extensions/Comments_on_Albums/template/coa_admin_comments.tpl	(revision 9634)
+++ extensions/Comments_on_Albums/template/coa_admin_comments.tpl	(revision 9634)
@@ -0,0 +1,67 @@
+{literal}
+<script type="text/javascript">
+	$(document).ready(function(){
+		$(".checkComment").click(function(event) {
+			if (event.target.type !== 'checkbox') {
+				var checkbox = $(this).children("input[type=checkbox]");
+				$(checkbox).attr('checked', !$(checkbox).is(':checked'));
+			}
+		});
+		$("#commentSelectAll").click(function () {
+			$(".checkComment input[type=checkbox]").attr('checked', true);
+			return false;
+		});
+		$("#commentSelectNone").click(function () {
+			$(".checkComment input[type=checkbox]").attr('checked', false);
+			return false;
+		});
+		$("#commentSelectInvert").click(function () {
+			$(".checkComment input[type=checkbox]").each(function() {
+				$(this).attr('checked', !$(this).is(':checked'));
+			});
+			return false;
+		});
+	});
+</script>
+{/literal}
+
+<div class="titrePage">
+	<h2>{'Waiting'|@translate} {$TABSHEET_TITLE}</h2>
+</div>
+
+<h3>{'User comments validation'|@translate}</h3>
+
+{if !empty($comments) }
+<form method="post" action="{$F_ACTION}">
+
+	<table width="99%">
+	{foreach from=$comments item=comment name=comment}
+		<tr valign="top" class="{if $smarty.foreach.comment.index is odd}row2{else}row1{/if}">
+			<td style="width:50px;" class="checkComment">
+				<input type="checkbox" name="comments[]" value="{$comment.ID}">
+			</td>
+			<td>
+				<div class="comment">
+					<a class="illustration" href="{$comment.CAT_URL}">{$comment.CAT_NAME}</a>
+					<p class="commentHeader"><strong>{$comment.AUTHOR}</strong> - <em>{$comment.DATE}</em></p>
+					<blockquote>{$comment.CONTENT}</blockquote>
+				</div>
+			</td>
+		</tr>
+	{/foreach}
+	</table>
+
+	<p class="checkActions">
+		{'Select:'|@translate}
+		<a href="#" id="commentSelectAll">{'All'|@translate}</a>,
+		<a href="#" id="commentSelectNone">{'None'|@translate}</a>,
+		<a href="#" id="commentSelectInvert">{'Invert'|@translate}</a>
+	</p>
+
+	<p class="bottomButtons">
+		<input class="submit" type="submit" name="validate_albums" value="{'Validate'|@translate}">
+		<input class="submit" type="submit" name="reject_albums" value="{'Reject'|@translate}">
+	</p>
+
+</form>
+{/if}
Index: extensions/Comments_on_Albums/template/coa_admin_intro.tpl
===================================================================
--- extensions/Comments_on_Albums/template/coa_admin_intro.tpl	(revision 9634)
+++ extensions/Comments_on_Albums/template/coa_admin_intro.tpl	(revision 9634)
@@ -0,0 +1,12 @@
+{footer_script}
+	// add element to database informations, non intrusive way
+	jQuery('dl[style="padding-top: 30px;"] dd:last-child ul li:last-child').append('[{'Photos'|@translate}]');
+	jQuery('<li>'+
+		'{$DB_COMMENTS_ALBUMS}'+
+		{if isset($unvalidated_albums)}
+			' (<a href="{$unvalidated_albums.URL}">{$unvalidated_albums.INFO}</a>)'+
+		{/if}
+		' [{'Albums'|@translate}]'+
+	'</li>')
+	.appendTo('dl[style="padding-top: 30px;"] dd:last-child ul');
+{/footer_script}
Index: extensions/Comments_on_Albums/template/coa_albums.tpl
===================================================================
--- extensions/Comments_on_Albums/template/coa_albums.tpl	(revision 9624)
+++ extensions/Comments_on_Albums/template/coa_albums.tpl	(revision 9634)
@@ -1,6 +1,6 @@
 {combine_script id="jquery"}
-{combine_css path=$COA_PATH|@cat:'template/style.css'}
+{combine_css path=$COA_PATH|@cat:'template/style_albums.css'}
 
-{footer_script equire="jquery"}{literal}
+{footer_script require="jquery"}{literal}
 	// cancel all color changements and set default color to comments
 	jQuery('.thumbnailCategory').css('color', jQuery('body').css('color'));
Index: extensions/Comments_on_Albums/template/coa_comments_page.tpl
===================================================================
--- extensions/Comments_on_Albums/template/coa_comments_page.tpl	(revision 9634)
+++ extensions/Comments_on_Albums/template/coa_comments_page.tpl	(revision 9634)
@@ -0,0 +1,95 @@
+{html_head}
+	<style type="text/css">
+		.pwg-icon-comments-images {ldelim}
+			background-image: url({$COA_PATH}template/s26/outline_{$ICON_COLOR}.png);
+			background-position: 0 0;
+		}
+		a:hover .pwg-icon-comments-images {ldelim}
+			background-image: url({$COA_PATH}template/s26/outline_{$ICON_COLOR_OVER}.png);
+			background-position: 0 0;
+		}
+	</style>
+{/html_head}
+
+<div id="content" class="content">
+
+<div class="titrePage">
+	<ul class="categoryActions">
+		<li><a href="comments.php" title="Commentaires images" class="pwg-state-default pwg-button">
+			<span class="pwg-icon pwg-icon-comments-images">&nbsp;</span><span class="pwg-button-text">Commentaires images</span>
+		</a></li>
+		<li><a href="{$U_HOME}" title="{'Home'|@translate}" class="pwg-state-default pwg-button">
+			<span class="pwg-icon pwg-icon-home">&nbsp;</span><span class="pwg-button-text">{'Home'|@translate}</span>
+		</a></li>
+	</ul>
+	<h2>{'User comments'|@translate}</h2>
+</div>
+
+<form class="filter" action="{$F_ACTION}?display_mode=albums" method="get">
+
+  <fieldset>
+    <legend>{'Filter'|@translate}</legend>
+
+    <label>{'Keyword'|@translate}<input type="text" name="keyword" value="{$F_KEYWORD}"></label>
+
+    <label>{'Author'|@translate}<input type="text" name="author" value="{$F_AUTHOR}"></label>
+
+    <label>
+      {'Album'|@translate}
+      <select name="cat">
+        <option value="0">------------</option>
+        {html_options options=$categories selected=$categories_selected}
+      </select>
+    </label>
+
+    <label>
+      {'Since'|@translate}
+      <select name="since">
+        {html_options options=$since_options selected=$since_options_selected}
+      </select>
+    </label>
+
+  </fieldset>
+
+  <fieldset>
+
+    <legend>{'Display'|@translate}</legend>
+
+    <label>
+      {'Sort by'|@translate}
+      <select name="sort_by">
+        {html_options options=$sort_by_options selected=$sort_by_options_selected}
+      </select>
+    </label>
+
+    <label>
+      {'Sort order'|@translate}
+      <select name="sort_order">
+        {html_options options=$sort_order_options selected=$sort_order_options_selected}
+      </select>
+    </label>
+
+    <label>
+      {'Number of items'|@translate}
+      <select name="items_number">
+        {html_options options=$item_number_options selected=$item_number_options_selected}
+      </select>
+    </label>
+
+  </fieldset>
+
+  <input type="hidden" name="display_mode" value="albums"/>
+  <p><input class="submit" type="submit" value="{'Filter and display'|@translate}"></p>
+
+</form>
+ 
+{if !empty($navbar) }{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if}
+
+{if isset($comments)}
+<div id="comments">
+	{include file='comment_list.tpl'}
+</div>
+{/if}
+
+</div> <!-- content -->
+
Index: extensions/Comments_on_Albums/template/coa_intro.tpl
===================================================================
--- extensions/Comments_on_Albums/template/coa_intro.tpl	(revision 9624)
+++ 	(revision )
@@ -1,10 +1,0 @@
-{footer_script}
-	// add element to database informations, non intrusive way
-	jQuery('<li>'+
-		'{$NB_COMMENTS}'+
-		{if isset($unvalidated_albums)}
-			' (<a href="{$unvalidated_albums.URL}">{$unvalidated_albums.INFO}</a>)'+
-		{/if}
-	'</li>')
-	.appendTo('dl[style="padding-top: 30px;"] dd:last-child ul');
-{/footer_script}
Index: extensions/Comments_on_Albums/template/style.css
===================================================================
--- extensions/Comments_on_Albums/template/style.css	(revision 9624)
+++ 	(revision )
@@ -1,36 +1,0 @@
-#comments .thumbnailCategories li,
-#comments .thumbnailCategory ,
-#comments .thumbnailCategory .description,
-#comments .thumbnailCategory div.illustration { 
-	background-image:none;
-	height:auto !important;
-}
-
-#comments .thumbnailCategory {
-	padding:0px 2px 0px 12px !important; 
-	border:1px solid grey;
-}
-#comments .thumbnailCategories {
-	margin-left:5px;
-}
-
-#comments .thumbnailCategories li:hover,
-#comments .thumbnailCategory:hover,
-#comments .thumbnailCategory:hover A { 
-	background:none; 
-}
-	
-#comments .thumbnailCategory  .date, #comments .thumbnailCategory  .author {
-	font-weight:bold;
-}
-
-#comments {
-	padding:0;
-}
-#comments h3 {
-	padding-left:10px;
-}
-
-.errors, .infos {
-	padding-left:20em;
-}
Index: extensions/Comments_on_Albums/template/style_albums.css
===================================================================
--- extensions/Comments_on_Albums/template/style_albums.css	(revision 9634)
+++ extensions/Comments_on_Albums/template/style_albums.css	(revision 9634)
@@ -0,0 +1,36 @@
+#comments .thumbnailCategories li,
+#comments .thumbnailCategory ,
+#comments .thumbnailCategory .description,
+#comments .thumbnailCategory div.illustration { 
+	background-image:none;
+	height:auto !important;
+}
+
+#comments .thumbnailCategory {
+	padding:0px 2px 0px 12px !important; 
+	border:1px solid grey;
+}
+#comments .thumbnailCategories {
+	margin-left:5px;
+}
+
+#comments .thumbnailCategories li:hover,
+#comments .thumbnailCategory:hover,
+#comments .thumbnailCategory:hover A { 
+	background:none; 
+}
+	
+#comments .thumbnailCategory  .date, #comments .thumbnailCategory  .author {
+	font-weight:bold;
+}
+
+#comments {
+	padding:0;
+}
+#comments h3 {
+	padding-left:10px;
+}
+
+.errors, .infos {
+	padding-left:20em;
+}
