Index: inc/admin/class.dc.filter.php
===================================================================
--- inc/admin/class.dc.filter.php	(revision 242)
+++ 	(revision )
@@ -1,273 +1,0 @@
-<?php
-# ***** BEGIN LICENSE BLOCK *****
-# This file is part of DotClear "MyPostTypes" plugin.
-# Copyright (c) 2010 Bruno Hondelatte, and contributors. 
-# Many, many thanks to Olivier Meunier and the Dotclear Team.
-# All rights reserved.
-#
-# MyPostTypes plugin for DC2 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; either version 2 of the License, or
-# (at your option) any later version.
-# 
-# DotClear 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 DotClear; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-#
-# ***** END LICENSE BLOCK *****
-
-class dcFilterSet {
-
-	protected $filters;
-	protected $form_prefix;
-	protected $action;
-	protected $hideform;
-	protected $columns_form;
-	
-	public function __construct($action,$form_prefix="f_") {
-		$this->form_prefix=$form_prefix;
-		$this->filters = array();
-		$this->action = $action;
-	}
-
-	public function addFilter (Filter $filter) {
-		$filter->setFormPrefix($this->form_prefix);
-		$this->filters[$filter->id] = $filter;
-		return $this;
-	}
-
-	// Retrieves filter values from context
-	public function setValues ($form_data) {
-		$this->hideform = true;
-		if (isset($form_data['clear_filters']))
-			return;
-		foreach ($this->filters as $filter) {
-			$filter->setValues ($form_data);
-			if ($filter->isEnabled())
-				$this->hideform=false;
-		}
-		if (isset($form_data['add_filter']) && isset($this->filters[$form_data['add_filter']])) {
-			$this->filters[$form_data['add_filter']]->add();
-		}
-	}
-	
-	public function setColumnsForm($html)
-	{
-		$this->columns_form = $html;
-	}
-	
-	public function getFormFieldsAsHidden() {
-		$ret='';
-		foreach ($this->filters as $filter) {
-			$ret.= $filter->getFormFieldAsHidden();
-		}
-		return $ret;
-	}
-
-	public function getForm($action,$extra_content,$method="get",$nb_cols=3) {
-		$ret = '';
-		/*if ($this->hideform) {
-			$ret .= '<p><a id="filter-control" class="form-control" href="#">'.
-			__('Filters').'</a></p>';
-		}*/
-		$ret .= '<p><img alt="" src="minus.png"/> <a href="#" id="toggle-filters">'.__('Toggle filters and display options').'</a></p>';
-		$ret .=
-			'<div class="two-cols">'.
-			'<form id="filters" action="'.$this->action.'" method="get" id="filters-form">'.
-			'<div class="col70">'.
-			'<h3>'.__('Entries filters').'</h3>';
-			
-		$count=0;
-		$form_combo=array();
-		$form_combo['-']='';
-		foreach ($this->filters as $filter) {
-			if ($filter->isEnabled()) {
-				$ret .= $filter->getFormLine();
-			}
-			$form_combo[$filter->desc]=$filter->id;
-			$count++;
-		}
-		$ret .= 
-			'<p class="clear"><input class="delete" type="submit" value="'.__('Delete all filters').'" name="clear_filters"></p>'.
-			'<h3 class="margintop">'.__('Add a filter').'</h3>'.
-			'<p id="available_filters">'.
-			form::combo("add_filter",$form_combo).
-			'<input type="submit" value=" + " title="'.__('Add this filter').'" name="apply">'.
-			'</p>'.
-			'</div>'.
-			'<div class="col30">'.
-			$this->columns_form.
-			'</div>'.
-			'<p class="clear margintop"><input type="submit" value="'.__('Apply filters and display options').'" name="apply"></p>'.
-
-			'</form></div>';
-		return $ret;
-	}
-
-	public function header() {
-		return dcPage::jsLoad('js/filters.js');
-	}
-	public function display() {
-		echo $this->getForm("#","");
-	}
-
-	public function applyFilters($params) {
-		$filtered = false;
-		foreach ($this->filters as $filter) {
-			if ($filter->isEnabled()) {
-				$filter->applyFilter($params);
-				$filtered = true;
-			}
-		}
-		return $filtered;
-	}
-	
-}
-
-
-abstract class Filter {
-	public $id;
-	public $desc;
-	protected $request_param;
-	protected $enabled;
-	protected $values;
-	public $field_id;
-	
-	
-	public function __construct ($id,$desc,$request_param) {
-		$this->id = $id;
-		$this->desc = $desc;
-		$this->request_param = $request_param;
-		$this->enabled=false;
-		$this->values = array();
-		$this->field_id = $this->id;
-	}
-	
-	protected function getFieldId($pos=0) {
-		if ($pos == 0) {
-			return $this->field_id;
-		} else {
-			return $this->field_id.'_'.$pos;
-		}
-	}
-	
-	public function isEnabled() {
-		return $this->enabled;
-	}
-	
-	public function add() {
-		$this->enabled = true;
-	}
-	
-	public function setFormPrefix($prefix) {
-		$this->field_id = $prefix.$this->id;
-	}
-	
-	public abstract function getType();
-	
-	public function getFormFields() {
-		return '';
-	}
-
-	public function setValues($form_data) {
-/*		if (isset($form_data['c_'.$this->field_id])) {
-			$this->enabled = true;
-		}*/
-		$count=0;
-		while (isset($form_data[$this->getFieldId($count)])) {
-			if (!isset($form_data['del_'.$this->getFieldId($count)])) {
-				$this->values[] = $form_data[$this->getFieldId($count)];
-				$this->enabled = true;
-			}
-			$count++;
-		}
-	}
-	
-	public function getFormFieldAsHidden () {
-		$ret='';
-		for ($cur=0; $cur < count($this->values); $cur++) {
-			$ret .= form::hidden($this->getFieldId($cur), $this->values[$cur]);
-		}
-	}
-	public function getFormLine() {
-		$ret="";
-		for ($cur=0; $cur < count($this->values); $cur++) {
-			$ret .= '<p id="'.$this->getFieldId($cur).'" class="line" title="'.$this->desc.'">'.
-				$this->getFormFields($cur).
-				'<input id="del_'.$this->getFieldId($cur).'" class="delete" '.
-				'type="submit" title="Delete this filter" value=" - " name="del_'.$this->getFieldId($cur).'"/>'.
-				'</p>';
-		}
-		return $ret;
-	}
-	
-	public function applyFilter($params) {
-	}
-	
-}
-
-class comboFilter extends Filter {
-	protected $options;
-	protected $default;
-	protected $no_value;
-	protected $verb;
-	protected $extra;
-	
-	public function __construct($id,$desc,$request_param,$options,$extra=array()) {
-		parent::__construct($id,$desc,$request_param);
-		$this->options = $options;
-		$this->extra = $extra;
-		$this->desc = $desc;
-		$this->verb = "is";
-		$this->values=array();
-	}
-	
-	public function add() {
-		parent::add();
-		if (isset($this->extra['singleval']) && (count($this->values) > 0))
-			return;
-		$this->values[]=current($this->options);
-	}
-	
-	public function getType() {
-		return "combo";
-	}
-	
-	public function setValues($form_data) {
-		parent::setValues($form_data);
-		if (isset($form_data[$this->field_id."_v"])) {
-			$this->verb = $form_data[$this->field_id."_v"] == 'is' ? 'is' : 'isnot';
-		}
-	}
-
-	public function getFormFieldAsHidden () {
-		return parent::getFormFieldAsHidden().form::hidden($this->field_id."_v",$this->verb);
-	}
-
-	public function getFormFields($pos=0) {
-		
-		if ($pos == 0) {
-			$desc = $this->desc.' : ';
-			$labelclass="";
-		} else {
-			$desc = __('or');
-			$labelclass = ' class="or"';
-		};
-		return '<label for="'.$this->getFieldId($pos).'"'.$labelclass.'>'.$desc.'</label>'.
-			(($pos == 0) ?form::combo($this->field_id.'_v',array(__('is')=>'is',__('is not')=>'isnot'),$this->verb) : '').
-			form::combo($this->getFieldId($pos),$this->options,$this->values[$pos]);
-	}
-	
-	public function applyFilter($params) {
-		if (isset($this->extra['singleval']))
-			$params[$this->request_param]=$this->values[0];
-		else
-			$params[$this->request_param]=$this->values;
-	}
-}
-?>
Index: inc/admin/class.dc.menu.php
===================================================================
--- inc/admin/class.dc.menu.php	(revision 3)
+++ inc/admin/class.dc.menu.php	(revision 270)
@@ -4,5 +4,5 @@
 # This file is part of Dotclear 2.
 #
-# Copyright (c) 2003-2010 Olivier Meunier & Association Dotclear
+# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
 # Licensed under the GPL version 2.0 license.
 # See LICENSE file or
Index: inc/admin/class.dc.toolbar.php
===================================================================
--- inc/admin/class.dc.toolbar.php	(revision 430)
+++ 	(revision )
@@ -1,128 +1,0 @@
-<?php
-
-class dcToolbar
-{
-	protected $core;
-	protected $toolbars;
-	
-	public function __construct($core)
-	{
-		$this->core = $core;
-		$this->toolbars = array();
-		$this->i18n = array();
-	}
-	
-	public function addFormatter($formatter)
-	{
-		if (!is_string($formatter) || empty($formatter)) {
-			return;
-		}
-		
-		$toolbar = array(
-			'settings' => array(),
-			'plugins' => array(),
-			'buttons' => array(
-				1 => array(),
-				2 => array(),
-				3 => array(),
-				4 => array()
-			)
-		);
-		
-		$this->toolbars[$formatter] = array_key_exists($formatter,$this->toolbars) ? $this->toolbars[$formatter] : $toolbar;
-	}
-	
-	public function addSettings($formatter,$settings)
-	{
-		
-		if (!array_key_exists($formatter,$this->toolbars)) {
-			return;
-		}
-		if (!is_array($settings)) {
-			return;
-		}
-		
-		$this->toolbars[$formatter]['settings'] = array_merge($this->toolbars[$formatter]['settings'],$settings);
-	}
-	
-	public function addPlugins($formatter,$plugins)
-	{
-		if (!array_key_exists($formatter,$this->toolbars)) {
-			return;
-		}
-		if (!is_array($plugins)) {
-			return;
-		}
-		
-		$this->toolbars[$formatter]['plugins'] = array_merge($this->toolbars[$formatter]['plugins'],$plugins);
-	}
-	
-	public function addButtons($formatter,$buttons)
-	{
-		if (!array_key_exists($formatter,$this->toolbars)) {
-			return;
-		}
-		if (!is_array($buttons)) {
-			return;
-		}
-		
-		foreach($buttons as $level => $ids) {
-			if (!is_array($ids)) {
-				continue;
-			}
-			$level = !preg_match('#^[1-4]$#',$level) ? 1 : $level;
-			$this->toolbars[$formatter]['buttons'][$level] = array_merge($this->toolbars[$formatter]['buttons'][$level],$ids);
-		}
-	}
-	
-	public function addI18n($component,$i18n)
-	{
-		if (!is_array($i18n)) {
-			return;
-		}
-		if (!array_key_exists($component,$this->i18n)) {
-			$this->i18n[$component] = array();
-		}
-		
-		$this->i18n[$component] = array_merge($this->i18n[$component],$i18n);
-	}
-	
-	public function getJS()
-	{
-		$res = "dcToolBar = new dcToolBar();\n";
-		
-		$this->core->callBehavior('adminToolbar',$this);
-		
-		foreach ($this->toolbars as $formatter => $options) {
-			$s = $options['settings'];
-			$s['language'] = 'en';
-			
-			// Add plugins
-			array_walk($options['plugins'],create_function('&$v,$k','$v=!$v ? "-".$k : $k;'));
-			$s['plugins'] = implode(',',$options['plugins']);
-			
-			// Add buttons
-			foreach ($options['buttons'] as $level => $buttons) {
-				$s[sprintf('theme_advanced_buttons%d',$level)] = implode(',',$buttons);
-			}
-			
-			// Add configuration
-			array_walk($s,create_function('&$v,$k','$v=sprintf("%s: %s",$k,(!preg_match("#^(true|false|{.*})$#",$v)?"\'".$v."\'":$v));'));
-			$res .= sprintf("dcToolBar.setConfig('%s',{%s});\n",$formatter,implode(",\n",$s));
-		}
-		
-		// Add translation
-		$i18n = array();
-		
-		foreach ($this->i18n as $component => $values) {
-			array_walk($this->i18n[$component],create_function('&$v,$k','$v=sprintf("\'%s\': \'%s\'",$k,html::escapeJS($v));'));
-			array_push($i18n,sprintf('%s: {%s}',$component,implode(',',$this->i18n[$component])));
-		}
-		
-		$res .= !empty($i18n) ? sprintf("dcToolBar.setI18n({%s: {%s}});\n",'en',implode(",\n",$i18n)) : '';
-		
-		return $res;
-	}
-}
-
-?>
Index: inc/admin/lib.dc.page.php
===================================================================
--- inc/admin/lib.dc.page.php	(revision 445)
+++ inc/admin/lib.dc.page.php	(revision 447)
@@ -4,5 +4,5 @@
 # This file is part of Dotclear 2.
 #
-# Copyright (c) 2003-2010 Olivier Meunier & Association Dotclear
+# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
 # Licensed under the GPL version 2.0 license.
 # See LICENSE file or
@@ -16,4 +16,6 @@
 class dcPage
 {
+	private static $loaded_js=array();
+
 	# Auth check
 	public static function check($permissions)
@@ -102,4 +104,10 @@
 			echo '  <style type="text/css">'."\n".'  @import "style/default-rtl.css";'."\n"."  </style>\n";
 		}
+
+		$core->auth->user_prefs->addWorkspace('interface');
+		$user_ui_hide_std_favicon = $core->auth->user_prefs->interface->hide_std_favicon;
+		if (!$user_ui_hide_std_favicon) {
+			echo '<link rel="icon" type="image/png" href="images/favicon.png" />';
+		}
 		
 		echo
@@ -116,4 +124,5 @@
 		'">'."\n".
 		
+		'<ul id="prelude"><li><a href="#content">Aller au contenu</a></li><li><a href="#main-menu">Aller au menu</a></li></ul>'."\n".
 		'<div id="top"><h1><a href="index.php">'.DC_VENDOR_NAME.'</a></h1></div>'."\n";
 		
@@ -264,7 +273,7 @@
 			} else {
 				$prof_url = http::getSelfURI();
-				$prof_url .= (strpos($prof_url,'?') === false) ? '?' : '&amp;';
+				$prof_url .= (strpos($prof_url,'?') === false) ? '?' : '&';
 				$prof_url .= 'XDEBUG_PROFILE';
-				$res .= '<p><a href="'.$prof_url.'">Trigger profiler</a></p>';
+				$res .= '<p><a href="'.html::escapeURL($prof_url).'">Trigger profiler</a></p>';
 			}
 			
@@ -343,5 +352,9 @@
 	public static function jsLoad($src)
 	{
-		return '<script type="text/javascript" src="'.html::escapeHTML($src).'"></script>'."\n";
+		$escaped_src = html::escapeHTML($src);
+		if (!isset(self::$loaded_js[$escaped_src])) {
+			self::$loaded_js[$escaped_src]=true;
+			return '<script type="text/javascript" src="'.$escaped_src.'"></script>'."\n";
+		}
 	}
 	
@@ -358,4 +371,5 @@
 		self::jsLoad('js/jquery/jquery.bgFade.js').
 		self::jsLoad('js/common.js').
+		self::jsLoad('js/prelude.js').
 		
 		'<script type="text/javascript">'."\n".
@@ -549,285 +563,80 @@
 	public static function jsToolBar()
 	{
-		$tb = new dcToolBar($GLOBALS['core']);
-		
-		// Add xhtml toolbar
-		$tb->addFormatter('xhtml');
-		$tb->addSettings('xhtml',array(
-			'mode' => 'textareas',
-			'relative_urls' => 'false',
-			'theme' => 'advanced',
-			'skin' => 'dotclear',
-			'theme_advanced_toolbar_location' => 'top',
-			'theme_advanced_toolbar_align' => 'left',
-			'theme_advanced_statusbar_location' => 'bottom',
-			'theme_advanced_resizing' => 'true',
-			'theme_advanced_resize_horizontal' => 'false',
-			'theme_advanced_blockformats' => 'p,pre,h3,h4,h5,h6',
-			'paste_auto_cleanup_on_paste' => 'true',
-			'forced_root_block' => '',
-			'formats' => '{underline: {inline: "ins"},strikethrough: {inline: "del"},inlinecode: {inline: "code"},quote: {inline: "q"}}',
-			'entity_encoding' => 'raw'
-		));
-		$tb->addPlugins('xhtml',array(
-			'fullscreen' => true,
-			'paste' => true,
-			'searchreplace' => true,
-			'inlinepopups' => true,
-			'dcControls' => true
-		));
-		$tb->addButtons('xhtml',array(
-			1 => array(
-				'justifyleft',
-				'justifycenter',
-				'justifyright',
-				'separator',
-				'bold',
-				'italic',
-				'underline',
-				'strikethrough',
-				'inlinecode',
-				'quote',
-				'sub',
-				'sup',
-				'separator',
-				'blockquote',
-				'bullist',
-				'numlist',
-				'outdent',
-				'indent',
-				'separator',
-				'undo',
-				'redo',
-				'separator',
-				'fullscreen',
-				'separator',
-				'code'
-			),
-			2 => array(
-				'formatselect',
-				'removeformat',
-				'cleanup',
-				'separator',
-				'pastetext',
-				'pasteword',
-				'separator',
-				'search',
-				'replace',
-				'autosave'
-			),
-			3 => array(
-				'link',
-				'unlink',
-				'anchor',
-				'separator',
-				'media',
-				'webmedia',
-				'separator',
-				'hr',
-				'charmap',
-				'visualchars'
-			)
-		));
-		
-		// Add wiki toolbar
-		$tb->addFormatter('wiki');
-		$tb->addSettings('wiki',array(
-			'mode' => 'none',
-			'relative_urls' => 'false',
-			'theme' => 'advanced',
-			'skin' => 'dotclear',
-			'theme_advanced_toolbar_location' => 'top',
-			'theme_advanced_toolbar_align' => 'left',
-			'theme_advanced_statusbar_location' => 'bottom',
-			'theme_advanced_resizing' => 'true',
-			'theme_advanced_resize_horizontal' => 'false',
-			'theme_advanced_path'  => 'false',
-			'theme_advanced_blockformats' => 'p,pre,h3,h4,h5,h6',
-			'entity_encoding' => 'raw',
-			'remove_linebreaks' => 'false',
-			'inline_styles' => 'false',
-			'convert_fonts_to_spans' => 'false',
-			'paste_auto_cleanup_on_paste' => 'true',
-			'force_br_newlines' => 'true',
-			'force_p_newlines' => 'false',
-			'forced_root_block' => '',
-			'formats' => '{underline: {inline: "ins"},strikethrough: {inline: "del"},inlinecode: {inline: "code"},quote: {inline: "q"}}'
-		));
-		$tb->addPlugins('wiki',array(
-			'fullscreen' => true,
-			'paste' => true,
-			'searchreplace' => true,
-			'dcControls' => true
-		));
-		$tb->addButtons('wiki',array(
-			1 => array(
-				'formatselect',
-				'bold',
-				'italic',
-				'underline',
-				'strikethrough',
-				'quote',
-				'inlinecode',
-				'separator',
-				'blockquote',
-				'bullist',
-				'numlist',
-				'separator',
-				'link',
-				'unlink',
-				'separator',
-				'search',
-				'replace',
-				'separator',
-				'undo',
-				'redo',
-				'separator',
-				'fullscreen',
-				'separator',
-				'code'
-			)
-		));
-		
-		$tb->addI18n('common',array(
-			'edit_confirm' => __('Do you want to use the WYSIWYG mode for this textarea?'),
-			'apply' => __('Apply'),
-			'insert' => __('Insert'),
-			'update' => __('Update'),
-			'cancel' => __('Cancel'),
-			'close' => __('Close'),
-			'browse' => __('Browse'),
-			'class_name' => __('Class'),
-			'not_set' => __('-- Not set --'),
-			'clipboard_msg' => __('Copy/Cut/Paste is not available in Mozilla and Firefox. Do you want more information about this issue?'),
-			'clipboard_no_support' => __('Currently not supported by your browser, use keyboard shortcuts instead.'),
-			'popup_blocked' => __('Sorry, but we have noticed that your popup-blocker has disabled a window that provides application functionality. You will need to disable popup blocking on this site in order to fully utilize this tool.'),
-			'invalid_data' => __('{#field} is invalid'),
-			'invalid_data_number' => __('{#field} must be a number'),
-			'invalid_data_min' => __('{#field} must be a number greater than {#min}'),
-			'invalid_data_size' => __('{#field} must be a number or percentage'),
-			'more_colors' => __('More colors')
-		));
-		$tb->addI18n('advanced',array(
-			'style_select' => __('Styles'),
-			'font_size' => __('Font size'),
-			'fontdefault' => __('Font family'),
-			'block' => __('Format'),
-			'paragraph' => __('Paragraph'),
-			'div' => __('Div'),
-			'address' => __('Address'),
-			'pre' => __('Preformatted'),
-			'h1' => __('Heading blog'),
-			'h2' => __('Heading entry'),
-			'h3' => __('Heading 1'),
-			'h4' => __('Heading 2'),
-			'h5' => __('Heading 3'),
-			'h6' => __('Heading 4'),
-			'blockquote' => __('Blockquote'),
-			'code' => __('Code'),
-			'samp' => __('Code sample'),
-			'dt' => __('Definition term '),
-			'dd' => __('Definition description'),
-			'bold_desc' => __('Bold (Ctrl+B)'),
-			'italic_desc' => __('Italic (Ctrl+I)'),
-			'underline_desc' => __('Underline (Ctrl+U)'),
-			'striketrough_desc' => __('Strikethrough'),
-			'justifyleft_desc' => __('Align left'),
-			'justifycenter_desc' => __('Align center'),
-			'justifyright_desc' => __('Align right'),
-			'justifyfull_desc' => __('Align full'),
-			'bullist_desc' => __('Unordered list'),
-			'numlist_desc' => __('Ordered list'),
-			'outdent_desc' => __('Outdent'),
-			'indent_desc' => __('Indent'),
-			'undo_desc' => __('Undo (Ctrl+Z)'),
-			'redo_desc' => __('Redo (Ctrl+Y)'),
-			'link_desc' => __('Insert/edit link'),
-			'unlink_desc' => __('Unlink'),
-			'image_desc' => __('Insert/edit image'),
-			'cleanup_desc' => __('Cleanup messy code'),
-			'code_desc' => __('Edit HTML Source'),
-			'sub_desc' => __('Subscript'),
-			'sup_desc' => __('Superscript'),
-			'hr_desc' => __('Insert horizontal ruler'),
-			'removeformat_desc' => __('Remove formatting'),
-			'custom1_desc' => __('Your custom description here'),
-			'forecolor_desc' => __('Select text color'),
-			'backcolor_desc' => __('Select background color'),
-			'charmap_desc' => __('Insert custom character'),
-			'visualaid_desc' => __('Toggle guidelines/invisible elements'),
-			'anchor_desc' => __('Insert/edit anchor'),
-			'cut_desc' => __('Cut'),
-			'copy_desc' => __('Copy'),
-			'paste_desc' => __('Paste'),
-			'image_props_desc' => __('Image properties'),
-			'newdocument_desc' => __('New document'),
-			'help_desc' => __('Help'),
-			'blockquote_desc' => __('Blockquote'),
-			'clipboard_msg' => __('Copy/Cut/Paste is not available in Mozilla and Firefox.\r\nDo you want more information about this issue?'),
-			'path' => __('Path'),
-			'newdocument' => __('Are you sure you want clear all contents?'),
-			'toolbar_focus' => __('Jump to tool buttons - Alt+Q, Jump to editor - Alt-Z, Jump to element path - Alt-X'),
-			'more_colors' => __('More colors'),
-			'shortcuts_desc' => __('Accessibility Help'),
-			'help_shortcut' => __('. Press ALT F10 for toolbar. Press ALT 0 for help.'),
-			'rich_text_area' => __('Rich Text Area'),
-			'toolbar' => __('Toolbar'),
-			'anchor_delta_width' => '40',
-			'anchor_delta_height' => '50',
-			'charmap_delta_width' => '50',
-			'charmap_delta_height' => '70',
-		));
-		$tb->addI18n('advanced_dlg',array(
-			'about_title' => __('About TinyMCE'),
-			'about_general' => __('About'),
-			'about_help' => __('Help'),
-			'about_license' => __('License'),
-			'about_plugins' => __('Plugins'),
-			'about_plugin' => __('Plugin'),
-			'about_author' => __('Author'),
-			'about_version' => __('Version'),
-			'about_loaded' => __('Loaded plugins'),
-			'anchor_title' => __('Insert/edit anchor'),
-			'anchor_name' => __('Anchor name'),
-			'anchor_invalid' => __('Please specify a valid anchor name.'),
-			'code_title' => __('HTML Source Editor'),
-			'code_wordwrap' => __('Word wrap'),
-			'charmap_title' => __('Select custom character'),
-			'accessibility_help' => __('Accessibility Help'),
-			'accessibility_usage_title' => __('General Usage')
-		));
-		$tb->addI18n('paste',array(
-			'paste_text_desc' => __('Paste as Plain Text'),
-			'paste_word_desc' => __('Paste from Word'),
-			'selectall_desc' => __('Select All'),
-			'plaintext_mode_sticky' => __('Paste is now in plain text mode. Click again to toggle back to regular paste mode. After you paste something you will be returned to regular paste mode.'),
-			'plaintext_mode' => __('Paste is now in plain text mode. Click again to toggle back to regular paste mode.')
-		));
-		$tb->addI18n('paste_dlg',array(
-			'text_title' => __('Use CTRL+V on your keyboard to paste the text into the window.'),
-			'text_linebreaks' => __('Keep linebreaks'),
-			'word_title' => __('Use CTRL+V on your keyboard to paste the text into the window.')
-		));
-		$tb->addI18n('fullscreen',array('desc' => __('Toggle fullscreen mode')));
-		$tb->addI18n('aria',array('rich_text_area' => __('Rich Text Area')));
-		$tb->addI18n('dcControls',array(
-			'inlinecode_desc' => __('Code'),
-			'quote_desc' => __('Quote'),
-			'link_desc' => __('Link'),
-			'media_desc' => __('Add media from media manager'),
-			'webmedia_desc' => __('Add media from web')
-		));
-		$tb->addI18n('dcControls_dlg',array(
-			'provider_not_supported' => __('Provider not supported.'),
-			'webmedia_no_information' => __('Impossible to get media information. Please, try again later.'),
-			'no_media_loaded' => __('No media loaded. Please, load one beore inserting.')
-		));
-		
 		$res =
-		'<script type="text/javascript" src="js/tiny_mce/tiny_mce.js"></script>'.
-		'<script type="text/javascript" src="js/dcToolBar.js"></script>'.
+		'<link rel="stylesheet" type="text/css" href="style/jsToolBar/jsToolBar.css" />'.
+		'<script type="text/javascript" src="js/jsToolBar/jsToolBar.js"></script>';
+		
+		if (isset($GLOBALS['core']->auth) && $GLOBALS['core']->auth->getOption('enable_wysiwyg')) {
+			$res .= '<script type="text/javascript" src="js/jsToolBar/jsToolBar.wysiwyg.js"></script>';
+		}
+		
+		$res .=
+		'<script type="text/javascript" src="js/jsToolBar/jsToolBar.dotclear.js"></script>'.
 		'<script type="text/javascript">'."\n".
 		"//<![CDATA[\n".
-		$tb->getJS().
+		"jsToolBar.prototype.dialog_url = 'popup.php'; ".
+		"jsToolBar.prototype.iframe_css = '".
+			'body{'.
+				'font: 12px "DejaVu Sans","Lucida Grande","Lucida Sans Unicode",Arial,sans-serif;'.
+				'color : #000;'.
+				'background: #f9f9f9;'.
+				'margin: 0;'.
+				'padding : 2px;'.
+				'border: none;'.
+				(l10n::getTextDirection($GLOBALS['_lang']) == 'rtl' ? 'direction:rtl;' : '').
+			'}'.
+			'pre, code, kbd, samp {'.
+				'font-family:"Courier New",Courier,monospace;'.
+				'font-size : 1.1em;'.
+			'}'.
+			'code {'.
+				'color : #666;'.
+				'font-weight : bold;'.
+			'}'.
+			'body > p:first-child {'.
+				'margin-top: 0;'.
+			'}'.
+		"'; ".
+		"jsToolBar.prototype.base_url = '".html::escapeJS($GLOBALS['core']->blog->host)."'; ".
+		"jsToolBar.prototype.switcher_visual_title = '".html::escapeJS(__('visual'))."'; ".
+		"jsToolBar.prototype.switcher_source_title = '".html::escapeJS(__('source'))."'; ".
+		"jsToolBar.prototype.legend_msg = '".
+		html::escapeJS(__('You can use the following shortcuts to format your text.'))."'; ".
+		"jsToolBar.prototype.elements.blocks.options.none = '".html::escapeJS(__('-- none --'))."'; ".
+		"jsToolBar.prototype.elements.blocks.options.nonebis = '".html::escapeJS(__('-- block format --'))."'; ".
+		"jsToolBar.prototype.elements.blocks.options.p = '".html::escapeJS(__('Paragraph'))."'; ".
+		"jsToolBar.prototype.elements.blocks.options.h1 = '".html::escapeJS(__('Level 1 header'))."'; ".
+		"jsToolBar.prototype.elements.blocks.options.h2 = '".html::escapeJS(__('Level 2 header'))."'; ".
+		"jsToolBar.prototype.elements.blocks.options.h3 = '".html::escapeJS(__('Level 3 header'))."'; ".
+		"jsToolBar.prototype.elements.blocks.options.h4 = '".html::escapeJS(__('Level 4 header'))."'; ".
+		"jsToolBar.prototype.elements.blocks.options.h5 = '".html::escapeJS(__('Level 5 header'))."'; ".
+		"jsToolBar.prototype.elements.blocks.options.h6 = '".html::escapeJS(__('Level 6 header'))."'; ".
+		"jsToolBar.prototype.elements.strong.title = '".html::escapeJS(__('Strong emphasis'))."'; ".
+		"jsToolBar.prototype.elements.em.title = '".html::escapeJS(__('Emphasis'))."'; ".
+		"jsToolBar.prototype.elements.ins.title = '".html::escapeJS(__('Inserted'))."'; ".
+		"jsToolBar.prototype.elements.del.title = '".html::escapeJS(__('Deleted'))."'; ".
+		"jsToolBar.prototype.elements.quote.title = '".html::escapeJS(__('Inline quote'))."'; ".
+		"jsToolBar.prototype.elements.code.title = '".html::escapeJS(__('Code'))."'; ".
+		"jsToolBar.prototype.elements.br.title = '".html::escapeJS(__('Line break'))."'; ".
+		"jsToolBar.prototype.elements.blockquote.title = '".html::escapeJS(__('Blockquote'))."'; ".
+		"jsToolBar.prototype.elements.pre.title = '".html::escapeJS(__('Preformated text'))."'; ".
+		"jsToolBar.prototype.elements.ul.title = '".html::escapeJS(__('Unordered list'))."'; ".
+		"jsToolBar.prototype.elements.ol.title = '".html::escapeJS(__('Ordered list'))."'; ".
+		
+		"jsToolBar.prototype.elements.link.title = '".html::escapeJS(__('Link'))."'; ".
+		"jsToolBar.prototype.elements.link.href_prompt = '".html::escapeJS(__('URL?'))."'; ".
+		"jsToolBar.prototype.elements.link.hreflang_prompt = '".html::escapeJS(__('Language?'))."'; ".
+		
+		"jsToolBar.prototype.elements.img.title = '".html::escapeJS(__('External image'))."'; ".
+		"jsToolBar.prototype.elements.img.src_prompt = '".html::escapeJS(__('URL?'))."'; ".
+		
+		"jsToolBar.prototype.elements.img_select.title = '".html::escapeJS(__('Media chooser'))."'; ".
+		"jsToolBar.prototype.elements.post_link.title = '".html::escapeJS(__('Link to an entry'))."'; ";
+		
+		if (!$GLOBALS['core']->auth->check('media,media_admin',$GLOBALS['core']->blog->id)) {
+			$res .= "jsToolBar.prototype.elements.img_select.disabled = true;\n";
+		}
+		
+		$res .=
 		"\n//]]>\n".
 		"</script>\n";
@@ -883,21 +692,17 @@
 	{
 		return
-		self::jsLoad('js/tool-man/core.js').
-		self::jsLoad('js/tool-man/events.js').
-		self::jsLoad('js/tool-man/css.js').
-		self::jsLoad('js/tool-man/coordinates.js').
-		self::jsLoad('js/tool-man/drag.js').
-		self::jsLoad('js/tool-man/dragsort.js').
-		self::jsLoad('js/dragsort-tablerows.js');
+		'<script type="text/javascript" src="js/tool-man/core.js"></script>'.
+		'<script type="text/javascript" src="js/tool-man/events.js"></script>'.
+		'<script type="text/javascript" src="js/tool-man/css.js"></script>'.
+		'<script type="text/javascript" src="js/tool-man/coordinates.js"></script>'.
+		'<script type="text/javascript" src="js/tool-man/drag.js"></script>'.
+		'<script type="text/javascript" src="js/tool-man/dragsort.js"></script>'.
+		'<script type="text/javascript" src="js/dragsort-tablerows.js"></script>';
 	}
 	
 	public static function jsMetaEditor()
 	{
-		return self::jsLoad('js/meta-editor.js');
-	}
-	
-	public static function jsOEmbed()
-	{
-		return self::jsLoad('js/jquery/jquery.oembed.js');
+		return
+		'<script type="text/javascript" src="js/meta-editor.js"></script>';
 	}
 }
Index: inc/admin/lib.pager.php
===================================================================
--- inc/admin/lib.pager.php	(revision 326)
+++ inc/admin/lib.pager.php	(revision 270)
@@ -4,5 +4,5 @@
 # This file is part of Dotclear 2.
 #
-# Copyright (c) 2003-2010 Olivier Meunier & Association Dotclear
+# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
 # Licensed under the GPL version 2.0 license.
 # See LICENSE file or
@@ -12,71 +12,4 @@
 if (!defined('DC_RC_PATH')) { return; }
 
-class adminGenericColumn
-{
-	protected $core;
-	protected $rs;
-	protected $id;
-	protected $title;
-	protected $callback;
-	protected $html;
-	protected $visibility;
-	
-	public function __construct($id,$title,$callback,$html = null)
-	{
-		if (!is_string($id) || $id === '') {
-			throw new Exception(__('Invalid column ID'));
-		}
-		
-		if (!is_string($title)) {
-			throw new Exception(__('Invalid column title'));
-		}
-		
-		if (is_null($html) || !is_string($html)) {
-			$html = '';
-		}
-		if (!empty($html)) {
-			$html = ' '.$html;
-		}
-		
-		try {
-			if (!is_array($callback) || count($callback) < 2) {
-				throw new Exception(__('Callback parameter should be an array'));
-			}
-			$r = new ReflectionClass($callback[0]);
-			$f = $r->getMethod($callback[1]);
-			$p = $r->getParentClass();
-			if (!$p || $p->name != 'adminGenericList') {
-				throw new Exception(__('Callback class should be inherited of adminGenericList class'));
-			}
-		}
-		catch (Exception $e) {
-			throw new Exception(sprintf(__('Invalid column callback: %s'),$e->getMessage()));
-		}
-		
-		$this->id = $id;
-		$this->title = $title;
-		$this->callback = $callback;
-		$this->html = $html;
-		$this->visibility = true;
-	}
-	
-	public function getInfo($k)
-	{
-		return property_exists(get_class($this),$k) ? $this->{$k} : null;
-	}
-	
-	public function setVisibility($visibility)
-	{
-		if (is_bool($visibility)) {
-			$this->visibility = $visibility;
-		}
-	}
-	
-	public function isVisible()
-	{
-		return $this->visibility;
-	}
-}
-
 class adminGenericList
 {
@@ -84,5 +17,4 @@
 	protected $rs;
 	protected $rs_count;
-	protected $columns;
 	
 	public function __construct($core,$rs,$rs_count)
@@ -91,104 +23,11 @@
 		$this->rs =& $rs;
 		$this->rs_count = $rs_count;
-		$this->context = get_class($this);
-		$this->columns = array();
-		$this->form_prefix = 'col_%s';
-		$this->form_trigger = 'add_filter';
-		
 		$this->html_prev = __('&#171;prev.');
 		$this->html_next = __('next&#187;');
-		
-		# Post columns
-		$this->addColumn('adminPostList','title',__('Title'),array('adminPostList','getTitle'));
-		$this->addColumn('adminPostList','date',__('Date'),array('adminPostList','getDate'));
-		$this->addColumn('adminPostList','category',__('Category'),array('adminPostList','getCategory'));
-		$this->addColumn('adminPostList','author',__('Author'),array('adminPostList','getAuthor'));
-		$this->addColumn('adminPostList','comment',__('Comments'),array('adminPostList','getComments'));
-		$this->addColumn('adminPostList','trackback',__('Trackbacks'),array('adminPostList','getTrackbacks'));
-		$this->addColumn('adminPostList','status',__('Status'),array('adminPostList','getStatus'));
-		
-		# Post (mini list) columns
-		$this->addColumn('adminPostMiniList','title',__('Title'),array('adminPostList','getTitle'));
-		$this->addColumn('adminPostMiniList','date',__('Date'),array('adminPostList','getDate'));
-		$this->addColumn('adminPostMiniList','author',__('Author'),array('adminPostList','getAuthor'));
-		$this->addColumn('adminPostMiniList','status',__('Status'),array('adminPostList','getStatus'));
-		
-		# Comment columns
-		$this->addColumn('adminCommentList','title',__('Title'),array('adminCommentList','getTitle'));
-		$this->addColumn('adminCommentList','date',__('Date'),array('adminCommentList','getDate'));
-		$this->addColumn('adminCommentList','author',__('Author'),array('adminCommentList','getAuthor'));
-		$this->addColumn('adminCommentList','type',__('Type'),array('adminCommentList','getType'));
-		$this->addColumn('adminCommentList','status',__('Status'),array('adminCommentList','getStatus'));
-		$this->addColumn('adminCommentList','edit','',array('adminCommentList','getEdit'));
-		
-		# User columns
-		$this->addColumn('adminUserList','username',__('Username'),array('adminUserList','getUserName'));
-		$this->addColumn('adminUserList','firstname',__('First name'),array('adminUserList','getFirstName'));
-		$this->addColumn('adminUserList','lastname',__('Last name'),array('adminUserList','getLastName'));
-		$this->addColumn('adminUserList','displayname',__('Display name'),array('adminUserList','getDisplayName'));
-		$this->addColumn('adminUserList','entries',__('Entries'),array('adminUserList','getEntries'));
-		
-		$core->callBehavior('adminGenericListConstruct',$this);
-		
-		$this->setColumnsVisibility();
-	}
-	
-	public function addColumn($context,$id,$title,$callback,$html = null)
-	{
-		try {
-			if (!array_key_exists($context,$this->columns)) {
-				$this->columns[$context] = array();
-			}
-			
-			$c = new adminGenericColumn($id,$title,$callback,$html);
-			$this->columns[$context][$c->getInfo('id')] = $c;
-		}
-		catch (Exception $e) {
-			if (DC_DEBUG) {
-				$this->core->error->add($e->getMessage());
-			}
-		}
-	}
-	
-	public function setColumnsVisibility()
-	{
-		$ws = $this->core->auth->user_prefs->addWorkspace('lists');
-		
-		$user_pref = !is_null($ws->{$this->context}) ? unserialize($ws->{$this->context}) : array();
-		
-		foreach ($this->columns[$this->context] as $k => $v) {
-			$visibility =  array_key_exists($k,$user_pref) ? $user_pref[$k] : true;
-			if (array_key_exists($this->form_trigger,$_REQUEST)) {
-				$key = sprintf($this->form_prefix,$k);
-				$visibility = !array_key_exists($key,$_REQUEST) ? false : true;
-			}
-			$v->setVisibility($visibility);
-			$user_pref[$k] = $visibility;
-		}
-		
-		if (array_key_exists($this->form_trigger,$_REQUEST)) {
-			$this->core->auth->user_prefs->lists->put($this->context,serialize($user_pref),'string');
-		}
-	}
-	
-	public function getColumnsForm()
-	{
-		$block = 
-		'<h3>'.__('Displayed information').'</h3>'.
-		'<ul>%s</ul>';
-		
-		$list = array();
-		
-		foreach ($this->columns[$this->context] as $k => $v) {
-			$col_id = sprintf($this->form_prefix,$k);
-			$col_label = sprintf('<label for="%s">%s</label>',$col_id,$v->getInfo('title'));
-			$col_html = sprintf('<li class="line">%s</li>',$col_label.form::checkbox($col_id,1,$v->isVisible()));
-			
-			array_push($list,$col_html);
-		}
-		
-		return !empty($list) ? sprintf($block,implode('',$list)) : '';
-	}
-	
+	}
+}
+
+class adminPostList extends adminGenericList
+{
 	public function display($page,$nb_per_page,$enclose_block='')
 	{
@@ -204,13 +43,14 @@
 			$pager->var_page = 'page';
 			
-			$html_block = '<table class="maximal clear"><tr>';
-			
-			foreach ($this->columns[$this->context] as $k => $v) {
-				if ($v->isVisible()) {
-					$html_block .= sprintf('<th%s>%s</th>',$v->getInfo('html'),$v->getInfo('title'));
-				}
-			}
-			
-			$html_block .= '</tr>%s</table>';
+			$html_block =
+			'<table class="clear"><tr>'.
+			'<th colspan="2">'.__('Title').'</th>'.
+			'<th>'.__('Date').'</th>'.
+			'<th>'.__('Category').'</th>'.
+			'<th>'.__('Author').'</th>'.
+			'<th>'.__('Comments').'</th>'.
+			'<th>'.__('Trackbacks').'</th>'.
+			'<th>'.__('Status').'</th>'.
+			'</tr>%s</table>';
 			
 			if ($enclose_block) {
@@ -226,5 +66,5 @@
 			while ($this->rs->fetch())
 			{
-				echo $this->displayLine();
+				echo $this->postLine();
 			}
 			
@@ -235,49 +75,5 @@
 	}
 	
-	private function displayLine()
-	{
-		$res = '';
-		
-		foreach ($this->columns[$this->context] as $k => $v) {
-			if ($v->isVisible()) {
-				$c = $v->getInfo('callback');
-				$func = $c[1];
-				$res .= $this->{$c[1]}();
-			}
-		}
-		
-		return sprintf($this->getDefaultLine(),$res);
-	}
-	
-	protected function getDefaultLine()
-	{
-		return '<tr class="line">%s</tr>';
-	}
-}
-
-class adminPostList extends adminGenericList
-{
-	protected function getDefaultLine()
-	{
-		return
-		'<tr class="line'.($this->rs->post_status != 1 ? ' offline' : '').'"'.
-		' id="p'.$this->rs->post_id.'">%s</tr>';
-	}
-	
-	protected function getTitle()
-	{
-		return
-		'<td class="maximal">'.
-		form::checkbox(array('entries[]'),$this->rs->post_id,'','','',!$this->rs->isEditable()).'&nbsp'.
-		'<a href="'.$this->core->getPostAdminURL($this->rs->post_type,$this->rs->post_id).'">'.
-		html::escapeHTML($this->rs->post_title).'</a></td>';
-	}
-	
-	protected function getDate()
-	{
-		return '<td class="nowrap">'.dt::dt2str(__('%Y-%m-%d %H:%M'),$this->rs->post_dt).'</td>';
-	}
-	
-	protected function getCategory()
+	private function postLine()
 	{
 		if ($this->core->auth->check('categories',$this->core->blog->id)) {
@@ -294,24 +90,4 @@
 		}
 		
-		return '<td class="nowrap">'.$cat_title.'</td>';
-	}
-	
-	protected function getAuthor()
-	{
-		return '<td class="nowrap">'.$this->rs->user_id.'</td>';
-	}
-	
-	protected function getComments()
-	{
-		return '<td class="nowrap">'.$this->rs->nb_comment.'</td>';
-	}
-	
-	protected function getTrackbacks()
-	{
-		return '<td class="nowrap">'.$this->rs->nb_trackback.'</td>';
-	}
-	
-	protected function getStatus()
-	{
 		$img = '<img alt="%1$s" title="%1$s" src="images/%2$s" />';
 		switch ($this->rs->post_status) {
@@ -347,18 +123,116 @@
 		}
 		
-		return '<td class="nowrap status">'.$img_status.' '.$selected.' '.$protected.' '.$attach.'</td>';
+		$res = '<tr class="line'.($this->rs->post_status != 1 ? ' offline' : '').'"'.
+		' id="p'.$this->rs->post_id.'">';
+		
+		$res .=
+		'<td class="nowrap">'.
+		form::checkbox(array('entries[]'),$this->rs->post_id,'','','',!$this->rs->isEditable()).'</td>'.
+		'<td class="maximal"><a href="'.$this->core->getPostAdminURL($this->rs->post_type,$this->rs->post_id).'">'.
+		html::escapeHTML($this->rs->post_title).'</a></td>'.
+		'<td class="nowrap">'.dt::dt2str(__('%Y-%m-%d %H:%M'),$this->rs->post_dt).'</td>'.
+		'<td class="nowrap">'.$cat_title.'</td>'.
+		'<td class="nowrap">'.$this->rs->user_id.'</td>'.
+		'<td class="nowrap">'.$this->rs->nb_comment.'</td>'.
+		'<td class="nowrap">'.$this->rs->nb_trackback.'</td>'.
+		'<td class="nowrap status">'.$img_status.' '.$selected.' '.$protected.' '.$attach.'</td>'.
+		'</tr>';
+		
+		return $res;
 	}
 }
 
-class adminPostMiniList extends adminPostList
+class adminPostMiniList extends adminGenericList
 {
-	protected function getTitle()
-	{
-		return
-		'<td class="maximal">'.
-		form::checkbox(array('entries[]'),$this->rs->post_id,'','','',!$this->rs->isEditable()).'&nbsp'.
-		'<a href="'.$this->core->getPostAdminURL($this->rs->post_type,$this->rs->post_id).'" '.
+	public function display($page,$nb_per_page,$enclose_block='')
+	{
+		if ($this->rs->isEmpty())
+		{
+			echo '<p><strong>'.__('No entry').'</strong></p>';
+		}
+		else
+		{
+			$pager = new pager($page,$this->rs_count,$nb_per_page,10);
+			$pager->html_prev = $this->html_prev;
+			$pager->html_next = $this->html_next;
+			$pager->var_page = 'page';
+			
+			$html_block =
+			'<table class="clear"><tr>'.
+			'<th>'.__('Title').'</th>'.
+			'<th>'.__('Date').'</th>'.
+			'<th>'.__('Author').'</th>'.
+			'<th>'.__('Status').'</th>'.
+			'</tr>%s</table>';
+			
+			if ($enclose_block) {
+				$html_block = sprintf($enclose_block,$html_block);
+			}
+			
+			echo '<p>'.__('Page(s)').' : '.$pager->getLinks().'</p>';
+			
+			$blocks = explode('%s',$html_block);
+			
+			echo $blocks[0];
+			
+			while ($this->rs->fetch())
+			{
+				echo $this->postLine();
+			}
+			
+			echo $blocks[1];
+			
+			echo '<p>'.__('Page(s)').' : '.$pager->getLinks().'</p>';
+		}
+	}
+	
+	private function postLine()
+	{
+		$img = '<img alt="%1$s" title="%1$s" src="images/%2$s" />';
+		switch ($this->rs->post_status) {
+			case 1:
+				$img_status = sprintf($img,__('published'),'check-on.png');
+				break;
+			case 0:
+				$img_status = sprintf($img,__('unpublished'),'check-off.png');
+				break;
+			case -1:
+				$img_status = sprintf($img,__('scheduled'),'scheduled.png');
+				break;
+			case -2:
+				$img_status = sprintf($img,__('pending'),'check-wrn.png');
+				break;
+		}
+		
+		$protected = '';
+		if ($this->rs->post_password) {
+			$protected = sprintf($img,__('protected'),'locker.png');
+		}
+		
+		$selected = '';
+		if ($this->rs->post_selected) {
+			$selected = sprintf($img,__('selected'),'selected.png');
+		}
+		
+		$attach = '';
+		$nb_media = $this->rs->countMedia();
+		if ($nb_media > 0) {
+			$attach_str = $nb_media == 1 ? __('%d attachment') : __('%d attachments');
+			$attach = sprintf($img,sprintf($attach_str,$nb_media),'attach.png');
+		}
+		
+		$res = '<tr class="line'.($this->rs->post_status != 1 ? ' offline' : '').'"'.
+		' id="p'.$this->rs->post_id.'">';
+		
+		$res .=
+		'<td class="maximal"><a href="'.$this->core->getPostAdminURL($this->rs->post_type,$this->rs->post_id).'" '.
 		'title="'.html::escapeHTML($this->rs->getURL()).'">'.
-		html::escapeHTML($this->rs->post_title).'</a></td>';
+		html::escapeHTML($this->rs->post_title).'</a></td>'.
+		'<td class="nowrap">'.dt::dt2str(__('%Y-%m-%d %H:%M'),$this->rs->post_dt).'</td>'.
+		'<td class="nowrap">'.$this->rs->user_id.'</td>'.
+		'<td class="nowrap status">'.$img_status.' '.$selected.' '.$protected.' '.$attach.'</td>'.
+		'</tr>';
+		
+		return $res;
 	}
 }
@@ -366,29 +240,49 @@
 class adminCommentList extends adminGenericList
 {
-	protected function getDefaultLine()
-	{
-		return
-		'<tr class="line'.($this->rs->comment_status != 1 ? ' offline' : '').'"'.
-		' id="c'.$this->rs->comment_id.'">%s</tr>';
+	public function display($page,$nb_per_page,$enclose_block='')
+	{
+		if ($this->rs->isEmpty())
+		{
+			echo '<p><strong>'.__('No comment').'</strong></p>';
+		}
+		else
+		{
+			$pager = new pager($page,$this->rs_count,$nb_per_page,10);
+			$pager->html_prev = $this->html_prev;
+			$pager->html_next = $this->html_next;
+			$pager->var_page = 'page';
+			
+			$html_block =
+			'<table><tr>'.
+			'<th colspan="2">'.__('Title').'</th>'.
+			'<th>'.__('Date').'</th>'.
+			'<th>'.__('Author').'</th>'.
+			'<th>'.__('Type').'</th>'.
+			'<th>'.__('Status').'</th>'.
+			'<th>&nbsp;</th>'.
+			'</tr>%s</table>';
+			
+			if ($enclose_block) {
+				$html_block = sprintf($enclose_block,$html_block);
+			}
+			
+			echo '<p>'.__('Page(s)').' : '.$pager->getLinks().'</p>';
+			
+			$blocks = explode('%s',$html_block);
+			
+			echo $blocks[0];
+			
+			while ($this->rs->fetch())
+			{
+				echo $this->commentLine();
+			}
+			
+			echo $blocks[1];
+			
+			echo '<p>'.__('Page(s)').' : '.$pager->getLinks().'</p>';
+		}
 	}
 	
-	protected function getTitle()
-	{
-		$post_url = $this->core->getPostAdminURL($this->rs->post_type,$this->rs->post_id);
-		
-		return
-		'<td class="maximal">'.
-		form::checkbox(array('comments[]'),$this->rs->comment_id,'','','',0).'&nbsp'.
-		'<a href="'.$post_url.'">'.
-		html::escapeHTML($this->rs->post_title).'</a>'.
-		($this->rs->post_type != 'post' ? ' ('.html::escapeHTML($this->rs->post_type).')' : '').'</td>';
-	}
-	
-	protected function getDate()
-	{
-		return '<td class="nowrap">'.dt::dt2str(__('%Y-%m-%d %H:%M'),$this->rs->comment_dt).'</td>';
-	}
-	
-	protected function getAuthor()
+	private function commentLine()
 	{
 		global $author, $status, $sortby, $order, $nb_per_page;
@@ -401,19 +295,12 @@
 		'&amp;author='.rawurlencode($this->rs->comment_author);
 		
-		$comment_author = html::escapeHTML($this->rs->comment_author);
-		if (mb_strlen($comment_author) > 20) {
-			$comment_author = mb_strcut($comment_author,0,17).'...';
-		}
-		
-		return '<td class="nowrap"><a href="'.$author_url.'">'.$comment_author.'</a></td>';
-	}
-	
-	protected function getType()
-	{
-		return '<td class="nowrap">'.($this->rs->comment_trackback ? __('trackback') : __('comment')).'</td>';
-	}
-	
-	protected function getStatus()
-	{
+		$post_url = $this->core->getPostAdminURL($this->rs->post_type,$this->rs->post_id);
+		
+		$comment_url = 'comment.php?id='.$this->rs->comment_id;
+		
+		$comment_dt =
+		dt::dt2str($this->core->blog->settings->system->date_format.' - '.
+		$this->core->blog->settings->system->time_format,$this->rs->comment_dt);
+		
 		$img = '<img alt="%1$s" title="%1$s" src="images/%2$s" />';
 		switch ($this->rs->comment_status) {
@@ -432,14 +319,28 @@
 		}
 		
-		return '<td class="nowrap status">'.$img_status.'</td>';
-	}
-	
-	protected function getEdit()
-	{
-		$comment_url = 'comment.php?id='.$this->rs->comment_id;
-		
-		return
+		$comment_author = html::escapeHTML($this->rs->comment_author);
+		if (mb_strlen($comment_author) > 20) {
+			$comment_author = mb_strcut($comment_author,0,17).'...';
+		}
+		
+		$res = '<tr class="line'.($this->rs->comment_status != 1 ? ' offline' : '').'"'.
+		' id="c'.$this->rs->comment_id.'">';
+		
+		$res .=
+		'<td class="nowrap">'.
+		form::checkbox(array('comments[]'),$this->rs->comment_id,'','','',0).'</td>'.
+		'<td class="maximal"><a href="'.$post_url.'">'.
+		html::escapeHTML($this->rs->post_title).'</a>'.
+		($this->rs->post_type != 'post' ? ' ('.html::escapeHTML($this->rs->post_type).')' : '').'</td>'.
+		'<td class="nowrap">'.dt::dt2str(__('%Y-%m-%d %H:%M'),$this->rs->comment_dt).'</td>'.
+		'<td class="nowrap"><a href="'.$author_url.'">'.$comment_author.'</a></td>'.
+		'<td class="nowrap">'.($this->rs->comment_trackback ? __('trackback') : __('comment')).'</td>'.
+		'<td class="nowrap status">'.$img_status.'</td>'.
 		'<td class="nowrap status"><a href="'.$comment_url.'">'.
 		'<img src="images/edit-mini.png" alt="" title="'.__('Edit this comment').'" /></a></td>';
+		
+		$res .= '</tr>';
+		
+		return $res;
 	}
 }
@@ -447,5 +348,48 @@
 class adminUserList extends adminGenericList
 {
-	protected function getUserName()
+	public function display($page,$nb_per_page,$enclose_block='')
+	{
+		if ($this->rs->isEmpty())
+		{
+			echo '<p><strong>'.__('No user').'</strong></p>';
+		}
+		else
+		{
+			$pager = new pager($page,$this->rs_count,$nb_per_page,10);
+			$pager->html_prev = $this->html_prev;
+			$pager->html_next = $this->html_next;
+			$pager->var_page = 'page';
+			
+			$html_block =
+			'<table class="clear"><tr>'.
+			'<th colspan="2">'.__('Username').'</th>'.
+			'<th>'.__('First Name').'</th>'.
+			'<th>'.__('Last Name').'</th>'.
+			'<th>'.__('Display name').'</th>'.
+			'<th class="nowrap">'.__('Entries').'</th>'.
+			'</tr>%s</table>';
+			
+			if ($enclose_block) {
+				$html_block = sprintf($enclose_block,$html_block);
+			}
+			
+			echo '<p>'.__('Page(s)').' : '.$pager->getLinks().'</p>';
+			
+			$blocks = explode('%s',$html_block);
+			
+			echo $blocks[0];
+			
+			while ($this->rs->fetch())
+			{
+				echo $this->userLine();
+			}
+			
+			echo $blocks[1];
+			
+			echo '<p>'.__('Page(s)').' : '.$pager->getLinks().'</p>';
+		}
+	}
+	
+	private function userLine()
 	{
 		$img = '<img alt="%1$s" title="%1$s" src="images/%2$s" />';
@@ -460,34 +404,17 @@
 			$img_status = sprintf($img,__('superadmin'),'superadmin.png');
 		}
-		
 		return
-		'<td class="maximal">'.form::hidden(array('nb_post[]'),(integer) $this->rs->nb_post).
-		form::checkbox(array('user_id[]'),$this->rs->user_id).'&nbsp;'.
-		'<a href="user.php?id='.$this->rs->user_id.'">'.
-		$this->rs->user_id.'</a>&nbsp;'.$img_status.'</td>';
-	}
-	
-	protected function getFirstName()
-	{
-		return '<td class="nowrap">'.$this->rs->user_firstname.'</td>';
-	}
-	
-	protected function getLastName()
-	{
-		return '<td class="nowrap">'.$this->rs->user_name.'</td>';
-	}
-	
-	protected function getDisplayName()
-	{
-		return '<td class="nowrap">'.$this->rs->user_displayname.'</td>';
-	}
-	
-	protected function getEntries()
-	{
-		return
+		'<tr class="line">'.
+		'<td class="nowrap">'.form::hidden(array('nb_post[]'),(integer) $this->rs->nb_post).
+		form::checkbox(array('user_id[]'),$this->rs->user_id).'</td>'.
+		'<td class="maximal"><a href="user.php?id='.$this->rs->user_id.'">'.
+		$this->rs->user_id.'</a>&nbsp;'.$img_status.'</td>'.
+		'<td class="nowrap">'.$this->rs->user_firstname.'</td>'.
+		'<td class="nowrap">'.$this->rs->user_name.'</td>'.
+		'<td class="nowrap">'.$this->rs->user_displayname.'</td>'.
 		'<td class="nowrap"><a href="posts.php?user_id='.$this->rs->user_id.'">'.
-		$this->rs->nb_post.'</a></td>';
+		$this->rs->nb_post.'</a></td>'.
+		'</tr>';
 	}
 }
-
 ?>
Index: inc/admin/prepend.php
===================================================================
--- inc/admin/prepend.php	(revision 185)
+++ inc/admin/prepend.php	(revision 324)
@@ -4,5 +4,5 @@
 # This file is part of Dotclear 2.
 #
-# Copyright (c) 2003-2010 Olivier Meunier & Association Dotclear
+# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
 # Licensed under the GPL version 2.0 license.
 # See LICENSE file or
@@ -185,43 +185,43 @@
 	# NB : '*' in permissions means any, null means super admin only
 	
-	$_fav['prefs'] = new ArrayObject(array('prefs',__('My preferences'),'preferences.php',
+	$_fav['prefs'] = new ArrayObject(array('prefs','My preferences','preferences.php',
 		'images/menu/user-pref.png','images/menu/user-pref-b.png',
 		'*',null,null));
 
-	$_fav['new_post'] = new ArrayObject(array('new_post',__('New entry'),'post.php',
+	$_fav['new_post'] = new ArrayObject(array('new_post','New entry','post.php',
 		'images/menu/edit.png','images/menu/edit-b.png',
 		'usage,contentadmin',null,'menu-new-post'));
-	$_fav['posts'] = new ArrayObject(array('posts',__('Entries'),'posts.php',
+	$_fav['posts'] = new ArrayObject(array('posts','Entries','posts.php',
 		'images/menu/entries.png','images/menu/entries-b.png',
 		'usage,contentadmin',null,null));
-	$_fav['comments'] = new ArrayObject(array('comments',__('Comments'),'comments.php',
+	$_fav['comments'] = new ArrayObject(array('comments','Comments','comments.php',
 		'images/menu/comments.png','images/menu/comments-b.png',
 		'usage,contentadmin',null,null));
-	$_fav['search'] = new ArrayObject(array('search',__('Search'),'search.php',
+	$_fav['search'] = new ArrayObject(array('search','Search','search.php',
 		'images/menu/search.png','images/menu/search-b.png',
 		'usage,contentadmin',null,null));
-	$_fav['categories'] = new ArrayObject(array('categories',__('Categories'),'categories.php',
+	$_fav['categories'] = new ArrayObject(array('categories','Categories','categories.php',
 		'images/menu/categories.png','images/menu/categories-b.png',
 		'categories',null,null));
-	$_fav['media'] = new ArrayObject(array('media',__('Media manager'),'media.php',
+	$_fav['media'] = new ArrayObject(array('media','Media manager','media.php',
 		'images/menu/media.png','images/menu/media-b.png',
 		'media,media_admin',null,null));
-	$_fav['blog_pref'] = new ArrayObject(array('blog_pref',__('Blog settings'),'blog_pref.php',
+	$_fav['blog_pref'] = new ArrayObject(array('blog_pref','Blog settings','blog_pref.php',
 		'images/menu/blog-pref.png','images/menu/blog-pref-b.png',
 		'admin',null,null));
-	$_fav['blog_theme'] = new ArrayObject(array('blog_theme',__('Blog appearance'),'blog_theme.php',
+	$_fav['blog_theme'] = new ArrayObject(array('blog_theme','Blog appearance','blog_theme.php',
 		'images/menu/themes.png','images/menu/blog-theme-b.png',
 		'admin',null,null));
 
-	$_fav['blogs'] = new ArrayObject(array('blogs',__('Blogs'),'blogs.php',
+	$_fav['blogs'] = new ArrayObject(array('blogs','Blogs','blogs.php',
 		'images/menu/blogs.png','images/menu/blogs-b.png',
 		'usage,contentadmin',null,null));
-	$_fav['users'] = new ArrayObject(array('users',__('Users'),'users.php',
+	$_fav['users'] = new ArrayObject(array('users','Users','users.php',
 		'images/menu/users.png','images/menu/users-b.png',
 		null,null,null));
-	$_fav['plugins'] = new ArrayObject(array('plugins',__('Plugins'),'plugins.php',
+	$_fav['plugins'] = new ArrayObject(array('plugins','Plugins','plugins.php',
 		'images/menu/plugins.png','images/menu/plugins-b.png',
 		null,null,null));
-	$_fav['langs'] = new ArrayObject(array('langs',__('Languages'),'langs.php',
+	$_fav['langs'] = new ArrayObject(array('langs','Languages','langs.php',
 		'images/menu/langs.png','images/menu/langs-b.png',
 		null,null,null));
@@ -311,5 +311,5 @@
 			$count++;
 			$fav = unserialize($v['value']);
-			$_menu['Favorites']->addItem($fav['title'],$fav['url'],$fav['small-icon'],
+			$_menu['Favorites']->addItem(__($fav['title']),$fav['url'],$fav['small-icon'],
 				preg_match(dc_prepare_url($fav['url']),$_SERVER['REQUEST_URI']),
 				(($fav['permissions'] == '*') || $core->auth->check($fav['permissions'],$core->blog->id)),$fav['id'],$fav['class']);
@@ -321,5 +321,5 @@
 			$count++;
 			$fav = unserialize($v['value']);
-			$_menu['Favorites']->addItem($fav['title'],$fav['url'],$fav['small-icon'],
+			$_menu['Favorites']->addItem(__($fav['title']),$fav['url'],$fav['small-icon'],
 				preg_match(dc_prepare_url($fav['url']),$_SERVER['REQUEST_URI']),
 				(($fav['permissions'] == '*') || $core->auth->check($fav['permissions'],$core->blog->id)),$fav['id'],$fav['class']);
