Index: .hgignore
===================================================================
--- .hgignore	(revision 436)
+++ .hgignore	(revision 358)
@@ -1,7 +1,4 @@
 cache
+public
 inc/config.php
 \.htaccess
-public/filters
-themes/ductile/_work
-themes/ductile-work
-themes/ductile/default-templates
Index: .hgsubstate
===================================================================
--- .hgsubstate	(revision 319)
+++ .hgsubstate	(revision 397)
@@ -1,1 +1,1 @@
-1cc382ff3769ffada45081fb878a28ed6d2f5f9f inc/libs/clearbricks
+b2111d3376a5700ef9b6ceee36de1b5a76953995 inc/libs/clearbricks
Index: .hgtags
===================================================================
--- .hgtags	(revision 279)
+++ .hgtags	(revision 369)
@@ -1,1 +1,2 @@
 ec077f3c6b20bc6f7f40a113acaff0220457a2c4 2.3.0
+4e0137ddb12474d62b88c4966d5895a391b6d382 2.3.1
Index: CHANGELOG
===================================================================
--- CHANGELOG	(revision 278)
+++ CHANGELOG	(revision 372)
@@ -1,2 +1,15 @@
+Dotclear 2.4.0 - ongoing dev
+===========================================================
+* handling of postgres non default schemas (db_prefix = 'schema.prefix')
+
+Dotclear 2.3.1 - 2001-06-14
+===========================================================
+* Updated makefile for cleaner distrib.
+* Better localization handling for prefs and shortcuts.
+* Misc JS & CSS cleaning.
+* Import/Export preferences-related bugfix.
+* Administrative mail address is now configurable.
+* Security: one minor fix and changes for two potential problems. Thanks to Jeremie Boutoille
+
 Dotclear 2.3.0 - 2011-05-16
 ===========================================================
Index: Makefile
===================================================================
--- Makefile	(revision 285)
+++ Makefile	(revision 415)
@@ -25,4 +25,8 @@
 	## Remove .svn folders
 	find ./$(DIST)/ -type d -name '.svn' | xargs rm -rf
+
+	## Remove .hg* files and folders
+	find ./$(DIST)/ -type d -name '.hg*' | xargs rm -rf
+	find ./$(DIST)/ -type f -name '.hg*' | xargs rm -rf
 	
 	## Remove config file if any
@@ -34,4 +38,5 @@
 	./plugins/akismet \
 	./plugins/antispam \
+	./plugins/attachments \
 	./plugins/blogroll \
 	./plugins/blowupConfig \
@@ -50,4 +55,8 @@
 	find ./$(DIST)/ -type d -name '.svn' -print0 | xargs -0 rm -rf
 	
+	## Remove .hg* files and folders
+	find ./$(DIST)/ -type d -name '.hg*' | xargs rm -rf
+	find ./$(DIST)/ -type f -name '.hg*' | xargs rm -rf
+
 	## "Compile" .po files
 	./build-tools/make-l10n.php ./$(DC)/
Index: admin/auth.php
===================================================================
--- admin/auth.php	(revision 270)
+++ admin/auth.php	(revision 454)
@@ -22,5 +22,6 @@
 # That's a tricky hack but it works ;)
 $dlang = http::getAcceptLanguage();
-if ($dlang != 'en')
+$dlang = ($dlang == '' ? 'en' : $dlang);
+if ($dlang != 'en' && preg_match('/^[a-z]{2}(-[a-z]{2})?$/',$dlang))
 {
 	l10n::set(dirname(__FILE__).'/../locales/'.$dlang.'/main');
@@ -89,5 +90,5 @@
 		$page_url.'?akey='.$recover_key;
 		
-		$headers[] = 'From: dotclear@'.$_SERVER['HTTP_HOST'];
+		$headers[] = 'From: '.(defined('DC_ADMIN_MAILFROM') && DC_ADMIN_MAILFROM ? DC_ADMIN_MAILFROM : 'dotclear@local');
 		$headers[] = 'Content-Type: text/plain; charset=UTF-8;';
 		
@@ -125,6 +126,21 @@
 }
 # Change password and retry to log
-elseif ($change_pwd and $data = unserialize(base64_decode($_POST['login_data'])))
-{
+elseif ($change_pwd)
+{
+	try
+	{
+		$tmp_data = explode('/',$_POST['login_data']);
+		if (count($tmp_data) != 3) {
+			throw new Exception();
+		}
+		$data = array(
+			'user_id'=>base64_decode($tmp_data[0]),
+			'cookie_admin'=>$tmp_data[1],
+			'user_remember'=>$tmp_data[2]=='1'
+		);
+		if ($data['user_id'] === false) {
+			throw new Exception();
+		}
+		
 	# Check login informations
 	$check_user = false;
@@ -141,6 +157,4 @@
 	}
 	
-	try
-	{
 		if (!$core->auth->allowPassChange() || !$check_user) {
 			$change_pwd = false;
@@ -165,9 +179,5 @@
 		$_SESSION['sess_browser_uid'] = http::browserUID(DC_MASTER_KEY);
 		
-		if (!empty($data['blog_id'])) {
-			$_SESSION['sess_blog_id'] = $data['blog_id'];
-		}
-		
-		if (!empty($data['user_remember']))
+		if ($data['user_remember'])
 		{
 			setcookie('dc_admin',$data['cookie_admin'],strtotime('+15 days'),'','',DC_ADMIN_SSL);
@@ -192,10 +202,9 @@
 	if ($check_user && $core->auth->mustChangePassword())
 	{
-		$login_data = base64_encode(serialize(array(
-			'user_id'=>$user_id,
-			'cookie_admin'=>$cookie_admin,
-			'blog_id'=>(!empty($_POST['blog']) ? $_POST['blog'] : ''),
-			'user_remember'=>!empty($_POST['user_remember'])
-		)));
+		$login_data = join('/',array(
+			base64_encode($user_id),
+			$cookie_admin,
+			empty($_POST['user_remember'])?'0':'1'
+		));
 		
 		if (!$core->auth->allowPassChange()) {
@@ -248,10 +257,10 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml"
-xml:lang="en" lang="en">
+xml:lang="<?php echo $dlang; ?>" lang="<?php echo $dlang; ?>">
 <head>
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
   <meta http-equiv="Content-Script-Type" content="text/javascript" />
   <meta http-equiv="Content-Style-Type" content="text/css" />
-  <meta http-equiv="Content-Language" content="en" />
+  <meta http-equiv="Content-Language" content="<?php echo $dlang; ?>" />
   <meta name="ROBOTS" content="NOARCHIVE,NOINDEX,NOFOLLOW" />
   <meta name="GOOGLEBOT" content="NOSNIPPET" />
@@ -295,5 +304,5 @@
     if ($.cookie('dc_admin_test_cookie')) {
       $('#cookie_help').hide();
-      $.cookie('dc_admin_test_cookie', '', {expires: -1});
+      $.cookie('dc_admin_test_cookie', '', {'expires': -1});
     } else {
       $('#cookie_help').show();
@@ -327,10 +336,10 @@
 	'<fieldset><legend>'.__('Request a new password').'</legend>'.
 	'<p><label for="user_id">'.__('Username:').' '.
-	form::field(array('user_id','user_id'),20,32,html::escapeHTML($user_id),'',1).'</label></p>'.
+	form::field(array('user_id','user_id'),20,32,html::escapeHTML($user_id)).'</label></p>'.
 	
 	'<p><label for="user_email">'.__('Email:').' '.
-	form::field(array('user_email','user_email'),20,255,html::escapeHTML($user_email),'',2).'</label></p>'.
-	
-	'<p><input type="submit" value="'.__('recover').'" tabindex="3" />'.
+	form::field(array('user_email','user_email'),20,255,html::escapeHTML($user_email)).'</label></p>'.
+	
+	'<p><input type="submit" value="'.__('recover').'" />'.
 	form::hidden(array('recover'),1).'</p>'.
 	'</fieldset>'.
@@ -344,8 +353,8 @@
 	'<fieldset><legend>'.__('Change your password').'</legend>'.
 	'<p><label for="new_pwd">'.__('New password:').' '.
-	form::password(array('new_pwd','new_pwd'),20,255,'','',1).'</label></p>'.
+	form::password(array('new_pwd','new_pwd'),20,255).'</label></p>'.
 	
 	'<p><label for="new_pwd_c">'.__('Confirm password:').' '.
-	form::password(array('new_pwd_c','new_pwd_c'),20,255,'','',2).'</label></p>'.
+	form::password(array('new_pwd_c','new_pwd_c'),20,255).'</label></p>'.
 	'</fielset>'.
 	
@@ -373,14 +382,14 @@
 		echo
 		'<p><label for="user_id">'.__('Username:').' '.
-		form::field(array('user_id','user_id'),20,32,html::escapeHTML($user_id),'',1).'</label></p>'.
+		form::field(array('user_id','user_id'),20,32,html::escapeHTML($user_id)).'</label></p>'.
 		
 		'<p><label for="user_pwd">'.__('Password:').' '.
-		form::password(array('user_pwd','user_pwd'),20,255,'','',2).'</label></p>'.
+		form::password(array('user_pwd','user_pwd'),20,255).'</label></p>'.
 		
 		'<p><label for="user_remember" class="classic">'.
-		form::checkbox(array('user_remember','user_remember'),1,'','',3).' '.
+		form::checkbox(array('user_remember','user_remember'),1).' '.
 		__('Remember my ID on this computer').'</label></p>'.
 		
-		'<p><input type="submit" value="'.__('log in').'" tabindex="4" /></p>';
+		'<p><input type="submit" value="'.__('log in').'" /></p>';
 		
 		if (!empty($_REQUEST['blog'])) {
Index: admin/blog_theme.php
===================================================================
--- admin/blog_theme.php	(revision 434)
+++ admin/blog_theme.php	(revision 465)
@@ -156,5 +156,9 @@
 	
 	$radio_id = 'theme_'.html::escapeHTML($id);
-	$theme_url = http::concatURL($core->blog->url,$core->blog->settings->system->themes_url.'/'.$id);
+	if (preg_match('#^http(s)?://#',$core->blog->settings->system->themes_url)) {
+		$theme_url = http::concatURL($core->blog->settings->system->themes_url,'/'.$id);
+	} else {
+		$theme_url = http::concatURL($core->blog->url,$core->blog->settings->system->themes_url.'/'.$id);
+	}
 	$has_conf = file_exists(path::real($core->blog->themes_path.'/'.$id).'/_config.php');
 	$has_css = file_exists(path::real($core->blog->themes_path.'/'.$id).'/style.css');
@@ -334,17 +338,18 @@
 	try
 	{
-		# Let theme configuration set their own form(s)
-		$managed = (boolean) $core->callBehavior('adminThemeConfigManaged');
-		
-		if (!$managed)
+		# Let theme configuration set their own form(s) if required
+		$standalone_config = (boolean) $core->themes->moduleInfo($core->blog->settings->system->theme,'standalone_config');
+
+		if (!$standalone_config)
 			echo '<form id="theme_config" action="blog_theme.php?conf=1" method="post" enctype="multipart/form-data">';
 
 		include $theme_conf_file;
 
-		if (!$managed)
+		if (!$standalone_config)
 			echo
 			'<p class="clear"><input type="submit" value="'.__('Save').'" />'.
 			$core->formNonce().'</p>'.
 			'</form>';
+
 	}
 	catch (Exception $e)
Index: admin/category.php
===================================================================
--- admin/category.php	(revision 270)
+++ admin/category.php	(revision 454)
@@ -185,5 +185,5 @@
 '<fieldset><legend>'.__('Category information').'</legend>'.
 '<p><label class="required" for="cat_title"><abbr title="'.__('Required field').'">*</abbr> '.__('Title:').' '.
-form::field('cat_title',40,255,html::escapeHTML($cat_title),'',2).
+form::field('cat_title',40,255,html::escapeHTML($cat_title)).
 '</label></p>';
 if (!$cat_id)
@@ -192,5 +192,5 @@
 	echo
 	'<p><label for="new_cat_parent">'.__('Parent:').' '.
-	'<select id="new_cat_parent" name="new_cat_parent" tabindex="3">'.
+	'<select id="new_cat_parent" name="new_cat_parent" >'.
 	'<option value="0">'.__('Top level').'</option>';
 	while ($rs->fetch()) {
@@ -204,5 +204,5 @@
 echo
 '<div class="lockable">'.
-'<p><label for="cat_url">'.__('URL:').' '.form::field('cat_url',40,255,html::escapeHTML($cat_url),'',4).
+'<p><label for="cat_url">'.__('URL:').' '.form::field('cat_url',40,255,html::escapeHTML($cat_url)).
 '</label></p>'.
 '<p class="form-note warn" id="note-cat-url">'.
@@ -211,8 +211,8 @@
 
 '<p class="area"><label for="cat_desc">'.__('Description:').'</label> '.
-form::textarea('cat_desc',50,8,html::escapeHTML($cat_desc),'',5).
+form::textarea('cat_desc',50,8,html::escapeHTML($cat_desc)).
 '</p>'.
 
-'<p><input type="submit" accesskey="s" value="'.__('Save').'" tabindex="5" />'.
+'<p><input type="submit" accesskey="s" value="'.__('Save').'" />'.
 ($cat_id ? form::hidden('id',$cat_id) : '').
 $core->formNonce().
@@ -232,5 +232,5 @@
 	'<p><label for="cat_parent" class="classic">'.__('Parent:').' '.
 	form::combo('cat_parent',$allowed_parents,$cat_parent).'</label></p>'.
-	'<p><input type="submit" accesskey="s" value="'.__('Save').'" tabindex="5" />'.
+	'<p><input type="submit" accesskey="s" value="'.__('Save').'" />'.
 	form::hidden(array('id'),$cat_id).$core->formNonce().'</p>'.
 	'</fieldset>'.
@@ -246,5 +246,5 @@
 		form::combo('cat_move',array(__('before')=>'before',__('after')=>'after'),'','','',false,'title="'.__('position: ').'"').' '.
 		form::combo('cat_sibling',$siblings).'</p>'.
-		'<p><input type="submit" accesskey="s" value="'.__('Save').'" tabindex="5" />'.
+		'<p><input type="submit" accesskey="s" value="'.__('Save').'" />'.
 		form::hidden(array('id'),$cat_id).$core->formNonce().'</p>'.
 		'</fieldset>'.
Index: admin/index.php
===================================================================
--- admin/index.php	(revision 270)
+++ admin/index.php	(revision 471)
@@ -84,5 +84,5 @@
 			$title = ($fav['name'] == 'posts' ? sprintf($str_entries,$post_count) : 
 				($fav['name'] == 'comments' ? sprintf($str_comments,$comment_count) : $fav['title']));
-			$__dashboard_icons[$fav['name']] = new ArrayObject(array($title,$fav['url'],$fav['large-icon']));
+			$__dashboard_icons[$fav['name']] = new ArrayObject(array(__($title),$fav['url'],$fav['large-icon']));
 
 			# Let plugins set their own title for favorite on dashboard
@@ -99,5 +99,5 @@
 			$title = ($fav['name'] == 'posts' ? sprintf($str_entries,$post_count) : 
 				($fav['name'] == 'comments' ? sprintf($str_comments,$comment_count) : $fav['title']));
-			$__dashboard_icons[$fav['name']] = new ArrayObject(array($title,$fav['url'],$fav['large-icon']));
+			$__dashboard_icons[$fav['name']] = new ArrayObject(array(__($title),$fav['url'],$fav['large-icon']));
 
 			# Let plugins set their own title for favorite on dashboard
@@ -201,8 +201,15 @@
 }
 
-if (!DC_ADMIN_URL) {
+if (!defined('DC_ADMIN_URL') || !DC_ADMIN_URL) {
 	echo
 	'<p class="static-msg">'.
-	__('DC_ADMIN_URL is not defined, you should edit your configuration file.').
+	'DC_ADMIN_URL '.__('is not defined, you should edit your configuration file.').
+	'</p>';
+}
+
+if (!defined('DC_ADMIN_MAILFROM') || !DC_ADMIN_MAILFROM) {
+	echo
+	'<p class="static-msg">'.
+	'DC_ADMIN_MAILFROM '.__('is not defined, you should edit your configuration file.').
 	'</p>';
 }
@@ -279,6 +286,6 @@
 {
 	echo
-	'<p><a href="'.$i[1].'"><img src="'.$i[2].'" alt="" /></a>'.
-	'<span><a href="'.$i[1].'">'.$i[0].'</a></span></p>';
+	'<p><a href="'.$i[1].'"><img src="'.$i[2].'" alt="" />'.
+	'<br /><span>'.$i[0].'</span></a></p>';
 }
 echo '</div>';
@@ -305,13 +312,13 @@
 		'<fieldset>'.
 		'<p class="col"><label for="post_title" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Title:').
-		form::field('post_title',20,255,'','maximal',2).
+		form::field('post_title',20,255,'','maximal').
 		'</label></p>'.
 		'<p class="area"><label class="required" '.
 		'for="post_content"><abbr title="'.__('Required field').'">*</abbr> '.__('Content:').'</label> '.
-		form::textarea('post_content',50,7,'','',2).
+		form::textarea('post_content',50,7).
 		'</p>'.
 		'<p><label for="cat_id" class="classic">'.__('Category:').' '.
-		form::combo('cat_id',$categories_combo,'','',2).'</label></p>'.
-		'<p><input type="submit" value="'.__('Save').'" name="save" tabindex="3" /> '.
+		form::combo('cat_id',$categories_combo).'</label></p>'.
+		'<p><input type="submit" value="'.__('Save').'" name="save" /> '.
 		($core->auth->check('publish',$core->blog->id)
 			? '<input type="hidden" value="'.__('save and publish').'" name="save-publish" />'
Index: admin/install/index.php
===================================================================
--- admin/install/index.php	(revision 270)
+++ admin/install/index.php	(revision 467)
@@ -205,27 +205,27 @@
 		$init_fav = array();
 		
-		$init_fav['new_post'] = array('new_post',__('New entry'),'post.php',
+		$init_fav['new_post'] = array('new_post','New entry','post.php',
 			'images/menu/edit.png','images/menu/edit-b.png',
 			'usage,contentadmin',null,'menu-new-post');
-		$init_fav['posts'] = array('posts',__('Entries'),'posts.php',
+		$init_fav['posts'] = array('posts','Entries','posts.php',
 			'images/menu/entries.png','images/menu/entries-b.png',
 			'usage,contentadmin',null,null);
-		$init_fav['comments'] = array('comments',__('Comments'),'comments.php',
+		$init_fav['comments'] = array('comments','Comments','comments.php',
 			'images/menu/comments.png','images/menu/comments-b.png',
 			'usage,contentadmin',null,null);
-		$init_fav['prefs'] = array('prefs',__('My preferences'),'preferences.php',
+		$init_fav['prefs'] = array('prefs','My preferences','preferences.php',
 			'images/menu/user-pref.png','images/menu/user-pref-b.png',
 			'*',null,null);
-		$init_fav['blog_pref'] = array('blog_pref',__('Blog settings'),'blog_pref.php',
+		$init_fav['blog_pref'] = array('blog_pref','Blog settings','blog_pref.php',
 			'images/menu/blog-pref.png','images/menu/blog-pref-b.png',
 			'admin',null,null);
-		$init_fav['blog_theme'] = array('blog_theme',__('Blog appearance'),'blog_theme.php',
+		$init_fav['blog_theme'] = array('blog_theme','Blog appearance','blog_theme.php',
 			'images/menu/themes.png','images/menu/blog-theme-b.png',
 			'admin',null,null);
 
-		$init_fav['pages'] = array('pages',__('Pages'),'plugin.php?p=pages',
+		$init_fav['pages'] = array('pages','Pages','plugin.php?p=pages',
 			'index.php?pf=pages/icon.png','index.php?pf=pages/icon-big.png',
 			'contentadmin,pages',null,null);
-		$init_fav['blogroll'] = array('blogroll',__('Blogroll'),'plugin.php?p=blogroll',
+		$init_fav['blogroll'] = array('blogroll','Blogroll','plugin.php?p=blogroll',
 			'index.php?pf=blogroll/icon-small.png','index.php?pf=blogroll/icon.png',
 			'usage,contentadmin',null,null);
Index: admin/install/wizard.php
===================================================================
--- admin/install/wizard.php	(revision 270)
+++ admin/install/wizard.php	(revision 363)
@@ -100,4 +100,5 @@
 		$admin_url = preg_replace('%install/wizard.php$%','',$_SERVER['REQUEST_URI']);
 		writeConfigValue('DC_ADMIN_URL',http::getHost().$admin_url,$full_conf);
+		writeConfigValue('DC_ADMIN_MAILFROM','dotclear@'.$_SERVER['HTTP_HOST'],$full_conf);
 		writeConfigValue('DC_MASTER_KEY',md5(uniqid()),$full_conf);
 		
Index: admin/js/_index.js
===================================================================
--- admin/js/_index.js	(revision 234)
+++ admin/js/_index.js	(revision 454)
@@ -11,5 +11,5 @@
 
 		if ($('input[name=save-publish]',f).length > 0) {
-			var btn = $('<input type="submit" value="' + $('input[name=save-publish]',f).val() + '" tabindex="3" />');
+			var btn = $('<input type="submit" value="' + $('input[name=save-publish]',f).val() + '" />');
 			$('input[name=save-publish]',f).remove();
 			$('input[name=save]',f).after(btn).after(' ');
@@ -65,5 +65,5 @@
 	// allow to hide quick entry div, and remember choice
 	$('#quick h3').toggleWithLegend($('#quick').children().not('h3'),{
-		cookie: 'dcx_quick_entry',
+		cookie: 'dcx_quick_entry'
 	}, positionFooter);
 });
Index: admin/js/color-picker.js
===================================================================
--- admin/js/color-picker.js	(revision 392)
+++ admin/js/color-picker.js	(revision 0)
@@ -36,7 +36,5 @@
 		span.css('display','block');
 		
-		/*ligne supprimée car elle ne fait pas le calcul
-		du width de l'input et ça fout la merde */
-		//span.css('width',($(this).width()+12)+'px');
+		span.css('width',($(this).width()+12)+'px');
 		span.css('padding','0 5px 0 0');
 		$(this).wrap(span);
@@ -47,7 +45,5 @@
 			position: 'absolute',
 			top: 3,
-			/* la largeur du span n'étant pas calculée
-			right: 0 crée un affichage pourri. On vire. */
-			//right: 0
+			right: 0
 		});
 		
Index: admin/js/common.js
===================================================================
--- admin/js/common.js	(revision 234)
+++ admin/js/common.js	(revision 343)
@@ -57,5 +57,5 @@
 }
 
-jQuery.fn.toggleWithLegend = function(target,s, callback) {
+jQuery.fn.toggleWithLegend = function(target,s) {
 	var defaults = {
 		img_on_src: dotclear.img_plus_src,
@@ -79,14 +79,14 @@
 	}
 
-	var toggle = function(i,speed, callback) {
+	var toggle = function(i,speed) {
 		speed = speed || 0;
 		if (p.hide) {
 			$(i).get(0).src = p.img_on_src;
 			$(i).get(0).alt = p.img_on_alt;
-			target.hide(speed, callback);
+			target.hide(speed, positionFooter);
 		} else {
 			$(i).get(0).src = p.img_off_src;
 			$(i).get(0).alt = p.img_off_alt;
-			target.show(speed, callback);
+			target.show(speed, positionFooter);
 			if (p.fn) {
 				p.fn.apply(target);
@@ -122,5 +122,5 @@
 		$(ctarget).css('cursor','pointer');
 		$(ctarget).click(function() {
-			toggle(i,p.speed, callback);
+			toggle(i,p.speed, positionFooter);
 			return false;
 		});
@@ -335,5 +335,5 @@
 			position: "static",
 			padding: ".75em 0",
-			width: "auto",
+			width: "auto"
 		});
 	}
@@ -356,18 +356,14 @@
 	}
 	$('#blog-menu h3:first').toggleWithLegend($('#blog-menu ul:first'),
-		$.extend({cookie:'dc_blog_menu'},menu_settings),
-		positionFooter
+		$.extend({cookie:'dc_blog_menu'},menu_settings)
 	);
 	$('#system-menu h3:first').toggleWithLegend($('#system-menu ul:first'),
-		$.extend({cookie:'dc_system_menu'},menu_settings),
-		positionFooter
+		$.extend({cookie:'dc_system_menu'},menu_settings)
 	);
 	$('#plugins-menu h3:first').toggleWithLegend($('#plugins-menu ul:first'),
-		$.extend({cookie:'dc_plugins_menu'},menu_settings),
-		positionFooter
+		$.extend({cookie:'dc_plugins_menu'},menu_settings)
 	);
 	$('#favorites-menu h3:first').toggleWithLegend($('#favorites-menu ul:first'),
-		$.extend({cookie:'dc_favorites_menu',hide:false,reverse_cookie:true},menu_settings),
-		positionFooter
+		$.extend({cookie:'dc_favorites_menu',hide:false,reverse_cookie:true},menu_settings)
 	);
 
Index: admin/js/jquery/jquery.pageTabs.js
===================================================================
--- admin/js/jquery/jquery.pageTabs.js	(revision 0)
+++ admin/js/jquery/jquery.pageTabs.js	(revision 297)
@@ -9,7 +9,7 @@
 		breakerClassName: 'clear'
 	};
-	
+
 	var index = start_tab ? start_tab : 0;
-	
+
 	this.params = jQuery.extend(defaults,settings);
 	this.divs = jQuery('div.'+this.params.className);
@@ -20,10 +20,10 @@
 jQuery._pageTabs.prototype = {
 	items: new Array(),
-	
+
 	createList: function() {
 		if (this.divs.length <= 0) {
 			return;
 		}
-		
+
 		this.block = document.createElement('div');
 		this.block.className = this.params.listClassName;
@@ -32,5 +32,5 @@
 		this.block.appendChild(this.list);
 		var li, a;
-		
+
 		var This = this;
 		var i=0;
@@ -57,30 +57,30 @@
 			}
 		});
-		
+
 		this.breaker = document.createElement('br');
 		this.breaker.className = this.params.breakerClassName;
-		
+
 		jQuery(this.divs.get(0)).before(this.block);
 		jQuery(this.block).after(this.breaker);
 	},
-	
+
 	showDiv: function(index) {
 		var This = this;
 		var i = 0;
 		var to_trigger = null;
-		
+
 		this.divs.each(function() {
 			if ((this.id != '' && this.id == index) || i == index) {
-				jQuery(this).show();
+				jQuery(this).show(0, positionFooter);
 				This.items[i].className = This.params.listClassName+'-active';
 				to_trigger = i;
 			} else {
-				jQuery(this).hide();
+				jQuery(this).hide(0, positionFooter);
 				This.items[i].className = '';
 			}
-			
+
 			i++;
 		});
-		
+
 		if (to_trigger != null) {
 			jQuery(this.divs[to_trigger]).onetabload();
Index: admin/js/prelude.js
===================================================================
--- admin/js/prelude.js	(revision 447)
+++ admin/js/prelude.js	(revision 447)
@@ -0,0 +1,20 @@
+// Accessibility links thks to vie-publique.fr
+aFocus = function() {
+	if(document.getElementById("prelude")) {
+		var aElts = document.getElementById("prelude").getElementsByTagName("A");
+		for (var i=0; i<aElts.length; i++) {
+			aElts[i].className="hidden";
+			aElts[i].onfocus=function() {
+				this.className="";
+			}
+		}
+	}
+}
+// events onload
+function addLoadEvent(func) {
+	if (window.addEventListener)
+		window.addEventListener("load", func, false);
+	else if (window.attachEvent)
+		window.attachEvent("onload", func);
+}
+addLoadEvent(aFocus);
Index: admin/media.php
===================================================================
--- admin/media.php	(revision 270)
+++ admin/media.php	(revision 408)
@@ -68,5 +68,4 @@
 	unset($post);
 }
-
 $d = isset($_REQUEST['d']) ? $_REQUEST['d'] : null;
 $dir = null;
Index: admin/media_item.php
===================================================================
--- admin/media_item.php	(revision 270)
+++ admin/media_item.php	(revision 375)
@@ -394,5 +394,9 @@
 	if ($file->media_image)
 	{ # We look for thumbnails too
-		$media_root = $core->blog->host.path::clean($core->blog->settings->system->public_url).'/';
+		if (preg_match('#^http(s)?://#',$this->core->blog->settings->system->public_url)) {
+			$media_root = $core->blog->settings->system->public_url;
+		} else {
+			$media_root = $core->blog->host.path::clean($core->blog->settings->system->public_url).'/';
+		}
 		foreach ($file->media_thumb as $v) {
 			$v = preg_replace('/^'.preg_quote($media_root,'/').'/','',$v);
Index: admin/permissions.php
===================================================================
--- admin/permissions.php	(revision 270)
+++ admin/permissions.php	(revision 454)
@@ -145,5 +145,5 @@
 	'<fieldset>'.
 	'<p><label for="your_pwd">'.__('Your password:').
-	form::password('your_pwd',20,255,'','',15).'</label></p>'.
+	form::password('your_pwd',20,255).'</label></p>'.
 	'</fieldset>'.
 	'<p><input type="submit" accesskey="s" value="'.__('Save').'" />'.
Index: admin/post.php
===================================================================
--- admin/post.php	(revision 270)
+++ admin/post.php	(revision 458)
@@ -32,6 +32,4 @@
 $post_open_comment = $core->blog->settings->system->allow_comments;
 $post_open_tb = $core->blog->settings->system->allow_trackbacks;
-
-$post_media = array();
 
 $page_title = __('New entry');
@@ -146,5 +144,4 @@
 		try {
 			$core->media = new dcMedia($core);
-			$post_media = $core->media->getPostMedia($post_id);
 		} catch (Exception $e) {}
 	}
@@ -363,43 +360,79 @@
 	echo '<div class="multi-part" title="'.__('Edit entry').'" id="edit-entry">';
 	echo '<form action="post.php" method="post" id="entry-form">';
+	echo '<div id="entry-wrapper">';
+	echo '<div id="entry-content"><fieldset class="constrained">';
+	
+	echo
+	'<p class="col"><label class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Title:').
+	form::field('post_title',20,255,html::escapeHTML($post_title),'maximal').
+	'</label></p>'.
+	
+	'<p class="area" id="excerpt-area"><label for="post_excerpt">'.__('Excerpt:').'</label> '.
+	form::textarea('post_excerpt',50,5,html::escapeHTML($post_excerpt)).
+	'</p>'.
+	
+	'<p class="area"><label class="required" '.
+	'for="post_content"><abbr title="'.__('Required field').'">*</abbr> '.__('Content:').'</label> '.
+	form::textarea('post_content',50,$core->auth->getOption('edit_size'),html::escapeHTML($post_content)).
+	'</p>'.
+	
+	'<p class="area" id="notes-area"><label for="post_notes">'.__('Notes:').'</label>'.
+	form::textarea('post_notes',50,5,html::escapeHTML($post_notes)).
+	'</p>';
+	
+	# --BEHAVIOR-- adminPostForm
+	$core->callBehavior('adminPostForm',isset($post) ? $post : null);
+	
+	echo
+	'<p>'.
+	($post_id ? form::hidden('id',$post_id) : '').
+	'<input type="submit" value="'.__('Save').' (s)" '.
+	'accesskey="s" name="save" /> '.
+	($can_delete ? '<input type="submit" class="delete" value="'.__('Delete').'" name="delete" />' : '').
+	$core->formNonce().
+	'</p>';
+	
+	echo '</fieldset></div>';		// End #entry-content
+	echo '</div>';		// End #entry-wrapper
+
 	echo '<div id="entry-sidebar">';
 	
 	echo
 	'<p><label for="cat_id">'.__('Category:').
-	form::combo('cat_id',$categories_combo,$cat_id,'maximal',3).
+	form::combo('cat_id',$categories_combo,$cat_id,'maximal').
 	'</label></p>'.
 	
 	'<p><label for="post_status">'.__('Entry status:').
-	form::combo('post_status',$status_combo,$post_status,'',3,!$can_publish).
+	form::combo('post_status',$status_combo,$post_status,'','',!$can_publish).
 	'</label></p>'.
 	
 	'<p><label for="post_dt">'.__('Published on:').
-	form::field('post_dt',16,16,$post_dt,'',3).
+	form::field('post_dt',16,16,$post_dt).
 	'</label></p>'.
 	
 	'<p><label for="post_format">'.__('Text formating:').
-	form::combo('post_format',$formaters_combo,$post_format,'',3).
+	form::combo('post_format',$formaters_combo,$post_format).
 	'</label>'.
 	'</p>'.
 	'<p>'.($post_id && $post_format != 'xhtml' ? '<a id="convert-xhtml" class="button" href="post.php?id='.$post_id.'&amp;xconv=1">'.__('Convert to XHTML').'</a>' : '').'</p>'.
 	
-	'<p><label for="post_open_comment" class="classic">'.form::checkbox('post_open_comment',1,$post_open_comment,'',3).' '.
+	'<p><label for="post_open_comment" class="classic">'.form::checkbox('post_open_comment',1,$post_open_comment).' '.
 	__('Accept comments').'</label></p>'.
-	'<p><label for="post_open_tb" class="classic">'.form::checkbox('post_open_tb',1,$post_open_tb,'',3).' '.
+	'<p><label for="post_open_tb" class="classic">'.form::checkbox('post_open_tb',1,$post_open_tb).' '.
 	__('Accept trackbacks').'</label></p>'.
-	'<p><label for="post_selected" class="classic">'.form::checkbox('post_selected',1,$post_selected,'',3).' '.
+	'<p><label for="post_selected" class="classic">'.form::checkbox('post_selected',1,$post_selected).' '.
 	__('Selected entry').'</label></p>'.
 	
 	'<p><label for="post_lang">'.__('Entry lang:').
-	form::combo('post_lang',$lang_combo,$post_lang,'',5).
+	form::combo('post_lang',$lang_combo,$post_lang).
 	'</label></p>'.
 	
 	'<p><label for="post_password">'.__('Entry password:').
-	form::field('post_password',10,32,html::escapeHTML($post_password),'maximal',3).
+	form::field('post_password',10,32,html::escapeHTML($post_password),'maximal').
 	'</label></p>'.
 	
 	'<div class="lockable">'.
 	'<p><label for="post_url">'.__('Basename:').
-	form::field('post_url',10,255,html::escapeHTML($post_url),'maximal',3).
+	form::field('post_url',10,255,html::escapeHTML($post_url),'maximal').
 	'</label></p>'.
 	'<p class="form-note warn">'.
@@ -408,80 +441,14 @@
 	'</div>';
 	
-	if ($post_id)
-	{
-		echo
-		'<h3 class="clear">'.__('Attachments').'</h3>';
-		foreach ($post_media as $f)
-		{
-			$ftitle = $f->media_title;
-			if (strlen($ftitle) > 18) {
-				$ftitle = substr($ftitle,0,16).'...';
-			}
-			echo
-			'<div class="media-item">'.
-			'<a class="media-icon" href="media_item.php?id='.$f->media_id.'">'.
-			'<img src="'.$f->media_icon.'" alt="" title="'.$f->basename.'" /></a>'.
-			'<ul>'.
-			'<li><a class="media-link" href="media_item.php?id='.$f->media_id.'"'.
-			'title="'.$f->basename.'">'.$ftitle.'</a></li>'.
-			'<li>'.$f->media_dtstr.'</li>'.
-			'<li>'.files::size($f->size).' - '.
-			'<a href="'.$f->file_url.'">'.__('open').'</a>'.'</li>'.
-			
-			'<li class="media-action"><a class="attachment-remove" id="attachment-'.$f->media_id.'" '.
-			'href="post_media.php?post_id='.$post_id.'&amp;media_id='.$f->media_id.'&amp;remove=1">'.
-			'<img src="images/check-off.png" alt="'.__('remove').'" /></a>'.
-			'</li>'.
-			
-			'</ul>'.
-			'</div>';
-		}
-		unset($f);
-		
-		if (empty($post_media)) {
-			echo '<p>'.__('No attachment.').'</p>';
-		}
-		echo '<p><a class="button" href="media.php?post_id='.$post_id.'">'.__('Add files to this entry').'</a></p>';
-	}
-	
 	# --BEHAVIOR-- adminPostFormSidebar
 	$core->callBehavior('adminPostFormSidebar',isset($post) ? $post : null);
 	
 	echo '</div>';		// End #entry-sidebar
-	
-	echo '<div id="entry-content"><fieldset class="constrained">';
-	
-	echo
-	'<p class="col"><label class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Title:').
-	form::field('post_title',20,255,html::escapeHTML($post_title),'maximal',2).
-	'</label></p>'.
-	
-	'<p class="area" id="excerpt-area"><label for="post_excerpt">'.__('Excerpt:').'</label> '.
-	form::textarea('post_excerpt',50,5,html::escapeHTML($post_excerpt),'',2).
-	'</p>'.
-	
-	'<p class="area"><label class="required" '.
-	'for="post_content"><abbr title="'.__('Required field').'">*</abbr> '.__('Content:').'</label> '.
-	form::textarea('post_content',50,$core->auth->getOption('edit_size'),html::escapeHTML($post_content),'',2).
-	'</p>'.
-	
-	'<p class="area" id="notes-area"><label for="post_notes">'.__('Notes:').'</label>'.
-	form::textarea('post_notes',50,5,html::escapeHTML($post_notes),'',2).
-	'</p>';
+
+	echo '</form>';
 	
 	# --BEHAVIOR-- adminPostForm
-	$core->callBehavior('adminPostForm',isset($post) ? $post : null);
-	
-	echo
-	'<p>'.
-	($post_id ? form::hidden('id',$post_id) : '').
-	'<input type="submit" value="'.__('Save').' (s)" tabindex="4" '.
-	'accesskey="s" name="save" /> '.
-	($can_delete ? '<input type="submit" class="delete" value="'.__('Delete').'" name="delete" />' : '').
-	$core->formNonce().
-	'</p>';
-	
-	echo '</fieldset></div>';		// End #entry-content
-	echo '</form>';
+	$core->callBehavior('adminPostAfterForm',isset($post) ? $post : null);
+	
 	echo '</div>';
 	
@@ -491,13 +458,4 @@
 	}
 	
-	if ($post_id && !empty($post_media))
-	{
-		echo
-		'<form action="post_media.php" id="attachment-remove-hide" method="post">'.
-		'<div>'.form::hidden(array('post_id'),$post_id).
-		form::hidden(array('media_id'),'').
-		form::hidden(array('remove'),1).
-		$core->formNonce().'</div></form>';
-	}
 }
 
@@ -526,4 +484,7 @@
 		$combo_action[__('delete')] = 'delete';
 	}
+	
+	# --BEHAVIOR-- adminCommentsActionsCombo
+	$core->callBehavior('adminCommentsActionsCombo',array(&$combo_action));
 	
 	$has_action = !empty($combo_action) && (!$trackbacks->isEmpty() || !$comments->isEmpty());
Index: admin/preferences.php
===================================================================
--- admin/preferences.php	(revision 270)
+++ admin/preferences.php	(revision 454)
@@ -336,6 +336,4 @@
 echo '<h2>'.$page_title.'</h2>';
 
-$tabindex = 2;
-
 # User profile
 echo '<div class="multi-part" id="user-profile" title="'.__('My profile').'">';
@@ -347,17 +345,17 @@
 '<div class="col">'.
 '<p><label for="user_name">'.__('Last Name:').
-form::field('user_name',20,255,html::escapeHTML($user_name),'',$tabindex++).'</label></p>'.
+form::field('user_name',20,255,html::escapeHTML($user_name)).'</label></p>'.
 
 '<p><label for="user_firstname">'.__('First Name:').
-form::field('user_firstname',20,255,html::escapeHTML($user_firstname),'',$tabindex++).'</label></p>'.
+form::field('user_firstname',20,255,html::escapeHTML($user_firstname)).'</label></p>'.
 
 '<p><label for="user_displayname">'.__('Display name:').
-form::field('user_displayname',20,255,html::escapeHTML($user_displayname),'',$tabindex++).'</label></p>'.
+form::field('user_displayname',20,255,html::escapeHTML($user_displayname)).'</label></p>'.
 
 '<p><label for="user_email">'.__('Email:').
-form::field('user_email',20,255,html::escapeHTML($user_email),'',$tabindex++).'</label></p>'.
+form::field('user_email',20,255,html::escapeHTML($user_email)).'</label></p>'.
 
 '<p><label for="user_url">'.__('URL:').
-form::field('user_url',30,255,html::escapeHTML($user_url),'',$tabindex++).'</label></p>'.
+form::field('user_url',30,255,html::escapeHTML($user_url)).'</label></p>'.
 
 '</div>'.
@@ -366,8 +364,8 @@
 
 '<p><label for="user_lang">'.__('User language:').
-form::combo('user_lang',$lang_combo,$user_lang,'l10n',$tabindex++).'</label></p>'.
+form::combo('user_lang',$lang_combo,$user_lang,'l10n').'</label></p>'.
 
 '<p><label for="user_tz">'.__('User timezone:').
-form::combo('user_tz',dt::getZones(true,true),$user_tz,'',$tabindex++).'</label></p>'.
+form::combo('user_tz',dt::getZones(true,true),$user_tz).'</label></p>'.
 
 '</div>'.
@@ -383,8 +381,8 @@
 	
 	'<p><label for="new_pwd">'.__('New password:').
-	form::password('new_pwd',20,255,'','',$tabindex++).'</label></p>'.
+	form::password('new_pwd',20,255).'</label></p>'.
 	
 	'<p><label for="new_pwd_c">'.__('Confirm password:').
-	form::password('new_pwd_c',20,255,'','',$tabindex++).'</label></p>'.
+	form::password('new_pwd_c',20,255).'</label></p>'.
 	'</fieldset>'.
 	
@@ -392,5 +390,5 @@
 	'<p>'.__('If you want to change your email or password you must provide your current password.').'</p>'.
 	'<p><label for="cur_pwd">'.__('Your password:').
-	form::password('cur_pwd',20,255,'','',$tabindex++).'</label></p>'.
+	form::password('cur_pwd',20,255).'</label></p>'.
 	'</fieldset>';
 }
@@ -399,5 +397,5 @@
 '<p class="clear">'.
 $core->formNonce().
-'<input type="submit" accesskey="s" value="'.__('Save').'" tabindex="33" /></p>'.
+'<input type="submit" accesskey="s" value="'.__('Save').'" /></p>'.
 '</form>';
 
@@ -412,18 +410,18 @@
 
 '<p><label for="user_post_format">'.__('Preferred format:').
-form::combo('user_post_format',$formaters_combo,$user_options['post_format'],'',$tabindex++).'</label></p>'.
+form::combo('user_post_format',$formaters_combo,$user_options['post_format']).'</label></p>'.
 
 '<p><label for="user_post_status">'.__('Default entry status:').
-form::combo('user_post_status',$status_combo,$user_post_status,'',$tabindex++).'</label></p>'.
+form::combo('user_post_status',$status_combo,$user_post_status).'</label></p>'.
 
 '<p><label for="user_edit_size">'.__('Entry edit field height:').
-form::field('user_edit_size',5,4,(integer) $user_options['edit_size'],'',$tabindex++).'</label></p>'.
+form::field('user_edit_size',5,4,(integer) $user_options['edit_size']).'</label></p>'.
 
 '<p><label for="user_wysiwyg" class="classic">'.
-form::checkbox('user_wysiwyg',1,$user_options['enable_wysiwyg'],'',$tabindex++).' '.
+form::checkbox('user_wysiwyg',1,$user_options['enable_wysiwyg']).' '.
 __('Enable WYSIWYG mode').'</label></p>'.
 
 '<p><label for="user_ui_enhanceduploader" class="classic">'.
-form::checkbox('user_ui_enhanceduploader',1,$user_ui_enhanceduploader,'',$tabindex++).' '.
+form::checkbox('user_ui_enhanceduploader',1,$user_ui_enhanceduploader).' '.
 __('Activate enhanced uploader in media manager').'</label></p>';
 
@@ -431,5 +429,5 @@
 	echo
 	'<p><label for="user_ui_hide_std_favicon" class="classic">'.
-	form::checkbox('user_ui_hide_std_favicon',1,$user_ui_hide_std_favicon,'',$tabindex++).' '.
+	form::checkbox('user_ui_hide_std_favicon',1,$user_ui_hide_std_favicon).' '.
 	__('Do not use standard favicon').'</label></p>'.
 	'<p class="clear form-note info">'.__('This will be applied for all users').'</p>';
@@ -444,5 +442,5 @@
 
 '<p><label for="user_acc_nodragdrop" class="classic">'.
-form::checkbox('user_acc_nodragdrop',1,$user_acc_nodragdrop,'',$tabindex++).' '.
+form::checkbox('user_acc_nodragdrop',1,$user_acc_nodragdrop).' '.
 __('Disable javascript powered drag and drop for ordering items').'</label></p>'.
 
@@ -454,13 +452,13 @@
 
 '<p><label for="user_dm_doclinks" class="classic">'.
-form::checkbox('user_dm_doclinks',1,$user_dm_doclinks,'',$tabindex++).' '.
+form::checkbox('user_dm_doclinks',1,$user_dm_doclinks).' '.
 __('Display documentation links').'</label></p>'.
 
 '<p><label for="user_dm_dcnews" class="classic">'.
-form::checkbox('user_dm_dcnews',1,$user_dm_dcnews,'',$tabindex++).' '.
+form::checkbox('user_dm_dcnews',1,$user_dm_dcnews).' '.
 __('Display Dotclear news').'</label></p>'.
 
 '<p><label for="user_dm_quickentry" class="classic">'.
-form::checkbox('user_dm_quickentry',1,$user_dm_quickentry,'',$tabindex++).' '.
+form::checkbox('user_dm_quickentry',1,$user_dm_quickentry).' '.
 __('Display quick entry form').'</label></p>'.
 
@@ -474,5 +472,5 @@
 '<p class="clear">'.
 $core->formNonce().
-'<input type="submit" accesskey="s" value="'.__('Save').'" tabindex="33" /></p>'.
+'<input type="submit" accesskey="s" value="'.__('Save').'" /></p>'.
 '</form>';
 
@@ -499,5 +497,5 @@
 				form::field(array('order['.$k.']'),2,3,$count,'position','',false,'title="'.sprintf(__('position of %s'),$fav['title']).'"').
 				form::hidden(array('dynorder[]','dynorder-'.$k.''),$k).
-				'<label for="fuk-'.$k.'">'.form::checkbox(array('remove[]','fuk-'.$k),$k).$fav['title'].'</label>'.
+				'<label for="fuk-'.$k.'">'.form::checkbox(array('remove[]','fuk-'.$k),$k).__($fav['title']).'</label>'.
 				'</li>';
 		}
@@ -542,5 +540,5 @@
 			$count++;
 			echo '<li id="fd-'.$k.'">'.
-			'<img src="'.$fav['small-icon'].'" alt="" /> '.$fav['title'].'</li>';
+			'<img src="'.$fav['small-icon'].'" alt="" /> '.__($fav['title']).'</li>';
 		}
 	}
@@ -555,8 +553,8 @@
 $array = $_fav;
 function cmp($a,$b) {
-    if ($a[1] == $b[1]) {
+    if (__($a[1]) == __($b[1])) {
         return 0;
     }
-    return ($a[1] < $b[1]) ? -1 : 1;
+    return (__($a[1]) < __($b[1])) ? -1 : 1;
 }
 $array=$array->getArrayCopy();
@@ -568,6 +566,6 @@
 		echo '<li id="fa-'.$fav[0].'">'.'<label for="fak-'.$fav[0].'">'.
 			form::checkbox(array('append[]','fak-'.$fav[0]),$k).
-			'<img src="'.$fav[3].'" alt="" /> '.'<span class="zoom"><img src="'.$fav[4].'" alt="" /></span>'.$fav[1].
-			'</label>'.'</li>';
+			'<img src="'.$fav[3].'" alt="" /> '.'<span class="zoom"><img src="'.$fav[4].'" alt="" /></span>'.
+			__($fav[1]).'</label>'.'</li>';
 	}
 }	
Index: admin/services.php
===================================================================
--- admin/services.php	(revision 270)
+++ admin/services.php	(revision 323)
@@ -133,6 +133,5 @@
 			$rsp->comment_ip($rs->comment_ip);
 			$rsp->comment_email($rs->comment_email);
-			# --BEHAVIOR-- adminAfterCommentDesc
-			$rsp->comment_spam_disp($core->callBehavior('adminAfterCommentDesc', $rs));
+			$rsp->comment_spam_disp(dcAntispam::statusMessage($rs));
 		}
 		
Index: admin/style/default.css
===================================================================
--- admin/style/default.css	(revision 391)
+++ admin/style/default.css	(revision 471)
@@ -22,6 +22,4 @@
 }
 
-a img,:link img,:visited img { border:none }
-
 a, a:link, a:visited {
 	color: #2373A8;
@@ -31,4 +29,7 @@
 a:hover, a:active, a:focus {
 	text-decoration: underline;
+}
+a img, a:link img, a:visited img { 
+	border:none;
 }
 
@@ -80,4 +81,18 @@
 /* LAYOUT
 -------------------------------------------------------- */
+#prelude {
+	background: #575859;
+	line-height: 1.8em;
+	margin: 0;
+	overflow: hidden;
+	}
+#prelude li {
+	list-style-type: none;
+	margin: 0 1em 0 0;
+	background:transparent;
+	}
+#prelude li a {
+	color:#fff;
+	}
 
 #top {
@@ -275,10 +290,10 @@
 	float: none;
 }
-#dashboard-main #icons {
+#icons {
 	overflow: hidden;
 	padding-bottom: 1em;
 	text-align: center;
 }
-#dashboard-main #icons p {
+#icons p {
 	width: 210px;
 	text-align: center;
@@ -286,23 +301,28 @@
 	display:inline-block;
 }
-#dashboard-main #icons span {
-	display: block;
-}
-#dashboard-main #icons a {
-	border-bottom-width: 0;
-}
-#dashboard-main #icons span a {
-	border-bottom-width: 1px;
-}
-
-#dashboard-main #quick {
+#icons a,
+#icons a:link,
+#icons a:visited,
+#icons a:hover,
+#icons a:focus {
+	border-bottom-width: 0px;
+	text-decoration: none;
+}
+#icons a span {
+	border-bottom: 1px dotted #f90;
+}
+#icons a:focus span, #icons a:hover span {
+	text-decoration: underline;
+}
+
+#quick {
 	clear: left;
 	margin-top: 2em;
 }
-#dashboard-main #quick h3 {
+#quick h3 {
 	margin-bottom: 0.2em;
 	font-size: 1.2em;
 }
-#dashboard-main #quick p.qinfo {
+#quick p.qinfo {
 	margin: -.7em -1em 1em;
 	background: #eef url(info.png) no-repeat .2em .2em;
@@ -352,10 +372,15 @@
 
 /* POST */
+#entry-wrapper {
+	float: left;
+	width: 100%;
+	margin-right: -18em;
+}
+#entry-content {
+	margin-right: 18em;
+}
 #entry-sidebar {
 	width: 17em;
 	float: right;
-}
-#entry-content {
-	margin-right: 18em;
 }
 #comments {
@@ -1127,5 +1152,5 @@
 p.field {
 	position: relative;
-	
+
 }
 p.field label {
Index: admin/user.php
===================================================================
--- admin/user.php	(revision 270)
+++ admin/user.php	(revision 454)
@@ -96,4 +96,8 @@
 		$cur->user_post_status = $user_post_status = $_POST['user_post_status'];
 		
+		if ($cur->user_id == $core->auth->userID() && $core->auth->isSuperAdmin()) {
+			// force super_user to true if current user
+			$cur->user_super = $user_super = true;
+		}
 		if ($core->auth->allowPassChange()) {
 			$cur->user_change_pwd = !empty($_POST['user_change_pwd']) ? 1 : 0;
@@ -191,5 +195,5 @@
 '<div class="col">'.
 '<p><label for="user_id" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Username:').' '.
-form::field('user_id',20,255,html::escapeHTML($user_id),'',2).
+form::field('user_id',20,255,html::escapeHTML($user_id)).
 '</label></p>'.
 '<p class="form-note">'.__('At least 2 characters using letters, numbers or symbols.').'</p>'.
@@ -198,5 +202,5 @@
 ($user_id != '' ? '' : '<abbr title="'.__('Required field').'">*</abbr> ').
 ($user_id != '' ? __('New password:') : __('Password:')).' '.
-form::password('new_pwd',20,255,'','',3).
+form::password('new_pwd',20,255).
 '</label></p>'.
 '<p class="form-note">'.__('Password must contain at least 6 characters.').'</p>'.
@@ -204,21 +208,21 @@
 '<p><label for="new_pwd_c" '.($user_id != '' ? '' : 'class="required"').'>'.
 ($user_id != '' ? '' : '<abbr title="'.__('Required field').'">*</abbr> ').__('Confirm password:').' '.
-form::password('new_pwd_c',20,255,'','',4).
+form::password('new_pwd_c',20,255).
 '</label></p>'.
 
 '<p><label for="user_name">'.__('Last Name:').' '.
-form::field('user_name',20,255,html::escapeHTML($user_name),'',5).
+form::field('user_name',20,255,html::escapeHTML($user_name)).
 '</label></p>'.
 
 '<p><label for="user_firstname">'.__('First Name:').' '.
-form::field('user_firstname',20,255,html::escapeHTML($user_firstname),'',6).
+form::field('user_firstname',20,255,html::escapeHTML($user_firstname)).
 '</label></p>'.
 
 '<p><label for="user_displayname">'.__('Display name:').' '.
-form::field('user_displayname',20,255,html::escapeHTML($user_displayname),'',7).
+form::field('user_displayname',20,255,html::escapeHTML($user_displayname)).
 '</label></p>'.
 
 '<p><label for="user_email">'.__('Email:').' '.
-form::field('user_email',20,255,html::escapeHTML($user_email),'',8).
+form::field('user_email',20,255,html::escapeHTML($user_email)).
 '</label></p>'.
 '</div>'.
@@ -226,24 +230,24 @@
 '<div class="col">'.
 '<p><label for="user_url">'.__('URL:').' '.
-form::field('user_url',30,255,html::escapeHTML($user_url),'',9).
+form::field('user_url',30,255,html::escapeHTML($user_url)).
 '</label></p>'.
 '<p><label for="user_post_format">'.__('Preferred format:').' '.
-form::combo('user_post_format',$formaters_combo,$user_options['post_format'],'',10).
+form::combo('user_post_format',$formaters_combo,$user_options['post_format']).
 '</label></p>'.
 
 '<p><label for="user_post_status">'.__('Default entry status:').' '.
-form::combo('user_post_status',$status_combo,$user_post_status,'',11).
+form::combo('user_post_status',$status_combo,$user_post_status).
 '</label></p>'.
 
 '<p><label for="user_edit_size">'.__('Entry edit field height:').' '.
-form::field('user_edit_size',5,4,(integer) $user_options['edit_size'],'',12).
+form::field('user_edit_size',5,4,(integer) $user_options['edit_size']).
 '</label></p>'.
 
 '<p><label for="user_lang">'.__('User language:').' '.
-form::combo('user_lang',$lang_combo,$user_lang,'l10n',13).
+form::combo('user_lang',$lang_combo,$user_lang,'l10n').
 '</label></p>'.
 
 '<p><label for="user_tz">'.__('User timezone:').' '.
-form::combo('user_tz',dt::getZones(true,true),$user_tz,'',14).
+form::combo('user_tz',dt::getZones(true,true),$user_tz).
 '</label></p>';
 
@@ -251,10 +255,12 @@
 	echo
 	'<p><label for="user_change_pwd" class="classic">'.
-	form::checkbox('user_change_pwd','1',$user_change_pwd,'',15).' '.
+	form::checkbox('user_change_pwd','1',$user_change_pwd).' '.
 	__('Password change required to connect').'</label></p>';
 }
 
+$super_disabled = $user_super && $user_id == $core->auth->userID();
+
 echo
-'<p><label for="user_super" class="classic">'.form::checkbox('user_super','1',$user_super,'',16).' '.
+'<p><label for="user_super" class="classic">'.form::checkbox('user_super','1',$user_super,'','',$super_disabled).' '.
 __('Super administrator').'</label></p>'.
 '</div>'.
@@ -269,7 +275,7 @@
 '<p><label for="your_pwd" '.($user_id != '' ? '' : 'class="required"').'>'.
 ($user_id != '' ? '' : '<abbr title="'.__('Required field').'">*</abbr> ').__('Your password:').
-form::password('your_pwd',20,255,'','',17).'</label></p>'.
+form::password('your_pwd',20,255).'</label></p>'.
 '</fieldset>'.
-'<p class="clear"><input type="submit" accesskey="s" value="'.__('Save').'" tabindex="16" />'.
+'<p class="clear"><input type="submit" accesskey="s" value="'.__('Save').'" />'.
 ($user_id != '' ? form::hidden('id',$user_id) : '').
 $core->formNonce().
Index: admin/users.php
===================================================================
--- admin/users.php	(revision 270)
+++ admin/users.php	(revision 313)
@@ -24,6 +24,7 @@
 			# --BEHAVIOR-- adminBeforeUserDelete
 			$core->callBehavior('adminBeforeUserDelete',$u);
-			
-			$core->delUser($u);
+			if ($u != $core->auth->userID()) {
+				$core->delUser($u);
+			}
 		}
 		catch (Exception $e)
@@ -32,5 +33,4 @@
 		}
 	}
-	
 	if (!$core->error->flag()) {
 		http::redirect('users.php?del=1');
Index: inc/admin/lib.dc.page.php
===================================================================
--- inc/admin/lib.dc.page.php	(revision 270)
+++ inc/admin/lib.dc.page.php	(revision 454)
@@ -16,4 +16,6 @@
 class dcPage
 {
+	private static $loaded_js=array();
+
 	# Auth check
 	public static function check($permissions)
@@ -73,5 +75,5 @@
 			__('Blogs:').' '.
 			$core->formNonce().
-			form::combo('switchblog',$blogs,$core->blog->id,	'',1).
+			form::combo('switchblog',$blogs,$core->blog->id).
 			'</label>'.
 			'<noscript><div><input type="submit" value="'.__('ok').'" /></div></noscript>';
@@ -122,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";
 		
@@ -270,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>';
 			}
 			
@@ -349,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";
+		}
 	}
 	
@@ -364,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".
Index: inc/admin/prepend.php
===================================================================
--- inc/admin/prepend.php	(revision 270)
+++ inc/admin/prepend.php	(revision 469)
@@ -21,4 +21,17 @@
 
 define('DC_CONTEXT_ADMIN',true);
+
+function dc_valid_fav($url) {
+	global $core;
+
+	if (preg_match('#plugin\.php\?p=([^&]+)#',$url,$matches)) {
+		if (isset($matches[1])) {
+			if (!$core->plugins->moduleExists($matches[1])) {
+				return false;
+			}
+		}
+	}
+	return true;
+}
 
 function dc_prepare_url($url) {
@@ -185,43 +198,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));
@@ -309,9 +322,11 @@
 		// User favorites only
 		if (!$v['global']) {
-			$count++;
 			$fav = unserialize($v['value']);
-			$_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']);
+			if (dc_valid_fav($fav['url'])) {
+				$count++;
+				$_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']);
+			}
 		}
 	}	
@@ -319,9 +334,11 @@
 		// Global favorites if any
 		foreach ($ws->dumpPrefs() as $k => $v) {
-			$count++;
 			$fav = unserialize($v['value']);
-			$_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']);
+			if (dc_valid_fav($fav[url])) {
+				$count++;
+				$_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']);
+			}
 		}
 	}
Index: inc/config.php.in
===================================================================
--- inc/config.php.in	(revision 270)
+++ inc/config.php.in	(revision 362)
@@ -40,4 +40,7 @@
 define('DC_ADMIN_URL','');
 
+// Admin mail from address. For password recovery and such.
+define('DC_ADMIN_MAILFROM','');
+
 // Cookie's name
 define('DC_SESSION_NAME','dcxd');
Index: inc/core/class.dc.auth.php
===================================================================
--- inc/core/class.dc.auth.php	(revision 270)
+++ inc/core/class.dc.auth.php	(revision 333)
@@ -4,5 +4,5 @@
 # This file is part of Dotclear 2.
 #
-# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
+# Copyright (c) 2003-2010 Olivier Meunier & Association Dotclear
 # Licensed under the GPL version 2.0 license.
 # See LICENSE file or
@@ -13,37 +13,52 @@
 
 /**
-@ingroup DC_CORE
-@nosubgrouping
-@brief Authentication and user credentials management
-
-dcAuth is a class used to handle everything related to user authentication
-and credentials. Object is provided by dcCore $auth property.
+* @ingroup DC_CORE
+* @nosubgrouping
+* @brief Authentication and user credentials management
+* 
+* dcAuth is a class used to handle everything related to user authentication
+* and credentials. Object is provided by dcCore $auth property.
 */
 class dcAuth
 {
-	protected $core;		///< <b>dcCore</b> dcCore instance
-	protected $con;		///< <b>connection</b> Database connection object
-	
-	protected $user_table;	///< <b>string</b>	User table name
-	protected $perm_table;	///< <b>string</b>	Perm table name
-	
-	protected $user_id;					///< <b>string</b>		Current user ID
-	protected $user_info = array();		///< <b>array</b>		Array with user information
-	protected $user_options = array();		///< <b>array</b>		Array with user options
-	protected $user_change_pwd;			///< <b>boolean</b>		User must change his password after login
-	protected $user_admin;				///< <b>boolean</b>		User is super admin
-	protected $permissions = array();		///< <b>array</b>		Permissions for each blog
-	protected $allow_pass_change = true;	///< <b>boolean</b>		User can change its password
-	protected $blogs = array();			///< <b>array</b>		List of blogs on which the user has permissions
-	public $blog_count = null;				///< <b>integer</b>		Count of user blogs
-	
-	protected $perm_types;	///< <b>array</b> Permission types
-	
-	public $user_prefs;	///< <b>dcPrefs</b>	dcPrefs object
-	
-	/**
-	Class constructor. Takes dcCore object as single argument.
-	
-	@param	core		<b>dcCore</b>		dcCore object
+	/** @var dcCore dcCore instance */
+	protected $core;
+	/** @var connection Database connection object */
+	protected $con;
+	
+	/** @var string User table name */
+	protected $user_table;
+	/** @var string Perm table name */
+	protected $perm_table;
+	
+	/** @var string Current user ID */
+	protected $user_id;
+	/** @var array Array with user information */
+	protected $user_info = array();
+	/** @var array Array with user options */
+	protected $user_options = array();
+	/** @var boolean User must change his password after login */
+	protected $user_change_pwd;
+	/** @var boolean User is super admin */
+	protected $user_admin;
+	/** @var array Permissions for each blog */
+	protected $permissions = array();
+	/** @var boolean User can change its password */
+	protected $allow_pass_change = true;
+	/** @var array List of blogs on which the user has permissions */
+	protected $blogs = array();
+	/** @var integer Count of user blogs */
+	public $blog_count = null;
+	
+	/** @var array Permission types */
+	protected $perm_types;
+	
+	/** @var dcPrefs dcPrefs object */
+	public $user_prefs;
+	
+	/**
+	* Class constructor. Takes dcCore object as single argument.
+	* 
+	* @param dcCore	$core		dcCore object
 	*/
 	public function __construct($core)
@@ -70,14 +85,15 @@
 	//@{
 	/**
-	Checks if user exists and can log in. <var>$pwd</var> argument is optionnal
-	while you may need to check user without password. This method will create
-	credentials and populate all needed object properties.
-	
-	@param	user_id	<b>string</b>		User ID
-	@param	pwd		<b>string</b>		User password
-	@param	user_key	<b>string</b>		User key check
-	@return	<b>boolean</b>
-	*/
-	public function checkUser($user_id, $pwd=null, $user_key=null)
+	* Checks if user exists and can log in. <var>$pwd</var> argument is optionnal
+	* while you may need to check user without password. This method will create
+	* credentials and populate all needed object properties.
+	* 
+	* @param string	$user_id		User ID
+	* @param string	$pwd			User password
+	* @param string	$user_key		User key check
+	* @param boolean	$check_blog	checks if user is associated to a blog or not.
+	* @return boolean
+	*/
+	public function checkUser($user_id, $pwd=null, $user_key=null, $check_blog=true)
 	{
 		# Check user and password
@@ -141,5 +157,5 @@
 		
 		# Get permissions on blogs
-		if ($this->findUserBlog() === false) {
+		if ($check_blog && ($this->findUserBlog() === false)) {
 			return false;
 		}
@@ -148,8 +164,8 @@
 	
 	/**
-	This method only check current user password.
-	
-	@param	pwd		<b>string</b>		User password
-	@return	<b>boolean</b>
+	* This method only check current user password.
+	* 
+	* @param string	$pwd			User password
+	* @return boolean
 	*/
 	public function checkPassword($pwd)
@@ -163,7 +179,7 @@
 	
 	/**
-	This method checks if user session cookie exists
-	
-	@return	<b>boolean</b>
+	* This method checks if user session cookie exists
+	* 
+	* @return boolean
 	*/
 	public function sessionExists()
@@ -173,7 +189,7 @@
 	
 	/**
-	This method checks user session validity.
-	
-	@return	<b>boolean</b>
+	* This method checks user session validity.
+	* 
+	* @return boolean
 	*/
 	public function checkSession($uid=null)
@@ -212,7 +228,7 @@
 	
 	/**
-	Checks if user is super admin
-	
-	@return	<b>boolean</b>
+	* Checks if user is super admin
+	* 
+	* @return boolean
 	*/
 	public function isSuperAdmin()
@@ -222,11 +238,11 @@
 	
 	/**
-	Checks if user has permissions given in <var>$permissions</var> for blog
-	<var>$blog_id</var>. <var>$permissions</var> is a coma separated list of
-	permissions.
-	
-	@param	permissions	<b>string</b>		Permissions list
-	@param	blog_id		<b>string</b>		Blog ID
-	@return	<b>boolean</b>
+	* Checks if user has permissions given in <var>$permissions</var> for blog
+	* <var>$blog_id</var>. <var>$permissions</var> is a coma separated list of
+	* permissions.
+	* 
+	* @param string	$permissions	Permissions list
+	* @param string	$blog_id		Blog ID
+	* @return boolean
 	*/
 	public function check($permissions,$blog_id)
@@ -257,7 +273,7 @@
 	
 	/**
-	Returns true if user is allowed to change its password.
-	
-	@return	<b>boolean</b>
+	* Returns true if user is allowed to change its password.
+	* 
+	* @return	boolean
 	*/
 	public function allowPassChange()
@@ -312,8 +328,9 @@
 	//@{
 	/**
-	Calls <var>$f</var> function with super admin rights.
-	
-	@param	f		<b>callback</b>	Callback function
-	@return	<b>mixed</b> Function result
+	* Calls $f function with super admin rights.
+	* Returns the function result.
+	* 
+	* @param callback	$f			Callback function
+	* @return mixed
 	*/
 	public function sudo($f)
@@ -346,11 +363,12 @@
 	//@{
 	/**
-	Returns user permissions for a blog as an array which looks like:
-	
-	 - [blog_id]
-	   - [permission] => true
-	   - ...
-	
-	@return	<b>array</b>
+	* Returns user permissions for a blog as an array which looks like:
+	* 
+	*  - [blog_id]
+	*    - [permission] => true
+	*    - ...
+	* 
+	* @param string	$blog_id		Blog ID
+	* @return array
 	*/
 	public function getPermissions($blog_id)
@@ -422,7 +440,7 @@
 	
 	/**
-	Returns current user ID
-	
-	@return	<b>string</b>
+	* Returns current user ID
+	* 
+	* @return string
 	*/
 	public function userID()
@@ -432,8 +450,8 @@
 	
 	/**
-	Returns information about a user .
-	
-	@param	n		<b>string</b>		Information name
-	@return	<b>string</b> Information value
+	* Returns information about a user .
+	* 
+	* @param string	$n			Information name
+	* @return string
 	*/
 	public function getInfo($n)
@@ -447,8 +465,8 @@
 	
 	/**
-	Returns a specific user option
-	
-	@param	n		<b>string</b>		Option name
-	@return	<b>string</b> Option value
+	* Returns a specific user option
+	* 
+	* @param string	$n			Option name
+	* @return string
 	*/
 	public function getOption($n)
@@ -461,7 +479,7 @@
 	
 	/**
-	Returns all user options in an associative array.
-	
-	@return	<b>array</b>
+	* Returns all user options in an associative array.
+	* 
+	* @return array
 	*/
 	public function getOptions()
@@ -474,8 +492,8 @@
 	//@{
 	/**
-	Returns an array with permissions parsed from the string <var>$level</var>
-	
-	@param	level	<b>string</b>		Permissions string
-	@return	<b>array</b>
+	* Returns an array with permissions parsed from the string <var>$level</var>
+	* 
+	* @param string	$level		Permissions string
+	* @return array
 	*/
 	public function parsePermissions($level)
@@ -492,7 +510,7 @@
 	
 	/**
-	Returns <var>perm_types</var> property content.
-	
-	@return	<b>array</b>
+	* Returns <var>perm_types</var> property content.
+	* 
+	* @return array
 	*/
 	public function getPermissionsTypes()
@@ -502,8 +520,8 @@
 	
 	/**
-	Adds a new permission type.
-	
-	@param	name		<b>string</b>		Permission name
-	@param	title	<b>string</b>		Permission title
+	* Adds a new permission type.
+	* 
+	* @param string	$name		Permission name
+	* @param string	$title		Permission title
 	*/
 	public function setPermissionType($name,$title)
@@ -516,10 +534,10 @@
 	//@{
 	/**
-	Add a recover key to a specific user identified by its email and
-	password.
-	
-	@param	user_id		<b>string</b>		User ID
-	@param	user_email	<b>string</b>		User Email
-	@return	<b>string</b> Recover key
+	* Add a recover key to a specific user identified by its email and
+	* password.
+	* 
+	* @param string	$user_id		User ID
+	* @param string	$user_email	User Email
+	* @return string
 	*/
 	public function setRecoverKey($user_id,$user_email)
@@ -547,12 +565,12 @@
 	
 	/**
-	Creates a new user password using recovery key. Returns an array:
-	
-	- user_email
-	- user_id
-	- new_pass
-	
-	@param	recover_key	<b>string</b>		Recovery key
-	@return	<b>array</b>
+	* Creates a new user password using recovery key. Returns an array:
+	* 
+	* - user_email
+	* - user_id
+	* - new_pass
+	* 
+	* @param string	$recover_key	Recovery key
+	* @return array
 	*/
 	public function recoverUserPassword($recover_key)
@@ -590,22 +608,22 @@
 	
 	/**
-	Called after core->addUser
-	@see		dcCore::addUser
-	@param	cur		<b>cursor</b>		User cursor
+	* Called after core->addUser
+	* @see dcCore::addUser
+	* @param cursor	$cur			User cursor
 	*/
 	public function afterAddUser($cur) {}
 	
 	/**
-	Called after core->updUser
-	@see		dcCore::updUser
-	@param	id		<b>string</b>		User ID
-	@param	cur		<b>cursor</b>		User cursor
+	* Called after core->updUser
+	* @see dcCore::updUser
+	* @param string	$id			User ID
+	* @param cursor	$cur			User cursor
 	*/
 	public function afterUpdUser($id,$cur) {}
 	
 	/**
-	Called after core->delUser
-	@see		dcCore::delUser
-	@param	id		<b>string</b>		User ID
+	* Called after core->delUser
+	* @see dcCore::delUser
+	* @param string	$id			User ID
 	*/
 	public function afterDelUser($id) {}
Index: inc/core/class.dc.blog.php
===================================================================
--- inc/core/class.dc.blog.php	(revision 270)
+++ inc/core/class.dc.blog.php	(revision 407)
@@ -21,21 +21,36 @@
 class dcBlog
 {
-	protected $core;	///< <b>dcCore</b> dcCore instance
-	public $con;		///< <b>connection</b>	Database connection object
-	public $prefix;	///< <b>string</b>		Database table prefix
-	
-	public $id;		///< <b>string</b>		Blog ID
-	public $uid;		///< <b>string</b>		Blog unique ID
-	public $name;		///< <b>string</b>		Blog name
-	public $desc;		///< <b>string</b>		Blog description
-	public $url;		///< <b>string</b>		Blog URL
-	public $host;		///< <b>string</b>		Blog host
-	public $creadt;	///< <b>string</b>		Blog creation date
-	public $upddt;		///< <b>string</b>		Blog last update date
-	public $status;	///< <b>string</b>		Blog status
-	
-	public $settings;		///< <b>dcSettings</b>	dcSettings object
-	public $themes_path;	///< <b>string</b>		Blog theme path
-	public $public_path;	///< <b>string</b>		Blog public path
+	/** @var dcCore dcCore instance */
+	protected $core;
+	/** @var connection Database connection object */
+	public $con;
+	/** @var string Database table prefix */
+	public $prefix;
+	
+	/** @var string Blog ID */
+	public $id;
+	/** @var string Blog unique ID */
+	public $uid;
+	/** @var string Blog name */
+	public $name;
+	/** @var string Blog description */
+	public $desc;
+	/** @var string Blog URL */
+	public $url;
+	/** @var string Blog host */
+	public $host;
+	/** @var string Blog creation date */
+	public $creadt;
+	/** @var string Blog last update date */
+	public $upddt;
+	/** @var string Blog status */
+	public $status;
+	
+	/** @var dcSettings dcSettings object */
+	public $settings;
+	/** @var string Blog theme path */
+	public $themes_path;
+	/** @var string Blog public path */
+	public $public_path;
 	
 	private $post_status = array();
@@ -44,5 +59,6 @@
 	private $categories;
 	
-	public $without_password = true;	///< <b>boolean</b> Disallow entries password protection
+	/** @var boolean Disallow entries password protection */
+	public $without_password = true;
 	
 	/**
@@ -391,5 +407,5 @@
 		
 		if (!empty($params['post_type'])) {
-			$strReq .= "AND post_type = '".$this->con->escape($params['post_type'])."' ";
+			$strReq .= 'AND P.post_type '.$this->con->in($params['post_type']);
 		}
 		
@@ -711,8 +727,6 @@
 		if (isset($params['post_type']))
 		{
-			if (is_array($params['post_type']) && !empty($params['post_type'])) {
+			if (is_array($params['post_type']) || $params['post_type'] != '') {
 				$strReq .= 'AND post_type '.$this->con->in($params['post_type']);
-			} elseif ($params['post_type'] != '') {
-				$strReq .= "AND post_type = '".$this->con->escape($params['post_type'])."' ";
 			}
 		}
@@ -858,11 +872,11 @@
 		
 		if($dir > 0) {
-               $sign = '>';
-               $order = 'ASC';
-          }
-          else {
-               $sign = '<';
-               $order = 'DESC';
-          }
+			$sign = '>';
+			$order = 'ASC';
+		}
+		else {
+			$sign = '<';
+			$order = 'DESC';
+		}
 		
 		$params['post_type'] = $post->post_type;
@@ -1025,5 +1039,5 @@
 			$strReq .= "AND post_type = 'post' ";
 		}
-				
+		
 		if (!empty($params['year'])) {
 			$strReq .= 'AND '.$this->con->dateFormat('post_dt','%Y')." = '".sprintf('%04d',$params['year'])."' ";
@@ -1165,5 +1179,5 @@
 		$cur->post_upddt = date('Y-m-d H:i:s');
 		
-		#�If user is only "usage", we need to check the post's owner
+		#If user is only "usage", we need to check the post's owner
 		if (!$this->core->auth->check('contentadmin',$this->id))
 		{
@@ -1768,9 +1782,5 @@
 		if (!empty($params['post_type']))
 		{
-			if (is_array($params['post_type']) && !empty($params['post_type'])) {
-				$strReq .= 'AND post_type '.$this->con->in($params['post_type']);
-			} else {
-				$strReq .= "AND post_type = '".$this->con->escape($params['post_type'])."' ";
-			}
+			$strReq .= 'AND post_type '.$this->con->in($params['post_type']);
 		}
 		
Index: inc/core/class.dc.core.php
===================================================================
--- inc/core/class.dc.core.php	(revision 270)
+++ inc/core/class.dc.core.php	(revision 407)
@@ -27,5 +27,5 @@
 {
 	public $con;		///< <b>connection</b>		Database connection object
-	public $prefix;	///< <b>string</b>			Database tables prefix
+	public $prefix;		///< <b>string</b>			Database tables prefix
 	public $blog;		///< <b>dcBlog</b>			dcBlog object
 	public $error;		///< <b>dcError</b>			dcError object
@@ -36,5 +36,6 @@
 	public $plugins;	///< <b>dcModules</b>		dcModules object
 	public $media;		///< <b>dcMedia</b>			dcMedia object
-	public $rest;		///< <b>dcRestServer</b>		dcRestServer object
+	public $postmedia;	///< <b>dcPostMedia</b>		dcPostMedia object
+	public $rest;		///< <b>dcRestServer</b>	dcRestServer object
 	public $log;		///< <b>dcLog</b>			dcLog object
 	
@@ -63,4 +64,16 @@
 		if ($this->con instanceof mysqlConnection) {
 			mysqlConnection::$weak_locks = true;
+		}
+		
+		# define searchpath for postgresql
+		if ($this->con instanceof pgsqlConnection)
+		{
+			$searchpath = explode ('.',$prefix,2);
+			if (count($searchpath) > 1)
+			{
+				$prefix = $searchpath[1];
+				$sql = 'SET search_path TO '.$searchpath[0].',public;';
+				$this->con->execute($sql);
+			}
 		}
 		
Index: inc/core/class.dc.error.php
===================================================================
--- inc/core/class.dc.error.php	(revision 270)
+++ inc/core/class.dc.error.php	(revision 334)
@@ -13,20 +13,24 @@
 
 /**
-@ingroup DC_CORE
-@brief Error class
-
-dcError is a very simple error class, with a stack. Call dcError::add to
-add an error in stack. In administration area, errors are automatically
-displayed.
+* @ingroup DC_CORE
+* @brief Error class
+* 
+* dcError is a very simple error class, with a stack. Call dcError::add to
+* add an error in stack. In administration area, errors are automatically
+* displayed.
 */
 class dcError
 {
-	protected $errors = array();				///< <b>array</b>	Errors stack
-	protected $flag = false;					///< <b>boolean</b>	True if stack is not empty
-	protected $html_list = "<ul>\n%s</ul>\n";	///< <b>string</b>	HTML errors list pattern
-	protected $html_item = "<li>%s</li>\n";	///< <b>string</b>	HTML error item pattern
+	/** @var array Errors stack */
+	protected $errors = array();
+	/** @var boolean True if stack is not empty */
+	protected $flag = false;
+	/** @var string HTML errors list pattern */
+	protected $html_list = "<ul>\n%s</ul>\n";
+	/** @var string HTML error item pattern */
+	protected $html_item = "<li>%s</li>\n";
 	
 	/**
-	Object constructor.
+	* Object constructor.
 	*/
 	public function __construct()
@@ -37,7 +41,7 @@
 	
 	/**
-	Object string representation. Returns errors stack.
-	
-	@return	<b>string</b>
+	* Object string representation. Returns errors stack.
+	* 
+	* @return string
 	*/
 	public function __toString()
@@ -54,7 +58,7 @@
 	
 	/**
-	Adds an error to stack.
-	
-	@param	msg		<b>string</b>		Error message
+	* Adds an error to stack.
+	* 
+	* @param string	$msg			Error message
 	*/
 	public function add($msg)
@@ -65,7 +69,7 @@
 	
 	/**
-	Returns the value of <var>flag</var> property.
-	
-	@return	<b>boolean</b> True if errors stack is not empty
+	* Returns the value of <var>flag</var> property. True if errors stack is not empty
+	* 
+	* @return boolean
 	*/
 	public function flag()
@@ -75,5 +79,5 @@
 	
 	/**
-	Resets errors stack.
+	* Resets errors stack.
 	*/
 	public function reset()
@@ -84,7 +88,7 @@
 	
 	/**
-	Returns <var>errors</var> property.
-	
-	@return	<b>array</b>
+	* Returns <var>errors</var> property.
+	* 
+	* @return array
 	*/
 	public function getErrors()
@@ -94,8 +98,8 @@
 	
 	/**
-	Sets <var>list</var> and <var>item</var> properties.
-	
-	@param	list		<b>string</b>		HTML errors list pattern
-	@param	item		<b>string</b>		HTML error item pattern
+	* Sets <var>list</var> and <var>item</var> properties.
+	* 
+	* @param string	$list		HTML errors list pattern
+	* @param string	$item		HTML error item pattern
 	*/
 	public function setHTMLFormat($list,$item)
@@ -106,7 +110,7 @@
 	
 	/**
-	Returns errors stack as HTML.
-	
-	@return	<b>string</b>
+	* Returns errors stack as HTML.
+	* 
+	* @return string
 	*/
 	public function toHTML()
Index: inc/core/class.dc.media.php
===================================================================
--- inc/core/class.dc.media.php	(revision 270)
+++ inc/core/class.dc.media.php	(revision 407)
@@ -23,6 +23,6 @@
 	protected $con;		///< <b>connection</b> Database connection
 	protected $table;		///< <b>string</b> Media table name
-	protected $table_ref;	///< <b>string</b> Post-media relation table name
 	protected $type;		///< <b>string</b> Media type filter
+	protected $postmedia;
 	protected $file_sort = 'name-asc';
 	
@@ -57,4 +57,5 @@
 		$this->core =& $core;
 		$this->con =& $core->con;
+		$this->postmedia = new dcPostMedia($core);
 		
 		if ($this->core->blog == null) {
@@ -63,5 +64,4 @@
 		
 		$this->table = $this->core->prefix.'media';
-		$this->table_ref = $this->core->prefix.'post_media';
 		$root = $this->core->blog->public_path;
 		
@@ -494,19 +494,12 @@
 	public function getPostMedia($post_id,$media_id=null)
 	{
-		$post_id = (integer) $post_id;
-		
-		$strReq =
-		'SELECT media_file, M.media_id, media_path, media_title, media_meta, media_dt, '.
-		'media_creadt, media_upddt, media_private, user_id '.
-		'FROM '.$this->table.' M '.
-		'INNER JOIN '.$this->table_ref.' PM ON (M.media_id = PM.media_id) '.
-		"WHERE media_path = '".$this->path."' ".
-		'AND post_id = '.$post_id.' ';
-		
+		$params = array(
+			'post_id' => $post_id,
+			'media_path' => $this->path
+		);
 		if ($media_id) {
-			$strReq .= 'AND M.media_id = '.(integer) $media_id.' ';
-		}
-		
-		$rs = $this->con->select($strReq);
+			$params['media_id'] = (integer) $media_id;
+		}
+		$rs = $this->postmedia->getPostMedia($params);
 		
 		$res = array();
@@ -523,45 +516,19 @@
 	
 	/**
-	Attaches a media to a post.
-	
-	@param	post_id	<b>integer</b>		Post ID
-	@param	media_id	<b>integer</b>		Optionnal media ID
+	@deprecated since version 2.4
+	@see dcPostMedia::addPostMedia
 	*/
 	public function addPostMedia($post_id,$media_id)
 	{
-		$post_id = (integer) $post_id;
-		$media_id = (integer) $media_id;
-		
-		$f = $this->getPostMedia($post_id,$media_id);
-		
-		if (!empty($f)) {
-			return;
-		}
-		
-		$cur = $this->con->openCursor($this->table_ref);
-		$cur->post_id = $post_id;
-		$cur->media_id = $media_id;
-		
-		$cur->insert();
-		$this->core->blog->triggerBlog();
-	}
-	
-	/**
-	Detaches a media from a post.
-	
-	@param	post_id	<b>integer</b>		Post ID
-	@param	media_id	<b>integer</b>		Optionnal media ID
+		$this->postmedia->addPostMedia($post_id,$media_id);
+	}
+	
+	/**
+	@deprecated since version 2.4
+	@see dcPostMedia::removePostMedia
 	*/
 	public function removePostMedia($post_id,$media_id)
 	{
-		$post_id = (integer) $post_id;
-		$media_id = (integer) $media_id;
-		
-		$strReq = 'DELETE FROM '.$this->table_ref.' '.
-				'WHERE post_id = '.$post_id.' '.
-				'AND media_id = '.$media_id.' ';
-		
-		$this->con->execute($strReq);
-		$this->core->blog->triggerBlog();
+		$this->postmedia->removePostMedia($post_id,$media_id,"attachment");
 	}
 	
Index: inc/core/class.dc.modules.php
===================================================================
--- inc/core/class.dc.modules.php	(revision 270)
+++ inc/core/class.dc.modules.php	(revision 464)
@@ -159,9 +159,26 @@
 	@param	author		<b>string</b>		Module author name
 	@param	version		<b>string</b>		Module version
-	@param	permissions	<b>string</b>		Module permissions
-	@param	priority		<b>integer</b>		Module priority
-	*/
-	public function registerModule($name,$desc,$author,$version,$permissions=null,$priority=1000)
-	{
+	@param	properties	<b>array</b>		extra properties (currently available keys : permissions, priority)
+	*/
+	public function registerModule($name,$desc,$author,$version, $properties = array())
+	{
+		if (!is_array($properties)) {
+			//Fallback to legacy registerModule parameters
+			$args = func_get_args();
+			$properties = array();
+			if (isset($args[4])) {
+				$properties['permissions']=$args[4];
+			}
+			if (isset($args[5])) {
+				$properties['priority']= (integer)$args[5];
+			}
+		}
+		$properties = array_merge(
+			array(
+				'permissions' => null,
+				'priority' => 1000
+			), $properties
+		);
+		$permissions = $properties['permissions'];
 		if ($this->ns == 'admin') {
 			if ($permissions == '' && !$this->core->auth->isSuperAdmin()) {
@@ -177,13 +194,14 @@
 			if (!$module_exists || ($module_exists && $module_overwrite)) {
 				$this->modules_names[$name] = $version;
-				$this->modules[$this->id] = array(
-					'root' => $this->mroot,
-					'name' => $name,
-					'desc' => $desc,
-					'author' => $author,
-					'version' => $version,
-					'permissions' => $permissions,
-					'priority' => $priority === null ? 1000 : (integer) $priority,
-					'root_writable' => is_writable($this->mroot)
+				$this->modules[$this->id] = array_merge(
+					$properties,
+					array(
+						'root' => $this->mroot,
+						'name' => $name,
+						'desc' => $desc,
+						'author' => $author,
+						'version' => $version,
+						'root_writable' => is_writable($this->mroot)
+					)
 				);
 			}
Index: inc/core/class.dc.postmedia.php
===================================================================
--- inc/core/class.dc.postmedia.php	(revision 407)
+++ inc/core/class.dc.postmedia.php	(revision 407)
@@ -0,0 +1,172 @@
+<?php
+# -- BEGIN LICENSE BLOCK ---------------------------------------
+#
+# This file is part of Dotclear 2.
+#
+# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
+# Licensed under the GPL version 2.0 license.
+# See LICENSE file or
+# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
+#
+# -- END LICENSE BLOCK -----------------------------------------
+if (!defined('DC_RC_PATH')) { return; }
+
+class dcPostMedia
+{
+	protected $core;		///< <b>dcCore</b> dcCore instance
+	protected $con;		///< <b>connection</b> Database connection
+	protected $table;		///< <b>string</b> Post-Media table name
+	
+	/**
+	Object constructor.
+	
+	@param	core		<b>dcCore</b>		dcCore instance
+	@param	type		<b>string</b>		Media type filter
+	*/
+	public function __construct($core,$type='')
+	{
+		$this->core =& $core;
+		$this->con =& $core->con;
+		$this->table = $this->core->prefix.'post_media';
+	}
+	
+	/**
+	Returns media items attached to a blog post. Result is an array containing
+	fileItems objects.
+	
+	@param	post_id	<b>integer</b>		Post ID
+	@param	media_id	<b>integer</b>		Optionnal media ID
+	@return	<b>array</b> Array of fileItems
+	*/
+	public function getPostMedia($params=array())
+	{
+		$strReq =
+		'SELECT M.media_file, M.media_id, M.media_path, M.media_title, M.media_meta, M.media_dt, '.
+		'M.media_creadt, M.media_upddt, M.media_private, M.user_id, PM.post_id ';
+		
+		if (!empty($params['columns']) && is_array($params['columns'])) {
+			$strReq .= implode(', ',$params['columns']).', ';
+		}
+		
+		$strReq .=
+		'FROM '.$this->core->prefix.'media M '.
+		'INNER JOIN '.$this->table.' PM ON (M.media_id = PM.media_id) ';
+		
+		if (!empty($params['from'])) {
+			$strReq .= $params['from'].' ';
+		}
+		
+		$where='';
+		if (isset($params['post_id'])) {
+			$where[]="PM.post_id ".$this->con->in($params['post_id']);
+		}
+		if (isset($params['media_id'])) {
+			$where[]="M.media_id ".$this->con->in($params['media_id']);
+		}
+		if (isset($params['media_path'])) {
+			$where[]="M.media_path ".$this->con->in($params['media_path']);
+		}
+		if (isset($params['link_type'])) {
+			$where[]="PM.link_type ".$this->con->in($params['link_type']);
+		} else {
+			$where[]="PM.link_type='attachment'";
+		}
+
+		$strReq .= 'WHERE '.join('AND ',$where).' ';
+
+		if (isset($params['sql'])) {
+			$strReq .= $params['sql'];
+		}
+	//echo $strReq; exit;
+		$rs = $this->con->select($strReq);
+		
+		return $rs;
+	}
+
+	/**
+	Attaches a media to a post.
+	
+	@param	post_id	<b>integer</b>		Post ID
+	@param	media_id	<b>integer</b>		Optionnal media ID
+	*/
+	public function addPostMedia($post_id,$media_id,$link_type='attachment')
+	{
+		$post_id = (integer) $post_id;
+		$media_id = (integer) $media_id;
+		
+		$f = $this->getPostMedia(array('post_id'=>$post_id,'media_id'=>$media_id,'link_type'=>$link_type));
+		
+		if (!$f->isEmpty()) {
+			return;
+		}
+		
+		$cur = $this->con->openCursor($this->table);
+		$cur->post_id = $post_id;
+		$cur->media_id = $media_id;
+		$cur->link_type = $link_type;
+		
+		$cur->insert();
+		$this->core->blog->triggerBlog();
+	}
+	
+	/**
+	Detaches a media from a post.
+	
+	@param	post_id	<b>integer</b>		Post ID
+	@param	media_id	<b>integer</b>		Optionnal media ID
+	*/
+	public function removePostMedia($post_id,$media_id,$link_type=null)
+	{
+		$post_id = (integer) $post_id;
+		$media_id = (integer) $media_id;
+		
+		$strReq = 'DELETE FROM '.$this->table.' '.
+				'WHERE post_id = '.$post_id.' '.
+				'AND media_id = '.$media_id.' ';
+		if ($link_type != null) {
+			$strReq .= "AND link_type = '".$this->con->escape($link_type)."'";
+		}
+		$this->con->execute($strReq);
+		$this->core->blog->triggerBlog();
+	}
+	
+	/**
+	Returns media items attached to a blog post. Result is an array containing
+	fileItems objects.
+	
+	@param	post_id	<b>integer</b>		Post ID
+	@param	media_id	<b>integer</b>		Optionnal media ID
+	@return	<b>array</b> Array of fileItems
+	*/
+	public function getLegacyPostMedia($post_id,$media_id=null)
+	{
+		$post_id = (integer) $post_id;
+		
+		$strReq =
+		'SELECT media_file, M.media_id, media_path, media_title, media_meta, media_dt, '.
+		'media_creadt, media_upddt, media_private, user_id '.
+		'FROM '.$this->table.' M '.
+		'INNER JOIN '.$this->table_ref.' PM ON (M.media_id = PM.media_id) '.
+		"WHERE media_path = '".$this->path."' ".
+		'AND post_id = '.$post_id.' ';
+		
+		if ($media_id) {
+			$strReq .= 'AND M.media_id = '.(integer) $media_id.' ';
+		}
+		
+		$rs = $this->con->select($strReq);
+		
+		$res = array();
+		
+		while ($rs->fetch()) {
+			$f = $this->fileRecord($rs);
+			if ($f !== null) {
+				$res[] = $f;
+			}
+		}
+		
+		return $res;
+	}
+	
+}
+?>
Index: inc/core/class.dc.settings.php
===================================================================
--- inc/core/class.dc.settings.php	(revision 270)
+++ inc/core/class.dc.settings.php	(revision 301)
@@ -308,4 +308,77 @@
 	}
 
+	/**
+	Returns a list of settings matching given criteria, for any blog.
+	<b>$params</b> is an array taking the following
+	optionnal parameters:
+	
+	- ns : retrieve setting from given namespace
+	- id : retrieve only settings corresponding to the given id
+	
+	@param	params		<b>array</b>		Parameters
+	@return	<b>record</b>	A record 
+	*/
+	public function getGlobalSettings($params=array())
+	{
+		$strReq = "SELECT * from ".$this->table." ";
+		$where = array();
+		if (!empty($params['ns'])) {
+			$where[] = "setting_ns = '".$this->con->escape($params['ns'])."'";
+		}
+		if (!empty($params['id'])) {
+			$where[] = "setting_id = '".$this->con->escape($params['id'])."'";
+		}
+		if (isset($params['blog_id'])) {
+			if (!empty($params['blog_id'])) {
+				$where[] = "blog_id = '".$this->con->escape($params['blog_id'])."'";
+			} else {
+				$where[] = "blog_id IS NULL";
+			}
+		}
+		if (count($where) != 0) {
+			$strReq .= " WHERE ".join(" AND ", $where);
+		}
+		$strReq .= " ORDER by blog_id";
+		return $this->con->select($strReq);
+	}
+
+	/**
+	Updates a setting from a given record
+	
+	@param	rs		<b>record</b>		the setting to update
+	*/
+	public function updateSetting($rs) 
+	{
+		$cur = $this->con->openCursor($this->table);
+		$cur->setting_id = $rs->setting_id;
+		$cur->setting_value = $rs->setting_value;
+		$cur->setting_type = $rs->setting_type;
+		$cur->setting_label = $rs->setting_label;
+		$cur->blog_id = $rs->blog_id;
+		$cur->setting_ns = $rs->setting_ns;
+		if ($cur->blog_id == null) {
+				$where = 'WHERE blog_id IS NULL ';
+		} else {
+			$where = "WHERE blog_id = '".$this->con->escape($cur->blog_id)."' ";
+		}
+		$cur->update($where."AND setting_id = '".$this->con->escape($cur->setting_id)."' AND setting_ns = '".$this->con->escape($cur->setting_ns)."' ");
+	}
+	
+	/**
+	Drops a setting from a given record
+	
+	@param	rs		<b>record</b>		the setting to drop
+	@return	int		number of deleted records (0 if setting does not exist)
+	*/
+	public function dropSetting($rs) {
+		$strReq = "DELETE FROM ".$this->table.' ';
+		if ($rs->blog_id == null) {
+			$strReq .= 'WHERE blog_id IS NULL ';
+		} else {
+			$strReq .= "WHERE blog_id = '".$this->con->escape($rs->blog_id)."' ";
+		}
+		$strReq .= "AND setting_id = '".$this->con->escape($rs->setting_id)."' AND setting_ns = '".$this->con->escape($rs->setting_ns)."' ";
+		return $this->con->execute($strReq);
+	}
 }
 ?>
Index: inc/core/class.dc.themes.php
===================================================================
--- inc/core/class.dc.themes.php	(revision 270)
+++ inc/core/class.dc.themes.php	(revision 465)
@@ -39,19 +39,37 @@
 	@param	author		<b>string</b>		Module author name
 	@param	version		<b>string</b>		Module version
-	@param	parent		<b>string</b>		Module parent
-	@param	priority		<b>integer</b>		Module priority
+	@param	properties	<b>array</b>		extra properties (currently available keys : parent, priority, standalone_config)
 	*/
-	public function registerModule($name,$desc,$author,$version,$parent = null,$priority = 1000)
+	public function registerModule($name,$desc,$author,$version,$properties = array())
 	{
+		if (!is_array($properties)) {
+			//Fallback to legacy registerModule parameters
+			$args = func_get_args();
+			$properties = array();
+			if (isset($args[4])) {
+				$properties['parent']=$args[4];
+			}
+			if (isset($args[5])) {
+				$properties['priority']= (integer)$args[5];
+			}
+		}
+		$properties = array_merge(
+			array(
+				'parent' => null,
+				'priority' => 1000,
+				'standalone_config' => false
+			), $properties
+		);
 		if ($this->id) {
-			$this->modules[$this->id] = array(
-			'root' => $this->mroot,
-			'name' => $name,
-			'desc' => $desc,
-			'author' => $author,
-			'version' => $version,
-			'parent' => $parent,
-			'priority' => 1000,
-			'root_writable' => is_writable($this->mroot)
+			$this->modules[$this->id] = array_merge(
+				$properties,
+				array(
+					'root' => $this->mroot,
+					'name' => $name,
+					'desc' => $desc,
+					'author' => $author,
+					'version' => $version,
+					'root_writable' => is_writable($this->mroot)
+				)
 			);
 		}
Index: inc/dbschema/db-schema.php
===================================================================
--- inc/dbschema/db-schema.php	(revision 270)
+++ inc/dbschema/db-schema.php	(revision 407)
@@ -152,6 +152,7 @@
 	->media_id	('bigint',	0,	false)
 	->post_id		('bigint',	0,	false)
-	
-	->primary('pk_post_media','media_id','post_id')
+	->link_type		('varchar',	32,	false,	"'attachment'")
+	
+	->primary('pk_post_media','media_id','post_id','link_type')
 	;
 
@@ -235,4 +236,5 @@
 $_s->media->index		('idx_media_user_id',			'btree',	'user_id');
 $_s->post_media->index	('idx_post_media_post_id',		'btree',	'post_id');
+$_s->post_media->index	('idx_post_media_media_id',		'btree',	'media_id');
 $_s->log->index		('idx_log_user_id',				'btree',	'user_id');
 $_s->comment->index		('idx_comment_post_id',			'btree',	'post_id');
Index: inc/dbschema/upgrade.php
===================================================================
--- inc/dbschema/upgrade.php	(revision 270)
+++ inc/dbschema/upgrade.php	(revision 462)
@@ -20,5 +20,5 @@
 	}
 	
-	if (version_compare($version,DC_VERSION,'<') == 1)
+	if (version_compare($version,DC_VERSION,'<') == 1 || strpos(DC_VERSION,'dev'))
 	{
 		try
@@ -149,27 +149,27 @@
 				$init_fav = array();
 
-				$init_fav['new_post'] = array('new_post',__('New entry'),'post.php',
+				$init_fav['new_post'] = array('new_post','New entry','post.php',
 					'images/menu/edit.png','images/menu/edit-b.png',
 					'usage,contentadmin',null,'menu-new-post');
-				$init_fav['posts'] = array('posts',__('Entries'),'posts.php',
+				$init_fav['posts'] = array('posts','Entries','posts.php',
 					'images/menu/entries.png','images/menu/entries-b.png',
 					'usage,contentadmin',null,null);
-				$init_fav['comments'] = array('comments',__('Comments'),'comments.php',
+				$init_fav['comments'] = array('comments','Comments','comments.php',
 					'images/menu/comments.png','images/menu/comments-b.png',
 					'usage,contentadmin',null,null);
-				$init_fav['prefs'] = array('prefs',__('My preferences'),'preferences.php',
+				$init_fav['prefs'] = array('prefs','My preferences','preferences.php',
 					'images/menu/user-pref.png','images/menu/user-pref-b.png',
 					'*',null,null);
-				$init_fav['blog_pref'] = array('blog_pref',__('Blog settings'),'blog_pref.php',
+				$init_fav['blog_pref'] = array('blog_pref','Blog settings','blog_pref.php',
 					'images/menu/blog-pref.png','images/menu/blog-pref-b.png',
 					'admin',null,null);
-				$init_fav['blog_theme'] = array('blog_theme',__('Blog appearance'),'blog_theme.php',
+				$init_fav['blog_theme'] = array('blog_theme','Blog appearance','blog_theme.php',
 					'images/menu/themes.png','images/menu/blog-theme-b.png',
 					'admin',null,null);
 
-				$init_fav['pages'] = array('pages',__('Pages'),'plugin.php?p=pages',
+				$init_fav['pages'] = array('pages','Pages','plugin.php?p=pages',
 					'index.php?pf=pages/icon.png','index.php?pf=pages/icon-big.png',
 					'contentadmin,pages',null,null);
-				$init_fav['blogroll'] = array('blogroll',__('Blogroll'),'plugin.php?p=blogroll',
+				$init_fav['blogroll'] = array('blogroll','Blogroll','plugin.php?p=blogroll',
 					'index.php?pf=blogroll/icon-small.png','index.php?pf=blogroll/icon.png',
 					'usage,contentadmin',null,null);
@@ -290,4 +290,11 @@
 			}
 			
+			if (version_compare($version,'2.3.1','<'))
+			{
+				# Remove unecessary file
+				@unlink(DC_ROOT.'/'.'inc/libs/clearbricks/.hgignore');
+			}
+			
+			
 			$core->setVersion('core',DC_VERSION);
 			$core->blogDefaults();
Index: inc/prepend.php
===================================================================
--- inc/prepend.php	(revision 286)
+++ inc/prepend.php	(revision 407)
@@ -43,4 +43,5 @@
 $__autoload['dcMeta']				= dirname(__FILE__).'/core/class.dc.meta.php';
 $__autoload['dcMedia']				= dirname(__FILE__).'/core/class.dc.media.php';
+$__autoload['dcPostMedia']				= dirname(__FILE__).'/core/class.dc.postmedia.php';
 $__autoload['dcModules']				= dirname(__FILE__).'/core/class.dc.modules.php';
 $__autoload['dcThemes']				= dirname(__FILE__).'/core/class.dc.themes.php';
Index: inc/public/class.dc.template.php
===================================================================
--- inc/public/class.dc.template.php	(revision 270)
+++ inc/public/class.dc.template.php	(revision 415)
@@ -54,18 +54,4 @@
 		$this->addValue('ArchiveEntriesCount',array($this,'ArchiveEntriesCount'));
 		$this->addValue('ArchiveURL',array($this,'ArchiveURL'));
-		
-		# Attachments
-		$this->addBlock('Attachments',array($this,'Attachments'));
-		$this->addBlock('AttachmentsHeader',array($this,'AttachmentsHeader'));
-		$this->addBlock('AttachmentsFooter',array($this,'AttachmentsFooter'));
-		$this->addValue('AttachmentMimeType',array($this,'AttachmentMimeType'));
-		$this->addValue('AttachmentType',array($this,'AttachmentType'));
-		$this->addValue('AttachmentFileName',array($this,'AttachmentFileName'));
-		$this->addValue('AttachmentSize',array($this,'AttachmentSize'));
-		$this->addValue('AttachmentTitle',array($this,'AttachmentTitle'));
-		$this->addValue('AttachmentThumbnailURL',array($this,'AttachmentThumbnailURL'));
-		$this->addValue('AttachmentURL',array($this,'AttachmentURL'));
-		$this->addBlock('AttachmentIf',array($this,'AttachmentIf'));
-		$this->addValue('MediaURL',array($this,'MediaURL'));
 		
 		# Blog
@@ -141,5 +127,4 @@
 		$this->addBlock('EntriesHeader',array($this,'EntriesHeader'));
 		$this->addValue('EntryExcerpt',array($this,'EntryExcerpt'));
-		$this->addValue('EntryAttachmentCount',array($this,'EntryAttachmentCount'));
 		$this->addValue('EntryAuthorCommonName',array($this,'EntryAuthorCommonName'));
 		$this->addValue('EntryAuthorDisplayName',array($this,'EntryAuthorDisplayName'));
@@ -323,4 +308,10 @@
 		}
 		
+		if (($node instanceof tplNodeBlock) && !$node->isClosed()) {
+			$errors[] = sprintf(
+				__('Did not find closing tag for block <tpl:%s>. Content has been ignored.'),
+				html::escapeHTML($node->getTag()));
+		}
+		
 		$err = "";
 		if (count($errors) > 0) {
@@ -341,4 +332,7 @@
 		# --BEHAVIOR-- templateBeforeBlock
 		$res = $this->core->callBehavior('templateBeforeBlock',$this->core,$this->current_tag,$attr);
+		
+		# --BEHAVIOR-- templateInsideBlock
+		$this->core->callBehavior('templateInsideBlock',$this->core,$this->current_tag,$attr,array(&$content));
 		
 		if (isset($this->blocks[$this->current_tag])) {
@@ -563,5 +557,5 @@
 		}
 		
-		if (empty($attr['no_context']))
+		if (empty($attr['no_context']) && !isset($attr['category']))
 		{
 			$p .=
@@ -740,173 +734,4 @@
 	}
 	
-	/* Attachments ---------------------------------------- */
-	/*dtd
-	<!ELEMENT tpl:Attachments - - -- Post Attachments loop -->
-	*/
-	public function Attachments($attr,$content)
-	{
-		$res =
-		"<?php\n".
-		'if ($_ctx->posts !== null && $core->media) {'."\n".
-			'$_ctx->attachments = new ArrayObject($core->media->getPostMedia($_ctx->posts->post_id));'."\n".
-		"?>\n".
-		
-		'<?php foreach ($_ctx->attachments as $attach_i => $attach_f) : '.
-		'$GLOBALS[\'attach_i\'] = $attach_i; $GLOBALS[\'attach_f\'] = $attach_f;'.
-		'$_ctx->file_url = $attach_f->file_url; ?>'.
-		$content.
-		'<?php endforeach; $_ctx->attachments = null; unset($attach_i,$attach_f,$_ctx->file_url); ?>'.
-		
-		"<?php } ?>\n";
-		
-		return $res;
-	}
-	
-	/*dtd
-	<!ELEMENT tpl:AttachmentsHeader - - -- First attachments result container -->
-	*/
-	public function AttachmentsHeader($attr,$content)
-	{
-		return
-		"<?php if (\$attach_i == 0) : ?>".
-		$content.
-		"<?php endif; ?>";
-	}
-	
-	/*dtd
-	<!ELEMENT tpl:AttachmentsFooter - - -- Last attachments result container -->
-	*/
-	public function AttachmentsFooter($attr,$content)
-	{
-		return
-		"<?php if (\$attach_i+1 == count(\$_ctx->attachments)) : ?>".
-		$content.
-		"<?php endif; ?>";
-	}
-	
-	/*dtd
-	<!ELEMENT tpl:AttachmentsIf - - -- Test on attachment fields -->
-	<!ATTLIST tpl:AttachmentIf
-	is_image	(0|1)	#IMPLIED	-- test if attachment is an image (value : 1) or not (value : 0)
-	has_thumb	(0|1)	#IMPLIED	-- test if attachment has a square thumnail (value : 1) or not (value : 0)
-	is_mp3	(0|1)	#IMPLIED	-- test if attachment is a mp3 file (value : 1) or not (value : 0)
-	is_flv	(0|1)	#IMPLIED	-- test if attachment is a flv file (value : 1) or not (value : 0)
-	>
-	*/
-	public function AttachmentIf($attr,$content)
-	{
-		$if = array();
-		
-		$operator = isset($attr['operator']) ? $this->getOperator($attr['operator']) : '&&';
-		
-		if (isset($attr['is_image'])) {
-			$sign = (boolean) $attr['is_image'] ? '' : '!';
-			$if[] = $sign.'$attach_f->media_image';
-		}
-		
-		if (isset($attr['has_thumb'])) {
-			$sign = (boolean) $attr['has_thumb'] ? '' : '!';
-			$if[] = $sign.'isset($attach_f->media_thumb[\'sq\'])';
-		}
-		
-		if (isset($attr['is_mp3'])) {
-			$sign = (boolean) $attr['is_mp3'] ? '==' : '!=';
-			$if[] = '$attach_f->type '.$sign.' "audio/mpeg3"';
-		}
-		
-		if (isset($attr['is_flv'])) {
-			$sign = (boolean) $attr['is_flv'] ? '' : '!';
-			$if[] = $sign.
-				'($attach_f->type == "video/x-flv" || '.
-				'$attach_f->type == "video/mp4" || '.
-				'$attach_f->type == "video/x-m4v")';
-		}
-		
-		if (!empty($if)) {
-			return '<?php if('.implode(' '.$operator.' ',$if).') : ?>'.$content.'<?php endif; ?>';
-		} else {
-			return $content;
-		}
-	}
-	
-	/*dtd
-	<!ELEMENT tpl:AttachmentMimeType - O -- Attachment MIME Type -->
-	*/
-	public function AttachmentMimeType($attr)
-	{
-		$f = $this->getFilters($attr);
-		return '<?php echo '.sprintf($f,'$attach_f->type').'; ?>';
-	}
-	
-	/*dtd
-	<!ELEMENT tpl:AttachmentType - O -- Attachment type -->
-	*/
-	public function AttachmentType($attr)
-	{
-		$f = $this->getFilters($attr);
-		return '<?php echo '.sprintf($f,'$attach_f->media_type').'; ?>';
-	}
-	
-	/*dtd
-	<!ELEMENT tpl:AttachmentFileName - O -- Attachment file name -->
-	*/
-	public function AttachmentFileName($attr)
-	{
-		$f = $this->getFilters($attr);
-		return '<?php echo '.sprintf($f,'$attach_f->basename').'; ?>';
-	}
-	
-	/*dtd
-	<!ELEMENT tpl:AttachmentSize - O -- Attachment size -->
-	<!ATTLIST tpl:AttachmentSize
-	full	CDATA	#IMPLIED	-- if set, size is rounded to a human-readable value (in KB, MB, GB, TB)
-	>
-	*/
-	public function AttachmentSize($attr)
-	{
-		$f = $this->getFilters($attr);
-		if (!empty($attr['full'])) {
-			return '<?php echo '.sprintf($f,'$attach_f->size').'; ?>';
-		}
-		return '<?php echo '.sprintf($f,'files::size($attach_f->size)').'; ?>';
-	}
-	
-	/*dtd
-	<!ELEMENT tpl:AttachmentTitle - O -- Attachment title -->
-	*/
-	public function AttachmentTitle($attr)
-	{
-		$f = $this->getFilters($attr);
-		return '<?php echo '.sprintf($f,'$attach_f->media_title').'; ?>';
-	}
-	
-	/*dtd
-	<!ELEMENT tpl:AttachmentThumbnailURL - O -- Attachment square thumbnail URL -->
-	*/
-	public function AttachmentThumbnailURL($attr)
-	{
-		$f = $this->getFilters($attr);
-		return
-		'<?php '.
-		'if (isset($attach_f->media_thumb[\'sq\'])) {'.
-			'echo '.sprintf($f,'$attach_f->media_thumb[\'sq\']').';'.
-		'}'.
-		'?>';
-	}
-	
-	/*dtd
-	<!ELEMENT tpl:AttachmentURL - O -- Attachment URL -->
-	*/
-	public function AttachmentURL($attr)
-	{
-		$f = $this->getFilters($attr);
-		return '<?php echo '.sprintf($f,'$attach_f->file_url').'; ?>';
-	}
-	
-	public function MediaURL($attr)
-	{
-		$f = $this->getFilters($attr);
-		return '<?php echo '.sprintf($f,'$_ctx->file_url').'; ?>';
-	}
 	
 	/* Blog ----------------------------------------------- */
@@ -1151,5 +976,5 @@
 	public function CategoryIf($attr,$content)
 	{
-		$if = array();
+		$if = new ArrayObject();
 		$operator = isset($attr['operator']) ? $this->getOperator($attr['operator']) : '&&';
 		
@@ -1174,6 +999,8 @@
 		} 
 		
-		if (!empty($if)) {
-			return '<?php if('.implode(' '.$operator.' ',$if).') : ?>'.$content.'<?php endif; ?>';
+		$this->core->callBehavior('tplIfConditions','CategoryIf',$attr,$content,$if);
+		
+		if (count($if) != 0) {
+			return '<?php if('.implode(' '.$operator.' ', (array) $if).') : ?>'.$content.'<?php endif; ?>';
 		} else {
 			return $content;
@@ -1324,13 +1151,19 @@
 		if (empty($attr['no_context']))
 		{
-			$p .=
-			'if ($_ctx->exists("users")) { '.
-				"\$params['user_id'] = \$_ctx->users->user_id; ".
-			"}\n";
+			if (!isset($attr['author']))
+			{
+				$p .=
+				'if ($_ctx->exists("users")) { '.
+					"\$params['user_id'] = \$_ctx->users->user_id; ".
+				"}\n";
+			}
 			
-			$p .=
-			'if ($_ctx->exists("categories")) { '.
-				"\$params['cat_id'] = \$_ctx->categories->cat_id; ".
-			"}\n";
+			if (!isset($attr['category']) && (!isset($attr['no_category']) || !$attr['no_category']))
+			{
+				$p .=
+				'if ($_ctx->exists("categories")) { '.
+					"\$params['cat_id'] = \$_ctx->categories->cat_id; ".
+				"}\n";
+			}
 			
 			$p .=
@@ -1416,5 +1249,5 @@
 	selected	(0|1)	#IMPLIED	-- post is selected (value : 1) or not (value : 0)
 	has_category	(0|1)	#IMPLIED	-- post has a category (value : 1) or not (value : 0)
-	has_attachment	(0|1)	#IMPLIED	-- post has attachments (value : 1) or not (value : 0)
+	has_attachment	(0|1)	#IMPLIED	-- post has attachments (value : 1) or not (value : 0) (see Attachment plugin for code)
 	comments_active	(0|1)	#IMPLIED	-- comments are active for this post (value : 1) or not (value : 0)
 	pings_active	(0|1)	#IMPLIED	-- trackbacks are active for this post (value : 1) or not (value : 0)
@@ -1427,5 +1260,5 @@
 	public function EntryIf($attr,$content)
 	{
-		$if = array();
+		$if = new ArrayObject();
 		$extended = null;
 		$hascategory = null;
@@ -1484,9 +1317,4 @@
 		}
 		
-		if (isset($attr['has_attachment'])) {
-			$sign = (boolean) $attr['has_attachment'] ? '' : '!';
-			$if[] = $sign.'$_ctx->posts->countMedia()';
-		}
-		
 		if (isset($attr['comments_active'])) {
 			$sign = (boolean) $attr['comments_active'] ? '' : '!';
@@ -1525,6 +1353,8 @@
 		}
 		
-		if (!empty($if)) {
-			return '<?php if('.implode(' '.$operator.' ',$if).') : ?>'.$content.'<?php endif; ?>';
+		$this->core->callBehavior('tplIfConditions','EntryIf',$attr,$content,$if);
+		
+		if (count($if) != 0) {
+			return '<?php if('.implode(' '.$operator.' ', (array) $if).') : ?>'.$content.'<?php endif; ?>';
 		} else {
 			return $content;
@@ -1621,37 +1451,4 @@
 	}
 	
-	/*dtd
-	<!ELEMENT tpl:EntryAttachmentCount - O -- Number of attachments for entry -->
-	<!ATTLIST tpl:EntryAttachmentCount
-	none	CDATA	#IMPLIED	-- text to display for "no attachment" (default: no attachment)
-	one	CDATA	#IMPLIED	-- text to display for "one attachment" (default: one attachment)
-	more	CDATA	#IMPLIED	-- text to display for "more attachment" (default: %s attachment, %s is replaced by the number of attachments)
-	>
-	*/
-	public function EntryAttachmentCount($attr)
-	{
-		$none = 'no attachment';
-		$one = 'one attachment';
-		$more = '%d attachments';
-		
-		if (isset($attr['none'])) {
-			$none = addslashes($attr['none']);
-		}
-		if (isset($attr['one'])) {
-			$one = addslashes($attr['one']);
-		}
-		if (isset($attr['more'])) {
-			$more = addslashes($attr['more']);
-		}
-		
-		return
-		"<?php if (\$_ctx->posts->countMedia() == 0) {\n".
-		"  printf(__('".$none."'),(integer) \$_ctx->posts->countMedia());\n".
-		"} elseif (\$_ctx->posts->countMedia() == 1) {\n".
-		"  printf(__('".$one."'),(integer) \$_ctx->posts->countMedia());\n".
-		"} else {\n".
-		"  printf(__('".$more."'),(integer) \$_ctx->posts->countMedia());\n".
-		"} ?>";
-	}
 	
 	/*dtd
@@ -2209,6 +2006,8 @@
 		}
 		
-		if (!empty($if)) {
-			return '<?php if('.implode(' && ',$if).') : ?>'.$content.'<?php endif; ?>';
+		$this->core->callBehavior('tplIfConditions','PaginationIf',$attr,$content,$if);
+		
+		if (count($if) != 0) {
+			return '<?php if('.implode(' && ', (array) $if).') : ?>'.$content.'<?php endif; ?>';
 		} else {
 			return $content;
@@ -2482,6 +2281,8 @@
 		}
 		
-		if (!empty($if)) {
-			return '<?php if('.implode(' && ',$if).') : ?>'.$content.'<?php endif; ?>';
+		$this->core->callBehavior('tplIfConditions','CommentIf',$attr,$content,$if);
+		
+		if (count($if) != 0) {
+			return '<?php if('.implode(' && ', (array) $if).') : ?>'.$content.'<?php endif; ?>';
 		} else {
 			return $content;
@@ -2973,5 +2774,5 @@
 	current_mode		CDATA	#IMPLIED	-- tests if current URL mode is the one given in parameter
 	has_tpl			CDATA     #IMPLIED  -- tests if a named template exists
-	has_tag			CDATA     #IMPLIED  -- tests if a named template tag exists
+	has_tag			CDATA     #IMPLIED  -- tests if a named template tag exists (see Tag plugin for code)
 	blog_id			CDATA     #IMPLIED  -- tests if current blog ID is the one given in parameter
 	comments_active	(0|1)	#IMPLIED	-- test if comments are enabled blog-wide 
@@ -2983,5 +2784,5 @@
 	public function SysIf($attr,$content)
 	{
-		$if = array();
+		$if = new ArrayObject();
 		$is_ping = null;
 		
@@ -3029,13 +2830,4 @@
 		}
 		
-		if (isset($attr['has_tag'])) {
-			$sign = '';
-			if (substr($attr['has_tag'],0,1) == '!') {
-				$sign = '!';
-				$attr['has_tag'] = substr($attr['has_tag'],1);
-			}
-			$if[] =  $sign."(\$core->tpl->tagExists('".addslashes($attr['has_tag'])."') )";
-		}
-		
 		if (isset($attr['blog_id'])) {
 			$sign = '';
@@ -3067,6 +2859,8 @@
 		}
 		
-		if (!empty($if)) {
-			return '<?php if('.implode(' '.$operator.' ',$if).') : ?>'.$content.'<?php endif; ?>';
+		$this->core->callBehavior('tplIfConditions','SysIf',$attr,$content,$if);
+		
+		if (count($if) != 0) {
+			return '<?php if('.implode(' '.$operator.' ', (array) $if).') : ?>'.$content.'<?php endif; ?>';
 		} else {
 			return $content;
@@ -3230,4 +3024,7 @@
 		$this->closed = true;
 	}
+	public function isClosed() {
+		return $this->closed;
+	}
 	public function compile($tpl) {
 		if ($this->closed) {
Index: inc/public/default-templates/password-form.html
===================================================================
--- inc/public/default-templates/password-form.html	(revision 199)
+++ inc/public/default-templates/password-form.html	(revision 454)
@@ -34,6 +34,5 @@
 
 <p>{{tpl:lang You must give a password to access this area.}}</p>
-<p><label>{{tpl:lang Password:}} <input type="password" name="password" value=""
-tabindex="1" /></label> <input type="submit" value="ok" /></p>
+<p><label>{{tpl:lang Password:}} <input type="password" name="password" value="" /></label> <input type="submit" value="ok" /></p>
 
 </form>
Index: nc/public/default-templates/tag.html
===================================================================
--- inc/public/default-templates/tag.html	(revision 199)
+++ 	(revision )
@@ -1,153 +1,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{{tpl:BlogLanguage}}" lang="{{tpl:BlogLanguage}}">
-<head>
-  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-  <meta name="ROBOTS" content="{{tpl:BlogMetaRobots}}" />
-  
-  <title>{{tpl:lang Tag}} - {{tpl:TagID}} - {{tpl:BlogName encode_html="1"}}<tpl:PaginationIf start="0"> - {{tpl:lang page}} {{tpl:PaginationCurrent}}</tpl:PaginationIf></title>
-  <meta name="copyright" content="{{tpl:BlogCopyrightNotice encode_html="1"}}" />
-  <meta name="author" content="{{tpl:BlogEditor encode_html="1"}}" />
-  <meta name="date" scheme="W3CDTF" content="{{tpl:BlogUpdateDate iso8601="1"}}" />
-  
-  <link rel="schema.dc" href="http://purl.org/dc/elements/1.1/" />
-  <meta name="dc.title" lang="{{tpl:BlogLanguage}}" content="{{tpl:lang Tag}} - {{tpl:TagID}} - {{tpl:BlogName encode_html="1"}}<tpl:PaginationIf start="0"> - {{tpl:lang page}} {{tpl:PaginationCurrent}}</tpl:PaginationIf>" />
-  <meta name="dc.language" content="{{tpl:BlogLanguage}}" />
-  <meta name="dc.publisher" content="{{tpl:BlogEditor encode_html="1"}}" />
-  <meta name="dc.rights" content="{{tpl:BlogCopyrightNotice encode_html="1"}}" />
-  <meta name="dc.date" scheme="W3CDTF" content="{{tpl:BlogUpdateDate iso8601="1"}}" />
-  <meta name="dc.type" content="text" />
-  <meta name="dc.format" content="text/html" />
-  
-  <link rel="top" href="{{tpl:BlogURL}}" title="{{tpl:lang Home}}" />
-  <link rel="contents" href="{{tpl:BlogArchiveURL}}" title="{{tpl:lang Archives}}" />
-  
-  <tpl:Entries no_content="1">
-    <tpl:EntriesHeader>
-      <tpl:Pagination>
-        <tpl:PaginationIf end="0">
-        <link rel="prev" title="{{tpl:lang previous entries}}" href="{{tpl:PaginationURL offset="1"}}" />
-        </tpl:PaginationIf>
-        
-        <tpl:PaginationIf start="0">
-        <link rel="next" title="{{tpl:lang next entries}}" href="{{tpl:PaginationURL offset="-1"}}" />
-        </tpl:PaginationIf>
-      </tpl:Pagination>
-    </tpl:EntriesHeader>
-    
-    <link rel="chapter" href="{{tpl:EntryURL}}" title="{{tpl:EntryTitle encode_html="1"}}" />
-  </tpl:Entries>
-  
-  <link rel="alternate" type="application/atom+xml" title="Atom 1.0" href="{{tpl:TagFeedURL type="atom"}}" />
-  <link rel="meta" type="application/xbel+xml" title="Blogroll" href="{{tpl:BlogrollXbelLink}}" />
-  
-  {{tpl:include src="_head.html"}}
-</head>
-
-<body class="dc-tag">
-<div id="page">
-{{tpl:include src="_top.html"}}
-
-<div id="wrapper">
-
-<div id="main">
-  <div id="content">
-  
-  <div id="content-info">
-    <h2>{{tpl:lang Tag}} - {{tpl:TagID}}</h2>
-    
-    <p><a type="application/atom+xml" href="{{tpl:TagFeedURL type="atom"}}"
-    title="{{tpl:lang This tag's entries Atom feed}}" class="feed">{{tpl:lang Entries feed}}</a>
-    
-    <tpl:SysIf operator="or" comments_active="1" pings_active="1">
-    - <a type="application/atom+xml" href="{{tpl:TagFeedURL type="atom"}}/comments"
-    title="{{tpl:lang This tag's comments Atom feed}}" class="feed">{{tpl:lang Comments feed}}</a>
-    </tpl:SysIf>
-    </p>
-  </div>
-  
-  <tpl:Entries>
-    <div id="p{{tpl:EntryID}}" class="post {{tpl:EntryIfOdd}} {{tpl:EntryIfFirst}}" lang="{{tpl:EntryLang}}" xml:lang="{{tpl:EntryLang}}">
-    <!-- # New day date -->
-    <tpl:DateHeader><p class="day-date">{{tpl:EntryDate}}</p></tpl:DateHeader>
-    
-    <h2 class="post-title"><a
-    href="{{tpl:EntryURL}}">{{tpl:EntryTitle encode_html="1"}}</a></h2>
-    
-    <p class="post-info">{{tpl:lang By}} {{tpl:EntryAuthorLink}}
-    {{tpl:lang on}} {{tpl:EntryDate}}, {{tpl:EntryTime}}
-    <tpl:EntryIf has_category="1">
-    - <a href="{{tpl:EntryCategoryURL}}">{{tpl:EntryCategory encode_html="1"}}</a>
-    </tpl:EntryIf>
-    </p>
-    
-    <tpl:EntryTags>
-    <tpl:TagsHeader><ul class="post-tags"></tpl:TagsHeader>
-    <li><a href="{{tpl:TagURL}}">{{tpl:TagID}}</a></li>
-    <tpl:TagsFooter></ul></tpl:TagsFooter>
-    </tpl:EntryTags>
-    
-    <!-- # --BEHAVIOR-- publicEntryBeforeContent -->
-    {{tpl:SysBehavior behavior="publicEntryBeforeContent"}}
-    
-    <!-- # Entry with an excerpt -->
-    <tpl:EntryIf extended="1">
-      <div class="post-content">{{tpl:EntryExcerpt}}</div>
-      <p class="read-it"><a href="{{tpl:EntryURL}}"
-      title="{{tpl:lang Continue reading}} {{tpl:EntryTitle encode_html="1"}}">{{tpl:lang Continue
-      reading}}</a>...</p>
-    </tpl:EntryIf>
-    
-    <!-- # Entry without excerpt -->
-    <tpl:EntryIf extended="0">
-      <div class="post-content">{{tpl:EntryContent}}</div>
-    </tpl:EntryIf>
-    
-    <!-- # --BEHAVIOR-- publicEntryAfterContent -->
-    {{tpl:SysBehavior behavior="publicEntryAfterContent"}}
-    
-    <!-- # Number of comments, trackbacks and attachments -->
-    <tpl:EntryIf operator="or" show_comments="1" show_pings="1" has_attachment="1">
-      <p class="post-info-co">
-    </tpl:EntryIf>
-    <tpl:EntryIf show_comments="1">
-      <a href="{{tpl:EntryURL}}#comments" class="comment_count">{{tpl:EntryCommentCount}}</a>
-    </tpl:EntryIf>
-    <tpl:EntryIf show_pings="1">
-      <a href="{{tpl:EntryURL}}#pings" class="ping_count">{{tpl:EntryPingCount}}</a></tpl:EntryIf>
-    <tpl:EntryIf has_attachment="1">
-      <a href="{{tpl:EntryURL}}#attachments" class="attach_count">{{tpl:EntryAttachmentCount}}</a></tpl:EntryIf>
-    <tpl:EntryIf operator="or" show_comments="1" show_pings="1" has_attachment="1">
-      </p>
-    </tpl:EntryIf>
-    </div>
-    
-    <tpl:EntriesFooter>
-      <tpl:Pagination>
-        <p class="pagination"><tpl:PaginationIf end="0"><a href="{{tpl:PaginationURL offset="+1"}}" class="prev">&#171;
-        {{tpl:lang previous entries}}</a> - </tpl:PaginationIf>
-        {{tpl:lang page}} {{tpl:PaginationCurrent}} {{tpl:lang of}} {{tpl:PaginationCounter}}
-        <tpl:PaginationIf start="0"> - <a href="{{tpl:PaginationURL offset="-1"}}" class="next">{{tpl:lang next entries}}
-        &#187;</a></tpl:PaginationIf></p>
-      </tpl:Pagination>
-    </tpl:EntriesFooter>
-  </tpl:Entries>
-  </div>
-</div> <!-- End #main -->
-
-<div id="sidebar">
-  <div id="blognav">
-    {{tpl:Widgets type="nav"}}
-  </div> <!-- End #blognav -->
-  
-  <div id="blogextra">
-    {{tpl:Widgets type="extra"}}
-  </div> <!-- End #blogextra -->
-</div>
-
-</div> <!-- End #wrapper -->
-
-{{tpl:include src="_footer.html"}}
-</div> <!-- End #page -->
-</body>
-</html>
Index: nc/public/default-templates/tags.html
===================================================================
--- inc/public/default-templates/tags.html	(revision 199)
+++ 	(revision )
@@ -1,69 +1,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{{tpl:BlogLanguage}}" lang="{{tpl:BlogLanguage}}">
-<head>
-  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-  <meta name="ROBOTS" content="{{tpl:BlogMetaRobots robots="NOINDEX"}}" />
-  
-  <title>{{tpl:lang Tags}} - {{tpl:BlogName encode_html="1"}}</title>
-  <meta name="copyright" content="{{tpl:BlogCopyrightNotice encode_html="1"}}" />
-  <meta name="author" content="{{tpl:BlogEditor encode_html="1"}}" />
-  <meta name="date" scheme="W3CDTF" content="{{tpl:BlogUpdateDate iso8601="1"}}" />
-  
-  <link rel="schema.dc" href="http://purl.org/dc/elements/1.1/" />
-  <meta name="dc.title" lang="{{tpl:BlogLanguage}}" content="{{tpl:lang Tags}} - {{tpl:BlogName encode_html="1"}}" />
-  <meta name="dc.language" content="{{tpl:BlogLanguage}}" />
-  <meta name="dc.publisher" content="{{tpl:BlogEditor encode_html="1"}}" />
-  <meta name="dc.rights" content="{{tpl:BlogCopyrightNotice encode_html="1"}}" />
-  <meta name="dc.date" scheme="W3CDTF" content="{{tpl:BlogUpdateDate iso8601="1"}}" />
-  <meta name="dc.type" content="text" />
-  <meta name="dc.format" content="text/html" />
-  
-  <link rel="top" href="{{tpl:BlogURL}}" title="{{tpl:lang Home}}" />
-  <link rel="contents" href="{{tpl:BlogArchiveURL}}" title="{{tpl:lang Archives}}" />
-  
-  <link rel="meta" type="application/xbel+xml" title="Blogroll" href="{{tpl:BlogrollXbelLink}}" />
-  
-  {{tpl:include src="_head.html"}}
-</head>
-
-<body class="dc-tags">
-<div id="page">
-{{tpl:include src="_top.html"}}
-
-<div id="wrapper">
-
-<div id="main">
-  <div id="content">
-  
-  <div id="content-info">
-    <h2>{{tpl:lang Tags}}</h2>
-  </div>
-  
-  <div class="content-inner">  
-  <ul class="tags">
-    <tpl:Tags>
-      <li><a href="{{tpl:TagURL}}" class="tag{{tpl:TagRoundPercent}}">{{tpl:TagID}}</a></li>
-    </tpl:Tags>
-    </ul>
-  </div>
-  
-  </div>
-</div> <!-- End #main -->
-
-<div id="sidebar">
-  <div id="blognav">
-    {{tpl:Widgets type="nav"}}
-  </div> <!-- End #blognav -->
-  
-  <div id="blogextra">
-    {{tpl:Widgets type="extra"}}
-  </div> <!-- End #blogextra -->
-</div>
-
-</div> <!-- End #wrapper -->
-
-{{tpl:include src="_footer.html"}}
-</div> <!-- End #page -->
-</body>
-</html>
Index: inc/public/lib.urlhandlers.php
===================================================================
--- inc/public/lib.urlhandlers.php	(revision 270)
+++ inc/public/lib.urlhandlers.php	(revision 306)
@@ -204,6 +204,9 @@
 		
 		$n = self::getPageNumber($args);
-		
-		$params['lang'] = $args;
+		$params = new ArrayObject(array(
+			'lang' => $args));
+		
+		$core->callBehavior('publicLangBeforeGetLangs',$params,$args);
+		
 		$_ctx->langs = $core->blog->getLangs($params);
 		
@@ -235,6 +238,9 @@
 		else
 		{
-			$params['cat_url'] = $args;
-			$params['post_type'] = 'post';
+			$params = new ArrayObject(array(
+				'cat_url' => $args,
+				'post_type' => 'post'));
+			
+			$core->callBehavior('publicCategoryBeforeGetCategories',$params,$args);
 			
 			$_ctx->categories = $core->blog->getCategories($params);
@@ -267,7 +273,11 @@
 		elseif (preg_match('|^/([0-9]{4})/([0-9]{2})$|',$args,$m))
 		{
-			$params['year'] = $m[1];
-			$params['month'] = $m[2];
-			$params['type'] = 'month';
+			$params = new ArrayObject(array(
+				'year' => $m[1],
+				'month' => $m[2],
+				'type' => 'month'));
+			
+			$core->callBehavior('publicArchiveBeforeGetDates',$params,$args);
+			
 			$_ctx->archives = $core->blog->getDates($params);
 			
@@ -300,7 +310,9 @@
 			$core->blog->withoutPassword(false);
 			
-			$params = new ArrayObject();
-			$params['post_url'] = $args;
-			
+			$params = new ArrayObject(array(
+				'post_url' => $args));
+			
+			$core->callBehavior('publicPostBeforeGetPosts',$params,$args);
+
 			$_ctx->posts = $core->blog->getPosts($params);
 			
@@ -410,5 +422,5 @@
 						
 						$redir = $_ctx->posts->getURL();
-						$redir .= strpos($redir,'?') !== false ? '&' : '?';
+						$redir .= $core->blog->settings->system->url_scan == 'query_string' ? '&' : '?';
 						
 						try
@@ -481,5 +493,4 @@
 		$cat_url = false;
 		$post_id = null;
-		$params = array();
 		$subtitle = '';
 		
@@ -490,6 +501,9 @@
 		
 		if (preg_match('!^([a-z]{2}(-[a-z]{2})?)/(.*)$!',$args,$m)) {
-			$params['lang'] = $m[1];
+			$params = new ArrayObject(array('lang' => $m[1]));
+			
 			$args = $m[3];
+			
+			$core->callBehavior('publicFeedBeforeGetLangs',$params,$args);
 			
 			$_ctx->langs = $core->blog->getLangs($params);
@@ -535,6 +549,10 @@
 		if ($cat_url)
 		{
-			$params['cat_url'] = $cat_url;
-			$params['post_type'] = 'post';
+			$params = new ArrayObject(array(
+				'cat_url' => $cat_url,
+				'post_type' => 'post'));
+			
+			$core->callBehavior('publicFeedBeforeGetCategories',$params,$args);
+			
 			$_ctx->categories = $core->blog->getCategories($params);
 			
@@ -549,6 +567,10 @@
 		elseif ($post_id)
 		{
-			$params['post_id'] = $post_id;
-			$params['post_type'] = '';
+			$params = new ArrayObject(array(
+				'post_id' => $post_id,
+				'post_type' => ''));
+				
+			$core->callBehavior('publicFeedBeforeGetPosts',$params,$args);
+			
 			$_ctx->posts = $core->blog->getPosts($params);
 			
Index: inc/public/prepend.php
===================================================================
--- inc/public/prepend.php	(revision 420)
+++ inc/public/prepend.php	(revision 270)
@@ -113,10 +113,4 @@
 $core->themes->loadNsFile($__theme,'public');
 
-# Loading translations for selected theme
-if ($__parent_theme) {
-	$core->themes->loadModuleL10N($__parent_theme,$_lang,'main');
-}
-$core->themes->loadModuleL10N($__theme,$_lang,'main');
-
 # --BEHAVIOR-- publicPrepend
 $core->callBehavior('publicPrepend',$core);
Index: locales/fr/help/core_blog_pref.html
===================================================================
--- locales/fr/help/core_blog_pref.html	(revision 175)
+++ locales/fr/help/core_blog_pref.html	(revision 352)
@@ -43,6 +43,7 @@
 <dl>
   <dt>Nom de l'éditeur du blog</dt>
-  <dd>Nom de la personne en charge du blog. Peut être le propriétaire ou le
-  directeur de publication s'il existe.</dd>
+  <dd>Nom de la personne responsable du contenu du blog. Peut être le propriétaire
+  ou le directeur de publication s'il existe. Information affichée dans les
+  informations du flux de syndication.</dd>
   
   <dt>Note de copyright</dt>
Index: plugins/aboutConfig/_define.php
===================================================================
--- plugins/aboutConfig/_define.php	(revision 270)
+++ plugins/aboutConfig/_define.php	(revision 464)
@@ -16,6 +16,5 @@
 	/* Description*/		"Manage every blog configuration directive",
 	/* Author */			"Olivier Meunier",
-	/* Version */			'0.3',
-	/* Permissions */		null
+	/* Version */			'0.3'
 );
 ?>
Index: plugins/akismet/_define.php
===================================================================
--- plugins/akismet/_define.php	(revision 270)
+++ plugins/akismet/_define.php	(revision 464)
@@ -17,6 +17,8 @@
 	/* Author */			"Olivier Meunier",
 	/* Version */			'1.1',
-	/* Permissions */		'usage,contentadmin',
-	/* Priority */			200
+	array(
+		'permissions' =>	'usage,contentadmin',
+		'priority' =>		200
+	)
 );
 ?>
Index: plugins/antispam/_admin.php
===================================================================
--- plugins/antispam/_admin.php	(revision 270)
+++ plugins/antispam/_admin.php	(revision 324)
@@ -29,5 +29,5 @@
 function antispamDashboardFavs($core,$favs)
 {
-	$favs['antispam'] = new ArrayObject(array('antispam',__('Antispam'),'plugin.php?p=antispam',
+	$favs['antispam'] = new ArrayObject(array('antispam','Antispam','plugin.php?p=antispam',
 		'index.php?pf=antispam/icon.png','index.php?pf=antispam/icon-big.png',
 		'admin',null,null));
Index: plugins/antispam/_define.php
===================================================================
--- plugins/antispam/_define.php	(revision 270)
+++ plugins/antispam/_define.php	(revision 464)
@@ -17,6 +17,8 @@
 	/* Author */			"Alain Vagner",
 	/* Version */			'1.3.1',
-	/* Permissions */		'usage,contentadmin',
-	/* Priority */			10
+	array(
+		'permissions' =>	'usage,contentadmin',
+		'priority' =>		10
+	)
 );
 ?>
Index: plugins/attachments/_admin.php
===================================================================
--- plugins/attachments/_admin.php	(revision 416)
+++ plugins/attachments/_admin.php	(revision 416)
@@ -0,0 +1,75 @@
+<?php
+# -- BEGIN LICENSE BLOCK ---------------------------------------
+#
+# This file is part of Dotclear 2.
+#
+# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
+# Licensed under the GPL version 2.0 license.
+# See LICENSE file or
+# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
+#
+# -- END LICENSE BLOCK -----------------------------------------
+if (!defined('DC_CONTEXT_ADMIN')) { return; }
+
+$core->addBehavior ('adminPostFormSidebar',array('attachmentAdmin','adminPostFormSidebar'));
+$core->addBehavior ('adminPostAfterForm',array('attachmentAdmin','adminPostAfterForm'));
+
+class attachmentAdmin
+{
+	public static function adminPostFormSidebar($post) 
+	{
+		if ($post !== null)
+		{
+			$core =& $GLOBALS['core'];
+			$post_media = $core->media->getPostMedia($post->post_id);
+			echo
+			'<h3 class="clear">'.__('Attachments').'</h3>';
+			foreach ($post_media as $f)
+			{
+				$ftitle = $f->media_title;
+				if (strlen($ftitle) > 18) {
+					$ftitle = substr($ftitle,0,16).'...';
+				}
+				echo
+				'<div class="media-item">'.
+				'<a class="media-icon" href="media_item.php?id='.$f->media_id.'">'.
+				'<img src="'.$f->media_icon.'" alt="" title="'.$f->basename.'" /></a>'.
+				'<ul>'.
+				'<li><a class="media-link" href="media_item.php?id='.$f->media_id.'"'.
+				'title="'.$f->basename.'">'.$ftitle.'</a></li>'.
+				'<li>'.$f->media_dtstr.'</li>'.
+				'<li>'.files::size($f->size).' - '.
+				'<a href="'.$f->file_url.'">'.__('open').'</a>'.'</li>'.
+				
+				'<li class="media-action"><a class="attachment-remove" id="attachment-'.$f->media_id.'" '.
+				'href="post_media.php?post_id='.$post->post_id.'&amp;media_id='.$f->media_id.'&amp;remove=1">'.
+				'<img src="images/check-off.png" alt="'.__('remove').'" /></a>'.
+				'</li>'.
+				
+				'</ul>'.
+				'</div>';
+			}
+			unset($f);
+			
+			if (empty($post_media)) {
+				echo '<p>'.__('No attachment.').'</p>';
+			} else {
+			}
+			echo '<p><a class="button" href="media.php?post_id='.$post->post_id.'">'.__('Add files to this entry').'</a></p>';
+		}
+	}
+	
+	public static function adminPostAfterForm($post) {
+		if ($post !== null)
+		{
+			$core =& $GLOBALS['core'];
+			echo
+				'<form action="post_media.php" id="attachment-remove-hide" method="post">'.
+				'<div>'.form::hidden(array('post_id'),$post->post_id).
+				form::hidden(array('media_id'),'').
+				form::hidden(array('remove'),1).
+				$core->formNonce().'</div></form>';
+		}
+	}
+}
+?>
Index: plugins/attachments/_define.php
===================================================================
--- plugins/attachments/_define.php	(revision 464)
+++ plugins/attachments/_define.php	(revision 464)
@@ -0,0 +1,24 @@
+<?php
+# -- BEGIN LICENSE BLOCK ---------------------------------------
+#
+# This file is part of Dotclear 2.
+#
+# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
+# Licensed under the GPL version 2.0 license.
+# See LICENSE file or
+# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
+#
+# -- END LICENSE BLOCK -----------------------------------------
+if (!defined('DC_RC_PATH')) { return; }
+
+$this->registerModule(
+	/* Name */		"attachments",
+	/* Description*/	"Manage post attachments",
+	/* Author */		"Dotclear Team",
+	/* Version */		'1.0',
+	array(
+		'permissions' =>	'contentadmin,pages',
+		'priority' =>		999
+	)
+);
+?>
Index: plugins/attachments/_public.php
===================================================================
--- plugins/attachments/_public.php	(revision 464)
+++ plugins/attachments/_public.php	(revision 464)
@@ -0,0 +1,248 @@
+<?php
+# -- BEGIN LICENSE BLOCK ---------------------------------------
+#
+# This file is part of Dotclear 2.
+#
+# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
+# Licensed under the GPL version 2.0 license.
+# See LICENSE file or
+# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
+#
+# -- END LICENSE BLOCK -----------------------------------------
+if (!defined('DC_RC_PATH')) { return; }
+
+# Attachments
+$core->tpl->addBlock('Attachments',array('attachmentTpl','Attachments'));
+$core->tpl->addBlock('AttachmentsHeader',array('attachmentTpl','AttachmentsHeader'));
+$core->tpl->addBlock('AttachmentsFooter',array('attachmentTpl','AttachmentsFooter'));
+$core->tpl->addValue('AttachmentMimeType',array('attachmentTpl','AttachmentMimeType'));
+$core->tpl->addValue('AttachmentType',array('attachmentTpl','AttachmentType'));
+$core->tpl->addValue('AttachmentFileName',array('attachmentTpl','AttachmentFileName'));
+$core->tpl->addValue('AttachmentSize',array('attachmentTpl','AttachmentSize'));
+$core->tpl->addValue('AttachmentTitle',array('attachmentTpl','AttachmentTitle'));
+$core->tpl->addValue('AttachmentThumbnailURL',array('attachmentTpl','AttachmentThumbnailURL'));
+$core->tpl->addValue('AttachmentURL',array('attachmentTpl','AttachmentURL'));
+$core->tpl->addValue('MediaURL',array('attachmentTpl','MediaURL'));
+$core->tpl->addBlock('AttachmentIf',array('attachmentTpl','AttachmentIf'));
+
+$core->tpl->addValue('EntryAttachmentCount',array('attachmentTpl','EntryAttachmentCount'));
+
+$core->addBehavior('tplIfConditions',array('attachmentBehavior','tplIfConditions'));
+
+class attachmentTpl {
+	
+	/*dtd
+	<!ELEMENT tpl:Attachments - - -- Post Attachments loop -->
+	*/
+	public static function Attachments($attr,$content)
+	{
+		$res =
+		"<?php\n".
+		'if ($_ctx->posts !== null && $core->media) {'."\n".
+			'$_ctx->attachments = new ArrayObject($core->media->getPostMedia($_ctx->posts->post_id));'."\n".
+		"?>\n".
+		
+		'<?php foreach ($_ctx->attachments as $attach_i => $attach_f) : '.
+		'$GLOBALS[\'attach_i\'] = $attach_i; $GLOBALS[\'attach_f\'] = $attach_f;'.
+		'$_ctx->file_url = $attach_f->file_url; ?>'.
+		$content.
+		'<?php endforeach; $_ctx->attachments = null; unset($attach_i,$attach_f,$_ctx->file_url); ?>'.
+		
+		"<?php } ?>\n";
+		
+		return $res;
+	}
+	
+	/*dtd
+	<!ELEMENT tpl:AttachmentsHeader - - -- First attachments result container -->
+	*/
+	public static function AttachmentsHeader($attr,$content)
+	{
+		return
+		"<?php if (\$attach_i == 0) : ?>".
+		$content.
+		"<?php endif; ?>";
+	}
+	
+	/*dtd
+	<!ELEMENT tpl:AttachmentsFooter - - -- Last attachments result container -->
+	*/
+	public static function AttachmentsFooter($attr,$content)
+	{
+		return
+		"<?php if (\$attach_i+1 == count(\$_ctx->attachments)) : ?>".
+		$content.
+		"<?php endif; ?>";
+	}
+	
+	/*dtd
+	<!ELEMENT tpl:AttachmentsIf - - -- Test on attachment fields -->
+	<!ATTLIST tpl:AttachmentIf
+	is_image	(0|1)	#IMPLIED	-- test if attachment is an image (value : 1) or not (value : 0)
+	has_thumb	(0|1)	#IMPLIED	-- test if attachment has a square thumnail (value : 1) or not (value : 0)
+	is_mp3	(0|1)	#IMPLIED	-- test if attachment is a mp3 file (value : 1) or not (value : 0)
+	is_flv	(0|1)	#IMPLIED	-- test if attachment is a flv file (value : 1) or not (value : 0)
+	>
+	*/
+	public static function AttachmentIf($attr,$content)
+	{
+		$if = array();
+		
+		$operator = isset($attr['operator']) ? $this->getOperator($attr['operator']) : '&&';
+		
+		if (isset($attr['is_image'])) {
+			$sign = (boolean) $attr['is_image'] ? '' : '!';
+			$if[] = $sign.'$attach_f->media_image';
+		}
+		
+		if (isset($attr['has_thumb'])) {
+			$sign = (boolean) $attr['has_thumb'] ? '' : '!';
+			$if[] = $sign.'isset($attach_f->media_thumb[\'sq\'])';
+		}
+		
+		if (isset($attr['is_mp3'])) {
+			$sign = (boolean) $attr['is_mp3'] ? '==' : '!=';
+			$if[] = '$attach_f->type '.$sign.' "audio/mpeg3"';
+		}
+		
+		if (isset($attr['is_flv'])) {
+			$sign = (boolean) $attr['is_flv'] ? '' : '!';
+			$if[] = $sign.
+				'($attach_f->type == "video/x-flv" || '.
+				'$attach_f->type == "video/mp4" || '.
+				'$attach_f->type == "video/x-m4v")';
+		}
+		
+		if (count($if) != 0) {
+			return '<?php if('.implode(' '.$operator.' ', (array) $if).') : ?>'.$content.'<?php endif; ?>';
+		} else {
+			return $content;
+		}
+	}
+	
+	/*dtd
+	<!ELEMENT tpl:AttachmentMimeType - O -- Attachment MIME Type -->
+	*/
+	public static function AttachmentMimeType($attr)
+	{
+		$f = $GLOBALS['core']->tpl->getFilters($attr);
+		return '<?php echo '.sprintf($f,'$attach_f->type').'; ?>';
+	}
+	
+	/*dtd
+	<!ELEMENT tpl:AttachmentType - O -- Attachment type -->
+	*/
+	public static function AttachmentType($attr)
+	{
+		$f = $GLOBALS['core']->tpl->getFilters($attr);
+		return '<?php echo '.sprintf($f,'$attach_f->media_type').'; ?>';
+	}
+	
+	/*dtd
+	<!ELEMENT tpl:AttachmentFileName - O -- Attachment file name -->
+	*/
+	public static function AttachmentFileName($attr)
+	{
+		$f = $GLOBALS['core']->tpl->getFilters($attr);
+		return '<?php echo '.sprintf($f,'$attach_f->basename').'; ?>';
+	}
+	
+	/*dtd
+	<!ELEMENT tpl:AttachmentSize - O -- Attachment size -->
+	<!ATTLIST tpl:AttachmentSize
+	full	CDATA	#IMPLIED	-- if set, size is rounded to a human-readable value (in KB, MB, GB, TB)
+	>
+	*/
+	public static function AttachmentSize($attr)
+	{
+		$f = $GLOBALS['core']->tpl->getFilters($attr);
+		if (!empty($attr['full'])) {
+			return '<?php echo '.sprintf($f,'$attach_f->size').'; ?>';
+		}
+		return '<?php echo '.sprintf($f,'files::size($attach_f->size)').'; ?>';
+	}
+	
+	/*dtd
+	<!ELEMENT tpl:AttachmentTitle - O -- Attachment title -->
+	*/
+	public static function AttachmentTitle($attr)
+	{
+		$f = $GLOBALS['core']->tpl->getFilters($attr);
+		return '<?php echo '.sprintf($f,'$attach_f->media_title').'; ?>';
+	}
+	
+	/*dtd
+	<!ELEMENT tpl:AttachmentThumbnailURL - O -- Attachment square thumbnail URL -->
+	*/
+	public static function AttachmentThumbnailURL($attr)
+	{
+		$f = $GLOBALS['core']->tpl->getFilters($attr);
+		return
+		'<?php '.
+		'if (isset($attach_f->media_thumb[\'sq\'])) {'.
+			'echo '.sprintf($f,'$attach_f->media_thumb[\'sq\']').';'.
+		'}'.
+		'?>';
+	}
+	
+	/*dtd
+	<!ELEMENT tpl:AttachmentURL - O -- Attachment URL -->
+	*/
+	public static function AttachmentURL($attr)
+	{
+		$f = $GLOBALS['core']->tpl->getFilters($attr);
+		return '<?php echo '.sprintf($f,'$attach_f->file_url').'; ?>';
+	}
+	
+	public static function MediaURL($attr)
+	{
+		$f = $GLOBALS['core']->tpl->getFilters($attr);
+		return '<?php echo '.sprintf($f,'$_ctx->file_url').'; ?>';
+	}
+	
+	/*dtd
+	<!ELEMENT tpl:EntryAttachmentCount - O -- Number of attachments for entry -->
+	<!ATTLIST tpl:EntryAttachmentCount
+	none	CDATA	#IMPLIED	-- text to display for "no attachment" (default: no attachment)
+	one	CDATA	#IMPLIED	-- text to display for "one attachment" (default: one attachment)
+	more	CDATA	#IMPLIED	-- text to display for "more attachment" (default: %s attachment, %s is replaced by the number of attachments)
+	>
+	*/
+	public static function EntryAttachmentCount($attr)
+	{
+		$none = 'no attachment';
+		$one = 'one attachment';
+		$more = '%d attachments';
+		
+		if (isset($attr['none'])) {
+			$none = addslashes($attr['none']);
+		}
+		if (isset($attr['one'])) {
+			$one = addslashes($attr['one']);
+		}
+		if (isset($attr['more'])) {
+			$more = addslashes($attr['more']);
+		}
+		
+		return
+		"<?php if (\$_ctx->posts->countMedia() == 0) {\n".
+		"  printf(__('".$none."'),(integer) \$_ctx->posts->countMedia());\n".
+		"} elseif (\$_ctx->posts->countMedia() == 1) {\n".
+		"  printf(__('".$one."'),(integer) \$_ctx->posts->countMedia());\n".
+		"} else {\n".
+		"  printf(__('".$more."'),(integer) \$_ctx->posts->countMedia());\n".
+		"} ?>";
+	}
+}
+
+class attachmentBehavior
+{
+	public static function tplIfConditions($tag,$attr,$content,$if)
+	{
+		if ($tag == "EntryIf" && isset($attr['has_attachment'])) {
+			$sign = (boolean) $attr['has_attachment'] ? '' : '!';
+			$if[] = $sign.'$_ctx->posts->countMedia()';
+		}
+	}
+}
+?>
Index: plugins/blogroll/_admin.php
===================================================================
--- plugins/blogroll/_admin.php	(revision 270)
+++ plugins/blogroll/_admin.php	(revision 324)
@@ -20,5 +20,5 @@
 function blogroll_dashboard_favs($core,$favs)
 {
-	$favs['blogroll'] = new ArrayObject(array('blogroll',__('Blogroll'),'plugin.php?p=blogroll',
+	$favs['blogroll'] = new ArrayObject(array('blogroll','Blogroll','plugin.php?p=blogroll',
 		'index.php?pf=blogroll/icon-small.png','index.php?pf=blogroll/icon.png',
 		'usage,contentadmin',null,null));
Index: plugins/blogroll/_define.php
===================================================================
--- plugins/blogroll/_define.php	(revision 270)
+++ plugins/blogroll/_define.php	(revision 464)
@@ -17,5 +17,7 @@
 	/* Author */			"Olivier Meunier",
 	/* Version */			'1.2',
-	/* Permissions */		'blogroll'
+	array(
+		'permissions' =>	'blogroll'
+	)
 );
 ?>
Index: plugins/blogroll/index.php
===================================================================
--- plugins/blogroll/index.php	(revision 270)
+++ plugins/blogroll/index.php	(revision 454)
@@ -311,21 +311,21 @@
 '<fieldset class="two-cols"><legend>'.__('Add a new link').'</legend>'.
 '<p class="col"><label for="link_title" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Title:').' '.
-form::field('link_title',30,255,$link_title,'',2).
+form::field('link_title',30,255,$link_title).
 '</label></p>'.
 
 '<p class="col"><label for="link_href" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('URL:').' '.
-form::field('link_href',30,255,$link_href,'',3).
+form::field('link_href',30,255,$link_href).
 '</label></p>'.
 
 '<p class="col"><label for="link_desc">'.__('Description:').' '.
-form::field('link_desc',30,255,$link_desc,'',4).
+form::field('link_desc',30,255,$link_desc).
 '</label></p>'.
 
 '<p class="col"><label for="link_lang">'.__('Language:').' '.
-form::field('link_lang',5,5,$link_lang,'',5).
+form::field('link_lang',5,5,$link_lang).
 '</label></p>'.
 '<p>'.form::hidden(array('p'),'blogroll').
 $core->formNonce().
-'<input type="submit" name="add_link" value="'.__('Save').'" tabindex="6" /></p>'.
+'<input type="submit" name="add_link" value="'.__('Save').'" /></p>'.
 '</fieldset>'.
 '</form>'.
@@ -337,8 +337,8 @@
 '<fieldset><legend>'.__('Add a new category').'</legend>'.
 '<p><label for="cat_title" class=" classic required"><abbr title="'.__('Required field').'">*</abbr> '.__('Title:').' '.
-form::field('cat_title',30,255,$cat_title,'',7).'</label> '.
+form::field('cat_title',30,255,$cat_title).'</label> '.
 form::hidden(array('p'),'blogroll').
 $core->formNonce().
-'<input type="submit" name="add_cat" value="'.__('Save').'" tabindex="8" /></p>'.
+'<input type="submit" name="add_cat" value="'.__('Save').'" /></p>'.
 '</fieldset>'.
 '</form>'.
@@ -355,5 +355,5 @@
 	'<p>'.form::hidden(array('p'),'blogroll').
 	$core->formNonce().
-	'<input type="submit" name="import_links" value="'.__('import').'" tabindex="10" /></p>'.
+	'<input type="submit" name="import_links" value="'.__('import').'" /></p>'.
 	'</fieldset>'.
 	'</form>';
@@ -398,6 +398,6 @@
 		form::hidden(array('p'),'blogroll').
 		$core->formNonce().
-		'<input type="submit" name="cancel_import" value="'.__('cancel').'" tabindex="10" />&nbsp;'.
-		'<input type="submit" name="import_links_do" value="'.__('import').'" tabindex="11" /></p>'.
+		'<input type="submit" name="cancel_import" value="'.__('cancel').'" />&nbsp;'.
+		'<input type="submit" name="import_links_do" value="'.__('import').'" /></p>'.
 		'</div>';
 	}
Index: plugins/blowupConfig/_define.php
===================================================================
--- plugins/blowupConfig/_define.php	(revision 270)
+++ plugins/blowupConfig/_define.php	(revision 464)
@@ -17,5 +17,7 @@
 	/* Author */			"Olivier Meunier",
 	/* Version */			'1.1',
-	/* Permissions */		'admin'
+	array(
+		'permissions' =>	'admin'
+	)
 );
 ?>
Index: plugins/blowupConfig/_public.php
===================================================================
--- plugins/blowupConfig/_public.php	(revision 295)
+++ plugins/blowupConfig/_public.php	(revision 270)
@@ -25,20 +25,20 @@
 		echo '<style type="text/css">'."\n".self::blowUpStyleHelper()."\n</style>\n";
 	}
-
+	
 	public static function blowUpStyleHelper()
 	{
 		$s = $GLOBALS['core']->blog->settings->themes->blowup_style;
-
+		
 		if ($s === null) {
 			return;
 		}
-
+		
 		$s = @unserialize($s);
 		if (!is_array($s)) {
 			return;
 		}
-
+		
 		$css = array();
-
+		
 		/* Sidebar position
 		---------------------------------------------- */
@@ -48,16 +48,16 @@
 			$css['#sidebar']['float'] = 'left';
 		}
-
+		
 		/* Properties
 		---------------------------------------------- */
 		self::prop($css,'body','background-color',$s['body_bg_c']);
-
+		
 		self::prop($css,'body','color',$s['body_txt_c']);
 		self::prop($css,'.post-tags li a:link, .post-tags li a:visited, .post-info-co a:link, .post-info-co a:visited','color',$s['body_txt_c']);
 		self::prop($css,'#page','font-size',$s['body_txt_s']);
 		self::prop($css,'body','font-family',blowupConfig::fontDef($s['body_txt_f']));
-
+		
 		self::prop($css,'.post-content, .post-excerpt, #comments dd, #pings dd, dd.comment-preview','line-height',$s['body_line_height']);
-
+		
 		if (!$s['blog_title_hide'])
 		{
@@ -65,10 +65,10 @@
 			self::prop($css,'#top h1','font-size',$s['blog_title_s']);
 			self::prop($css,'#top h1','font-family',blowupConfig::fontDef($s['blog_title_f']));
-
+			
 			if ($s['blog_title_a'] == 'right' || $s['blog_title_a'] == 'left') {
 				$css['#top h1'][$s['blog_title_a']] = '0px';
 				$css['#top h1']['width'] = 'auto';
 			}
-
+			
 			if ($s['blog_title_p'])
 			{
@@ -92,13 +92,13 @@
 		}
 		self::prop($css,'#top','height',$s['top_height']);
-
+		
 		self::prop($css,'.day-date','color',$s['date_title_c']);
 		self::prop($css,'.day-date','font-family',blowupConfig::fontDef($s['date_title_f']));
 		self::prop($css,'.day-date','font-size',$s['date_title_s']);
-
+		
 		self::prop($css,'a','color',$s['body_link_c']);
 		self::prop($css,'a:visited','color',$s['body_link_v_c']);
 		self::prop($css,'a:hover, a:focus, a:active','color',$s['body_link_f_c']);
-
+		
 		self::prop($css,'#comment-form input, #comment-form textarea','color',$s['body_link_c']);
 		self::prop($css,'#comment-form input.preview','color',$s['body_link_c']);
@@ -108,21 +108,21 @@
 		self::prop($css,'#comment-form input.submit:hover','background',$s['body_link_f_c']);
 		self::prop($css,'#comment-form input.submit:hover','border-color',$s['body_link_f_c']);
-
+		
 		self::prop($css,'#sidebar','font-family',blowupConfig::fontDef($s['sidebar_text_f']));
 		self::prop($css,'#sidebar','font-size',$s['sidebar_text_s']);
 		self::prop($css,'#sidebar','color',$s['sidebar_text_c']);
-
+		
 		self::prop($css,'#sidebar h2','font-family',blowupConfig::fontDef($s['sidebar_title_f']));
 		self::prop($css,'#sidebar h2','font-size',$s['sidebar_title_s']);
 		self::prop($css,'#sidebar h2','color',$s['sidebar_title_c']);
-
+		
 		self::prop($css,'#sidebar h3','font-family',blowupConfig::fontDef($s['sidebar_title2_f']));
 		self::prop($css,'#sidebar h3','font-size',$s['sidebar_title2_s']);
 		self::prop($css,'#sidebar h3','color',$s['sidebar_title2_c']);
-
+		
 		self::prop($css,'#sidebar ul','border-top-color',$s['sidebar_line_c']);
 		self::prop($css,'#sidebar li','border-bottom-color',$s['sidebar_line_c']);
 		self::prop($css,'#topnav ul','border-bottom-color',$s['sidebar_line_c']);
-
+		
 		self::prop($css,'#sidebar li a','color',$s['sidebar_link_c']);
 		self::prop($css,'#sidebar li a:visited','color',$s['sidebar_link_v_c']);
@@ -132,17 +132,17 @@
 		self::prop($css,'#search .submit:hover','background',$s['sidebar_link_f_c']);
 		self::prop($css,'#search .submit:hover','border-color',$s['sidebar_link_f_c']);
-
+		
 		self::prop($css,'.post-title','color',$s['post_title_c']);
 		self::prop($css,'.post-title a, .post-title a:visited','color',$s['post_title_c']);
 		self::prop($css,'.post-title','font-family',blowupConfig::fontDef($s['post_title_f']));
 		self::prop($css,'.post-title','font-size',$s['post_title_s']);
-
+		
 		self::prop($css,'#comments dd','background-color',$s['post_comment_bg_c']);
 		self::prop($css,'#comments dd','color',$s['post_comment_c']);
 		self::prop($css,'#comments dd.me','background-color',$s['post_commentmy_bg_c']);
 		self::prop($css,'#comments dd.me','color',$s['post_commentmy_c']);
-
+		
 		self::prop($css,'#prelude, #prelude a','color',$s['prelude_c']);
-
+		
 		self::prop($css,'#footer p','background-color',$s['footer_bg_c']);
 		self::prop($css,'#footer p','color',$s['footer_c']);
@@ -150,5 +150,5 @@
 		self::prop($css,'#footer p','font-family',blowupConfig::fontDef($s['footer_f']));
 		self::prop($css,'#footer p a','color',$s['footer_l_c']);
-
+		
 		/* Images
 		------------------------------------------------------ */
@@ -164,5 +164,5 @@
 		self::backgroundImg($css,'#comments dt.me',$s['post_commentmy_bg_c'],'commentmy-t.png');
 		self::backgroundImg($css,'#comments dd.me',$s['post_commentmy_bg_c'],'commentmy-b.png');
-
+		
 		$res = '';
 		foreach ($css as $selector => $values) {
@@ -173,10 +173,7 @@
 			$res .= "}\n";
 		}
-
-		$res .= $s['extra_css'];
-
 		return $res;
 	}
-
+	
 	protected static function prop(&$css,$selector,$prop,$value)
 	{
@@ -185,5 +182,5 @@
 		}
 	}
-
+	
 	protected static function backgroundImg(&$css,$selector,$value,$image)
 	{
Index: plugins/blowupConfig/index.php
===================================================================
--- plugins/blowupConfig/index.php	(revision 295)
+++ plugins/blowupConfig/index.php	(revision 270)
@@ -24,14 +24,14 @@
 	'body_bg_c' => null,
 	'body_bg_g' => 'light',
-
+	
 	'body_txt_f' => null,
 	'body_txt_s' => null,
 	'body_txt_c' => null,
 	'body_line_height' => null,
-
+	
 	'top_image' => 'default',
 	'top_height' => null,
 	'uploaded' => null,
-
+	
 	'blog_title_hide' => null,
 	'blog_title_f' => null,
@@ -40,9 +40,9 @@
 	'blog_title_a' => null,
 	'blog_title_p' => null,
-
+	
 	'body_link_c' => null,
 	'body_link_f_c' => null,
 	'body_link_v_c' => null,
-
+	
 	'sidebar_position' => null,
 	'sidebar_text_f' => null,
@@ -59,9 +59,9 @@
 	'sidebar_link_f_c' => null,
 	'sidebar_link_v_c' => null,
-
+	
 	'date_title_f' => null,
 	'date_title_s' => null,
 	'date_title_c' => null,
-
+	
 	'post_title_f' => null,
 	'post_title_s' => null,
@@ -71,5 +71,5 @@
 	'post_commentmy_bg_c' => null,
 	'post_commentmy_c' => null,
-
+	
 	'prelude_c' => null,
 	'footer_f' => null,
@@ -78,6 +78,4 @@
 	'footer_l_c' => null,
 	'footer_bg_c' => null,
-
-	'extra_css' => null
 );
 
@@ -110,5 +108,5 @@
 		$blowup_user['body_txt_c'] = blowupConfig::adjustColor($_POST['body_txt_c']);
 		$blowup_user['body_line_height'] = blowupConfig::adjustFontSize($_POST['body_line_height']);
-
+		
 		$blowup_user['blog_title_hide'] = (integer) !empty($_POST['blog_title_hide']);
 		$update_blog_title = !$blowup_user['blog_title_hide'] && (
@@ -117,5 +115,5 @@
 			!empty($_POST['blog_title_p'])
 		);
-
+		
 		if ($update_blog_title)
 		{
@@ -126,9 +124,9 @@
 			$blowup_user['blog_title_p'] = blowupConfig::adjustPosition($_POST['blog_title_p']);
 		}
-
+		
 		$blowup_user['body_link_c'] = blowupConfig::adjustColor($_POST['body_link_c']);
 		$blowup_user['body_link_f_c'] = blowupConfig::adjustColor($_POST['body_link_f_c']);
 		$blowup_user['body_link_v_c'] = blowupConfig::adjustColor($_POST['body_link_v_c']);
-
+		
 		$blowup_user['sidebar_text_f'] = $_POST['sidebar_text_f'];
 		$blowup_user['sidebar_text_s'] = blowupConfig::adjustFontSize($_POST['sidebar_text_s']);
@@ -144,11 +142,11 @@
 		$blowup_user['sidebar_link_f_c'] = blowupConfig::adjustColor($_POST['sidebar_link_f_c']);
 		$blowup_user['sidebar_link_v_c'] = blowupConfig::adjustColor($_POST['sidebar_link_v_c']);
-
+		
 		$blowup_user['sidebar_position'] = ($_POST['sidebar_position'] == 'left') ? 'left' : null;
-
+		
 		$blowup_user['date_title_f'] = $_POST['date_title_f'];
 		$blowup_user['date_title_s'] = blowupConfig::adjustFontSize($_POST['date_title_s']);
 		$blowup_user['date_title_c'] = blowupConfig::adjustColor($_POST['date_title_c']);
-
+		
 		$blowup_user['post_title_f'] = $_POST['post_title_f'];
 		$blowup_user['post_title_s'] = blowupConfig::adjustFontSize($_POST['post_title_s']);
@@ -156,6 +154,6 @@
 		$blowup_user['post_comment_c'] = blowupConfig::adjustColor($_POST['post_comment_c']);
 		$blowup_user['post_commentmy_c'] = blowupConfig::adjustColor($_POST['post_commentmy_c']);
-
-
+		
+		
 		$blowup_user['footer_f'] = $_POST['footer_f'];
 		$blowup_user['footer_s'] = blowupConfig::adjustFontSize($_POST['footer_s']);
@@ -163,8 +161,5 @@
 		$blowup_user['footer_l_c'] = blowupConfig::adjustColor($_POST['footer_l_c']);
 		$blowup_user['footer_bg_c'] = blowupConfig::adjustColor($_POST['footer_bg_c']);
-
-
-		$blowup_user['extra_css'] = blowupConfig::cleanCSS($_POST['extra_css']);
-
+		
 		if ($can_write_images)
 		{
@@ -173,5 +168,5 @@
 				$uploaded = blowupConfig::imagesPath().'/'.$blowup_user['uploaded'];
 			}
-
+			
 			if (!empty($_FILES['upfile']) && !empty($_FILES['upfile']['name'])) {
 				files::uploadStatus($_FILES['upfile']);
@@ -179,7 +174,7 @@
 				$blowup_user['uploaded'] = basename($uploaded);
 			}
-
+			
 			$blowup_user['top_image'] = in_array($_POST['top_image'],$top_images) ? $_POST['top_image'] : 'default';
-
+			
 			$blowup_user['body_bg_c'] = blowupConfig::adjustColor($_POST['body_bg_c']);
 			$blowup_user['body_bg_g'] = in_array($_POST['body_bg_g'],$gradient_types) ? $_POST['body_bg_g'] : '';
@@ -189,9 +184,9 @@
 			blowupConfig::createImages($blowup_user,$uploaded);
 		}
-
+		
 		$core->blog->settings->addNamespace('themes');
 		$core->blog->settings->themes->put('blowup_style',serialize($blowup_user));
 		$core->blog->triggerBlog();
-
+		
 		http::redirect($p_url.'&upd=1');
 	}
@@ -238,5 +233,5 @@
 
 echo '<form id="theme_config" action="'.$p_url.'" method="post" enctype="multipart/form-data">';
-
+		
 echo '<fieldset><legend>'.__('General').'</legend>';
 
@@ -245,5 +240,5 @@
 	'<p class="field"><label for="body_bg_c">'.__('Background color:').' '.
 	form::field('body_bg_c',7,7,$blowup_user['body_bg_c'],'colorpicker').'</label></p>'.
-
+	
 	'<p class="field"><label for="body_bg_g">'.__('Background color fill:').' '.
 	form::combo('body_bg_g',$gradient_types,$blowup_user['body_bg_g']).'</label></p>';
@@ -309,5 +304,5 @@
 		$preview_image = 'index.php?pf=blowupConfig/alpha-img/page-t/'.$blowup_user['top_image'].'.png';
 	}
-
+	
 	echo
 	'<fieldset><legend>'.__('Top image').'</legend>'.
@@ -315,10 +310,10 @@
 	form::combo('top_image',$top_images,($blowup_user['top_image'] ? $blowup_user['top_image'] : 'default')).'</label></p>'.
 	'<p>'.__('Choose "Custom..." to upload your own image.').'</p>'.
-
+	
 	'<p id="uploader"><label for="upfile">'.__('Add your image:').
 	' ('.sprintf(__('JPEG or PNG file, 800 pixels wide, maximum size %s'),files::size(DC_MAX_UPLOAD_SIZE)).')'.
 	'<input type="file" name="upfile" id="upfile" size="35" />'.
 	'</label></p>'.
-
+	
 	'<h3>'.__('Preview').'</h3>'.
 	'<div class="grid" style="width:800px;border:1px solid #ccc;">'.
@@ -430,11 +425,4 @@
 '</fieldset>';
 
-echo
-'<fieldset><legend>'.__('Additional CSS').'</legend>'.
-'<p>'.form::textarea('extra_css',72,5,html::escapeHTML($blowup_user['extra_css']),'maximal','',false,'title="'.__('Additional CSS').'"').'</p>'.
-'</fieldset>';
-
-
-
 // Import / Export configuration
 $tmp_array = array();
Index: plugins/blowupConfig/lib/class.blowup.config.php
===================================================================
--- plugins/blowupConfig/lib/class.blowup.config.php	(revision 295)
+++ plugins/blowupConfig/lib/class.blowup.config.php	(revision 270)
@@ -22,5 +22,5 @@
 			'ss5' => 'Impact, Charcoal, sans-serif'
 		),
-
+		
 		'serif' => array(
 			's1' => 'Times, "Times New Roman", serif',
@@ -28,5 +28,5 @@
 			's3' => 'Baskerville, "Palatino Linotype", serif'
 		),
-
+		
 		'monospace' => array(
 			'm1' => '"Andale Mono", "Courier New", monospace',
@@ -34,8 +34,8 @@
 		)
 	);
-
+	
 	protected static $fonts_combo = array();
 	protected static $fonts_list = array();
-
+	
 	public static $top_images = array(
 		'default' => 'Default',
@@ -55,5 +55,5 @@
 		'typo' => 'Typo',
 	);
-
+	
 	public static function fontsList()
 	{
@@ -70,8 +70,8 @@
 			}
 		}
-
+		
 		return self::$fonts_combo;
 	}
-
+	
 	public static function fontDef($c)
 	{
@@ -85,8 +85,8 @@
 			}
 		}
-
+		
 		return isset(self::$fonts_list[$c]) ? self::$fonts_list[$c] : null;
 	}
-
+	
 	public static function adjustFontSize($s)
 	{
@@ -97,8 +97,8 @@
 			return $m[1].$m[2];
 		}
-
+		
 		return null;
 	}
-
+	
 	public static function adjustPosition($p)
 	{
@@ -106,10 +106,10 @@
 			return null;
 		}
-
+		
 		$p = explode(':',$p);
-
+		
 		return $p[0].(count($p) == 1 ? ':0' : ':'.$p[1]);
 	}
-
+	
 	public static function adjustColor($c)
 	{
@@ -117,28 +117,22 @@
 			return '';
 		}
-
+		
 		$c = strtoupper($c);
-
+		
 		if (preg_match('/^[A-F0-9]{3,6}$/',$c)) {
 			$c = '#'.$c;
 		}
-
+		
 		if (preg_match('/^#[A-F0-9]{6}$/',$c)) {
 			return $c;
 		}
-
+		
 		if (preg_match('/^#[A-F0-9]{3,}$/',$c)) {
 			return '#'.substr($c,1,1).substr($c,1,1).substr($c,2,1).substr($c,2,1).substr($c,3,1).substr($c,3,1);
 		}
-
+		
 		return '';
 	}
-
-	public static function cleanCSS($css)
-	{
-		// TODO ?
-		return $css;
-	}
-
+	
 	public static function imagesPath()
 	{
@@ -146,5 +140,5 @@
 		return path::real($core->blog->public_path).'/blowup-images';
 	}
-
+	
 	public static function imagesURL()
 	{
@@ -152,12 +146,12 @@
 		return $core->blog->settings->system->public_url.'/blowup-images';
 	}
-
+	
 	public static function canWriteImages($create=false)
 	{
 		global $core;
-
+		
 		$public = path::real($core->blog->public_path);
 		$imgs = self::imagesPath();
-
+		
 		if (!function_exists('imagecreatetruecolor') || !function_exists('imagepng') || !function_exists('imagecreatefrompng')) {
 			$core->error->add(__('At least one of the following functions is not available: '.
@@ -165,10 +159,10 @@
 			return false;
 		}
-
+		
 		if (!is_dir($public)) {
 			$core->error->add(__('The \'public\' directory does not exist.'));
 			return false;
 		}
-
+		
 		if (!is_dir($imgs)) {
 			if (!is_writable($public)) {
@@ -181,13 +175,13 @@
 			return true;
 		}
-
+		
 		if (!is_writable($imgs)) {
 			$core->error->add(sprintf(__('The \'%s\' directory cannot be modified.'),'public/blowup-images'));
 			return false;
 		}
-
+		
 		return true;
 	}
-
+	
 	public static function uploadImage($f)
 	{
@@ -195,26 +189,26 @@
 			throw new Exception(__('Unable to create images.'));
 		}
-
+		
 		$name = $f['name'];
 		$type = files::getMimeType($name);
-
+		
 		if ($type != 'image/jpeg' && $type != 'image/png') {
 			throw new Exception(__('Invalid file type.'));
 		}
-
+		
 		$dest = self::imagesPath().'/uploaded'.($type == 'image/png' ? '.png' : '.jpg');
-
+		
 		if (@move_uploaded_file($f['tmp_name'],$dest) === false) {
 			throw new Exception(__('An error occurred while writing the file.'));
 		}
-
+		
 		$s = getimagesize($dest);
 		if ($s[0] != 800) {
 			throw new Exception(__('Uploaded image is not 800 pixels wide.'));
 		}
-
+		
 		return $dest;
 	}
-
+	
 	public static function createImages(&$config,$uploaded)
 	{
@@ -225,7 +219,7 @@
 		$comment_color_my = $config['post_commentmy_bg_c'];
 		$top_image = $config['top_image'];
-
+		
 		$config['top_height'] = null;
-
+		
 		if ($top_image != 'custom' && !isset(self::$top_images[$top_image])) {
 			$top_image = 'default';
@@ -234,9 +228,9 @@
 			$uploaded = null;
 		}
-
+		
 		if (!self::canWriteImages(true)) {
 			throw new Exception(__('Unable to create images.'));
 		}
-
+		
 		$body_fill = array(
 			'light' => dirname(__FILE__).'/../alpha-img/gradient-l.png',
@@ -244,7 +238,7 @@
 			'dark' => dirname(__FILE__).'/../alpha-img/gradient-d.png'
 		);
-
+		
 		$body_g = isset($body_fill[$gradient]) ? $body_fill[$gradient] : false;
-
+		
 		if ($top_image == 'custom' && $uploaded) {
 			$page_t = $uploaded;
@@ -252,5 +246,5 @@
 			$page_t = dirname(__FILE__).'/../alpha-img/page-t/'.$top_image.'.png';
 		}
-
+		
 		$body_bg = dirname(__FILE__).'/../alpha-img/body-bg.png';
 		$page_t_mask = dirname(__FILE__).'/../alpha-img/page-t/image-mask.png';
@@ -260,5 +254,5 @@
 		$default_bg = '#e0e0e0';
 		$default_prelude = '#ededed';
-
+		
 		self::dropImage(basename($body_bg));
 		self::dropImage('page-t.png');
@@ -266,9 +260,9 @@
 		self::dropImage(basename($comment_t));
 		self::dropImage(basename($comment_b));
-
+		
 		$body_color = self::adjustColor($body_color);
 		$prelude_color = self::adjustColor($prelude_color);
 		$comment_color = self::adjustColor($comment_color);
-
+		
 		if ($top_image || $body_color || $gradient != 'light' || $prelude_color || $uploaded)
 		{
@@ -277,10 +271,10 @@
 			}
 			$body_color = sscanf($body_color,'#%2X%2X%2X');
-
+			
 			# Create body gradient with color
 			$d_body_bg = imagecreatetruecolor(50,180);
 			$fill = imagecolorallocate($d_body_bg,$body_color[0],$body_color[1],$body_color[2]);
 			imagefill($d_body_bg,0,0,$fill);
-
+			
 			# User choosed a gradient
 			if ($body_g) {
@@ -290,18 +284,18 @@
 				imagedestroy($s_body_bg);
 			}
-
+			
 			if (!$prelude_color) {
 				$prelude_color = $default_prelude;
 			}
 			$prelude_color = sscanf($prelude_color,'#%2X%2X%2X');
-
+			
 			$s_prelude = imagecreatetruecolor(50,30);
 			$fill = imagecolorallocate($s_prelude,$prelude_color[0],$prelude_color[1],$prelude_color[2]);
 			imagefill($s_prelude,0,0,$fill);
 			imagecopy($d_body_bg,$s_prelude,0,0,0,0,50,30);
-
+			
 			imagepng($d_body_bg,self::imagesPath().'/'.basename($body_bg));
 		}
-
+		
 		if ($top_image || $body_color || $gradient != 'light')
 		{
@@ -310,7 +304,7 @@
 			$size = $size[1];
 			$type = files::getMimeType($page_t);
-
+			
 			$d_page_t = imagecreatetruecolor(800,$size);
-
+			
 			if ($type == 'image/png') {
 				$s_page_t = @imagecreatefrompng($page_t);
@@ -318,12 +312,12 @@
 				$s_page_t = @imagecreatefromjpeg($page_t);
 			}
-
+			
 			if (!$s_page_t) {
 				throw new exception(__('Unable to open image.'));
 			}
-
+			
 			$fill = imagecolorallocate($d_page_t,$body_color[0],$body_color[1],$body_color[2]);
 			imagefill($d_page_t,0,0,$fill);
-
+			
 			if ($type == 'image/png')
 			{
@@ -337,15 +331,15 @@
 				# JPEG, we add image and a frame with rounded corners
 				imagecopy($d_page_t,$s_page_t,0,0,0,0,800,$size);
-
+				
 				imagecopy($d_page_t,$d_body_bg,0,0,0,50,8,4);
 				imagecopy($d_page_t,$d_body_bg,0,4,0,54,4,4);
 				imagecopy($d_page_t,$d_body_bg,792,0,0,50,8,4);
 				imagecopy($d_page_t,$d_body_bg,796,4,0,54,4,4);
-
+				
 				$mask = imagecreatefrompng($page_t_mask);
 				imagealphablending($mask,true);
 				imagecopy($d_page_t,$mask,0,0,0,0,800,11);
 				imagedestroy($mask);
-
+				
 				$fill = imagecolorallocate($d_page_t,255,255,255);
 				imagefilledrectangle($d_page_t,0,11,3,$size-1,$fill);
@@ -353,28 +347,28 @@
 				imagefilledrectangle($d_page_t,0,$size-9,799,$size-1,$fill);
 			}
-
+			
 			$config['top_height'] = ($size).'px';
-
+			
 			imagepng($d_page_t,self::imagesPath().'/page-t.png');
-
+			
 			imagedestroy($d_body_bg);
 			imagedestroy($d_page_t);
 			imagedestroy($s_page_t);
-
+			
 			# Create bottom image with color
 			$d_page_b = imagecreatetruecolor(800,8);
 			$fill = imagecolorallocate($d_page_b,$body_color[0],$body_color[1],$body_color[2]);
 			imagefill($d_page_b,0,0,$fill);
-
+			
 			$s_page_b = imagecreatefrompng($page_b);
 			imagealphablending($s_page_b,true);
 			imagecopy($d_page_b,$s_page_b,0,0,0,0,800,160);
-
+			
 			imagepng($d_page_b,self::imagesPath().'/'.basename($page_b));
-
+			
 			imagedestroy($d_page_b);
 			imagedestroy($s_page_b);
 		}
-
+		
 		if ($comment_color) {
 			self::commentImages($comment_color,$comment_t,$comment_b,basename($comment_t),basename($comment_b));
@@ -384,34 +378,34 @@
 		}
 	}
-
+	
 	protected static function commentImages($comment_color,$comment_t,$comment_b,$dest_t,$dest_b)
 	{
 		$comment_color = sscanf($comment_color,'#%2X%2X%2X');
-
+			
 		$d_comment_t = imagecreatetruecolor(500,25);
 		$fill = imagecolorallocate($d_comment_t,$comment_color[0],$comment_color[1],$comment_color[2]);
 		imagefill($d_comment_t,0,0,$fill);
-
+		
 		$s_comment_t = imagecreatefrompng($comment_t);
 		imagealphablending($s_comment_t,true);
 		imagecopy($d_comment_t,$s_comment_t,0,0,0,0,500,25);
-
+		
 		imagepng($d_comment_t,self::imagesPath().'/'.$dest_t);
 		imagedestroy($d_comment_t);
 		imagedestroy($s_comment_t);
-
+		
 		$d_comment_b = imagecreatetruecolor(500,7);
 		$fill = imagecolorallocate($d_comment_b,$comment_color[0],$comment_color[1],$comment_color[2]);
 		imagefill($d_comment_b,0,0,$fill);
-
+		
 		$s_comment_b = imagecreatefrompng($comment_b);
 		imagealphablending($s_comment_b,true);
 		imagecopy($d_comment_b,$s_comment_b,0,0,0,0,500,7);
-
+		
 		imagepng($d_comment_b,self::imagesPath().'/'.$dest_b);
 		imagedestroy($d_comment_b);
 		imagedestroy($s_comment_b);
 	}
-
+	
 	public static function dropImage($img)
 	{
Index: plugins/fairTrackbacks/_define.php
===================================================================
--- plugins/fairTrackbacks/_define.php	(revision 270)
+++ plugins/fairTrackbacks/_define.php	(revision 464)
@@ -17,6 +17,8 @@
 	/* Author */			"Olivier Meunier",
 	/* Version */			'1.1',
-	/* Permissions */		'usage,contentadmin',
-	/* Priority */			200
+	array(
+		'permissions' =>	'usage,contentadmin',
+		'priority' =>		200
+	)
 );
 ?>
Index: plugins/importExport/_admin.php
===================================================================
--- plugins/importExport/_admin.php	(revision 270)
+++ plugins/importExport/_admin.php	(revision 324)
@@ -25,5 +25,5 @@
 function importExportDashboardFavs($core,$favs)
 {
-	$favs['importExport'] = new ArrayObject(array('importExport',__('Import/Export'),'plugin.php?p=importExport',
+	$favs['importExport'] = new ArrayObject(array('importExport','Import/Export','plugin.php?p=importExport',
 		'index.php?pf=importExport/icon.png','index.php?pf=importExport/icon-big.png',
 		'admin',null,null));
Index: plugins/importExport/_define.php
===================================================================
--- plugins/importExport/_define.php	(revision 270)
+++ plugins/importExport/_define.php	(revision 464)
@@ -17,6 +17,8 @@
 	/* Author */			"Olivier Meunier",
 	/* Version */			'2.4',
-	/* Permissions */		'admin',
-	/* Priority */			10
+	array(
+		'permissions' => 'admin',
+		'priority' => 10
+	)
 );
 ?>
Index: plugins/importExport/inc/flat/class.dc.import.php
===================================================================
--- plugins/importExport/inc/flat/class.dc.import.php	(revision 270)
+++ plugins/importExport/inc/flat/class.dc.import.php	(revision 298)
@@ -371,4 +371,8 @@
 	private function insertPref($pref)
 	{
+		if ($this->prefExists($pref->pref_ws,$pref->pref_id,$pref->user_id)) {
+			return;
+		}
+		
 		$this->cur_pref->clean();
 		
@@ -751,4 +755,21 @@
 		$this->stack['users'][$user_id] = !$rs->isEmpty();
 		return $this->stack['users'][$user_id];
+	}
+	
+	private function prefExists($pref_ws,$pref_id,$user_id)
+	{
+		$strReq = 'SELECT pref_id,pref_ws,user_id '.
+				'FROM '.$this->prefix.'pref '.
+				"WHERE pref_id = '".$this->con->escape($pref_id)."' ".
+				"AND pref_ws = '".$this->con->escape($pref_ws)."' ";
+		if (!$user_id) {
+			$strReq .= "AND user_id IS NULL ";
+		} else {
+			$strReq .= "AND user_id = '".$this->con->escape($user_id)."' ";
+		}
+		
+		$rs = $this->con->select($strReq);
+		
+		return !$rs->isEmpty();
 	}
 	
Index: plugins/maintenance/_admin.php
===================================================================
--- plugins/maintenance/_admin.php	(revision 270)
+++ plugins/maintenance/_admin.php	(revision 324)
@@ -20,5 +20,5 @@
 function maintenanceDashboardFavs($core,$favs)
 {
-	$favs['maintenance'] = new ArrayObject(array('maintenance',__('Maintenance'),'plugin.php?p=maintenance',
+	$favs['maintenance'] = new ArrayObject(array('maintenance','Maintenance','plugin.php?p=maintenance',
 		'index.php?pf=maintenance/icon.png','index.php?pf=maintenance/icon-big.png',
 		null,null,null));
Index: plugins/maintenance/_define.php
===================================================================
--- plugins/maintenance/_define.php	(revision 270)
+++ plugins/maintenance/_define.php	(revision 464)
@@ -16,6 +16,5 @@
 	/* Description*/		"Maintain your database",
 	/* Author */			"Olivier Meunier",
-	/* Version */			'1.1',
-	/* Permissions */		null
+	/* Version */			'1.1'
 );
 ?>
Index: plugins/pages/_admin.php
===================================================================
--- plugins/pages/_admin.php	(revision 270)
+++ plugins/pages/_admin.php	(revision 324)
@@ -21,8 +21,8 @@
 function pages_dashboard_favs($core,$favs)
 {
-	$favs['pages'] = new ArrayObject(array('pages',__('Pages'),'plugin.php?p=pages',
+	$favs['pages'] = new ArrayObject(array('pages','Pages','plugin.php?p=pages',
 		'index.php?pf=pages/icon.png','index.php?pf=pages/icon-big.png',
 		'contentadmin,pages',null,null));
-	$favs['newpage'] = new ArrayObject(array('newpage',__('New page'),'plugin.php?p=pages&amp;act=page',
+	$favs['newpage'] = new ArrayObject(array('newpage','New page','plugin.php?p=pages&amp;act=page',
 		'index.php?pf=pages/icon-np.png','index.php?pf=pages/icon-np-big.png',
 		'contentadmin,pages',null,null));
Index: plugins/pages/_define.php
===================================================================
--- plugins/pages/_define.php	(revision 270)
+++ plugins/pages/_define.php	(revision 464)
@@ -17,6 +17,8 @@
 	/* Author */		"Olivier Meunier",
 	/* Version */		'1.1.1',
-	/* Permissions */	'contentadmin,pages',
-	999
+	array(
+		'permissions' =>	'contentadmin,pages',
+		'priority' =>	999
+	)
 );
 ?>
Index: plugins/pages/_public.php
===================================================================
--- plugins/pages/_public.php	(revision 270)
+++ plugins/pages/_public.php	(revision 306)
@@ -33,7 +33,9 @@
 			$core->blog->withoutPassword(false);
 			
-			$params = new ArrayObject();
-			$params['post_type'] = 'page';
-			$params['post_url'] = $args;
+			$params = new ArrayObject(array(
+				'post_type' => 'page',
+				'post_url' => $args));
+			
+			$core->callBehavior('publicPagesBeforeGetPosts',$params,$args);
 			
 			$_ctx->posts = $core->blog->getPosts($params);
Index: plugins/pages/page.php
===================================================================
--- plugins/pages/page.php	(revision 270)
+++ plugins/pages/page.php	(revision 458)
@@ -361,38 +361,76 @@
 	echo '<div class="multi-part" title="'.__('Edit page').'" id="edit-entry">';
 	echo '<form action="'.html::escapeURL($redir_url).'" method="post" id="entry-form">';
+
+	echo '<div id="entry-wrapper">';
+	echo '<div id="entry-content"><fieldset class="constrained">';
+	
+	echo
+	'<p class="col"><label for="post_title" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Title:').
+	form::field('post_title',20,255,html::escapeHTML($post_title),'maximal').
+	'</label></p>'.
+	
+	'<p class="area" id="excerpt-area"><label for="post_excerpt">'.__('Excerpt:').'</label> '.
+	form::textarea('post_excerpt',50,5,html::escapeHTML($post_excerpt)).
+	'</p>'.
+	
+	'<p class="area"><label class="required" '.
+	'for="post_content"><abbr title="'.__('Required field').'">*</abbr> '.__('Content:').'</label> '.
+	form::textarea('post_content',50,$core->auth->getOption('edit_size'),html::escapeHTML($post_content)).
+	'</p>';
+	
+	echo
+	'<p class="area" id="notes-area"><label for="post_notes">'.__('Notes:').'</label>'.
+	form::textarea('post_notes',50,5,html::escapeHTML($post_notes)).
+	'</p>';
+
+	# --BEHAVIOR-- adminPageForm
+	$core->callBehavior('adminPageForm',isset($post) ? $post : null);
+	
+	echo
+	'<p>'.
+	($post_id ? form::hidden('id',$post_id) : '').
+	'<input type="submit" value="'.__('Save').' (s)" '.
+	'accesskey="s" name="save" /> '.
+	($can_delete ? '<input type="submit" class="delete" value="'.__('Delete').'" name="delete" />' : '').
+	$core->formNonce().
+	'</p>';
+	
+	echo '</fieldset></div>';		// End #entry-content
+	echo '</div>';		// End #entry-wrapper
+
 	echo '<div id="entry-sidebar">';
 	
 	echo
 	'<p><label for="post_status">'.__('Page status:').
-	form::combo('post_status',$status_combo,$post_status,'',3,!$can_publish).
+	form::combo('post_status',$status_combo,$post_status,'','',!$can_publish).
 	'</label></p>'.
 	
 	'<p><label for="post_dt">'.__('Published on:').
-	form::field('post_dt',16,16,$post_dt,'',3).'</label></p>'.
+	form::field('post_dt',16,16,$post_dt).'</label></p>'.
 	
 	'<p><label for="post_format">'.__('Text formating:').
-	form::combo('post_format',$formaters_combo,$post_format,'',3).
+	form::combo('post_format',$formaters_combo,$post_format).
 	($post_id && $post_format != 'xhtml' ? '<a href="'.html::escapeURL($redir_url).'&amp;id='.$post_id.'&amp;xconv=1">'.__('Convert to XHTML').'</a>' : '').
 	'</label></p>'.
 	
-	'<p><label for="post_open_comment" class="classic">'.form::checkbox('post_open_comment',1,$post_open_comment,'',3).' '.
+	'<p><label for="post_open_comment" class="classic">'.form::checkbox('post_open_comment',1,$post_open_comment).' '.
 	__('Accept comments').'</label></p>'.
-	'<p><label for="post_open_tb" class="classic">'.form::checkbox('post_open_tb',1,$post_open_tb,'',3).' '.
+	'<p><label for="post_open_tb" class="classic">'.form::checkbox('post_open_tb',1,$post_open_tb).' '.
 	__('Accept trackbacks').'</label></p>'.
 	
 	'<p><label for="post_position" class="classic">'.__('Page position:').' '.
-	form::field('post_position',3,3,(string) $post_position,'',3).
+	form::field('post_position',3,3,(string) $post_position).
 	'</label></p>'.
 	
 	'<p><label for="post_lang">'.__('Page lang:').
-	form::combo('post_lang',$lang_combo,$post_lang,'',5).'</label></p>'.
+	form::combo('post_lang',$lang_combo,$post_lang).'</label></p>'.
 	
 	'<p><label for="post_password">'.__('Page password:').
-	form::field('post_password',10,32,html::escapeHTML($post_password),'maximal',3).
+	form::field('post_password',10,32,html::escapeHTML($post_password),'maximal').
 	'</label></p>'.
 	
 	'<div class="lockable">'.
 	'<p><label for="post_url">'.__('Basename:').
-	form::field('post_url',10,255,html::escapeHTML($post_url),'maximal',3).
+	form::field('post_url',10,255,html::escapeHTML($post_url),'maximal').
 	'</label></p>'.
 	'<p class="form-note warn">'.
@@ -443,38 +481,4 @@
 	echo '</div>';		// End #entry-sidebar
 	
-	echo '<div id="entry-content"><fieldset class="constrained">';
-	
-	echo
-	'<p class="col"><label for="post_title" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Title:').
-	form::field('post_title',20,255,html::escapeHTML($post_title),'maximal',2).
-	'</label></p>'.
-	
-	'<p class="area" id="excerpt-area"><label for="post_excerpt">'.__('Excerpt:').'</label> '.
-	form::textarea('post_excerpt',50,5,html::escapeHTML($post_excerpt),'',2).
-	'</p>'.
-	
-	'<p class="area"><label class="required" '.
-	'for="post_content"><abbr title="'.__('Required field').'">*</abbr> '.__('Content:').'</label> '.
-	form::textarea('post_content',50,$core->auth->getOption('edit_size'),html::escapeHTML($post_content),'',2).
-	'</p>';
-	
-	echo
-	'<p class="area" id="notes-area"><label for="post_notes">'.__('Notes:').'</label>'.
-	form::textarea('post_notes',50,5,html::escapeHTML($post_notes),'',2).
-	'</p>';
-
-	# --BEHAVIOR-- adminPageForm
-	$core->callBehavior('adminPageForm',isset($post) ? $post : null);
-	
-	echo
-	'<p>'.
-	($post_id ? form::hidden('id',$post_id) : '').
-	'<input type="submit" value="'.__('Save').' (s)" tabindex="4" '.
-	'accesskey="s" name="save" /> '.
-	($can_delete ? '<input type="submit" class="delete" value="'.__('Delete').'" name="delete" />' : '').
-	$core->formNonce().
-	'</p>';
-	
-	echo '</fieldset></div>';		// End #entry-content
 	echo '</form>';
 	echo '</div>';
Index: plugins/pings/_admin.php
===================================================================
--- plugins/pings/_admin.php	(revision 270)
+++ plugins/pings/_admin.php	(revision 324)
@@ -41,5 +41,5 @@
 function pingDashboardFavs($core,$favs)
 {
-	$favs['pings'] = new ArrayObject(array('pings',__('Pings'),'plugin.php?p=pings',
+	$favs['pings'] = new ArrayObject(array('pings','Pings','plugin.php?p=pings',
 		'index.php?pf=pings/icon.png','index.php?pf=pings/icon-big.png',
 		null,null,null));
Index: plugins/pings/_define.php
===================================================================
--- plugins/pings/_define.php	(revision 270)
+++ plugins/pings/_define.php	(revision 464)
@@ -17,5 +17,7 @@
 	/* Author */			"Olivier Meunier",
 	/* Version */			'1.1',
-	/* Permissions */		'usage,contentadmin'
+	array(
+		'permissions' =>	'usage,contentadmin'
+	)
 );
 ?>
Index: plugins/tags/_admin.php
===================================================================
--- plugins/tags/_admin.php	(revision 270)
+++ plugins/tags/_admin.php	(revision 454)
@@ -45,5 +45,5 @@
 	public static function dashboardFavs($core,$favs)
 	{
-		$favs['tags'] = new ArrayObject(array('tags',__('Tags'),'plugin.php?p=tags&amp;m=tags',
+		$favs['tags'] = new ArrayObject(array('tags','Tags','plugin.php?p=tags&amp;m=tags',
 			'index.php?pf=tags/icon.png','index.php?pf=tags/icon-big.png',
 			'usage,contentadmin',null,null));
@@ -82,5 +82,5 @@
 		echo
 		'<h3><label for="post_tags">'.__('Tags:').'</label></h3>'.
-		'<div class="p" id="tags-edit">'.form::textarea('post_tags',20,3,$value,'maximal',3).'</div>';
+		'<div class="p" id="tags-edit">'.form::textarea('post_tags',20,3,$value,'maximal').'</div>';
 	}
 	
Index: plugins/tags/_define.php
===================================================================
--- plugins/tags/_define.php	(revision 270)
+++ plugins/tags/_define.php	(revision 464)
@@ -17,5 +17,7 @@
 	/* Author */			"Olivier Meunier",
 	/* Version */			'1.1',
-	/* Permissions */		'usage,contentadmin'
+	array(
+		'permissions' =>	'usage,contentadmin'
+	)
 );
 ?>
Index: plugins/tags/_public.php
===================================================================
--- plugins/tags/_public.php	(revision 270)
+++ plugins/tags/_public.php	(revision 413)
@@ -44,4 +44,6 @@
 
 $core->addBehavior('templateBeforeBlock',array('behaviorsTags','templateBeforeBlock'));
+$core->addBehavior('tplSysIfConditions',array('behaviorsTags','tplSysIfConditions'));
+$core->addBehavior('publicBeforeDocument',array('behaviorsTags','addTplPath'));
 
 class behaviorsTags
@@ -70,4 +72,22 @@
 		}
 	}
+	
+	public static function tplIfConditions($tag, $attr,$content,$if)
+	{
+		if ($tag == 'Sys' && isset($attr['has_tag'])) {
+			$sign = '';
+			if (substr($attr['has_tag'],0,1) == '!') {
+				$sign = '!';
+				$attr['has_tag'] = substr($attr['has_tag'],1);
+			}
+			$if[] =  $sign."(\$core->tpl->tagExists('".addslashes($attr['has_tag'])."') )";
+		}
+	}
+	
+	public static function addTplPath($core)
+	{
+		$core->tpl->setPath($core->tpl->getPath(), dirname(__FILE__).'/default-templates');
+	}
+
 }
 
Index: plugins/tags/default-templates/tag.html
===================================================================
--- plugins/tags/default-templates/tag.html	(revision 413)
+++ plugins/tags/default-templates/tag.html	(revision 413)
@@ -0,0 +1,153 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{{tpl:BlogLanguage}}" lang="{{tpl:BlogLanguage}}">
+<head>
+  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+  <meta name="ROBOTS" content="{{tpl:BlogMetaRobots}}" />
+  
+  <title>{{tpl:lang Tag}} - {{tpl:TagID}} - {{tpl:BlogName encode_html="1"}}<tpl:PaginationIf start="0"> - {{tpl:lang page}} {{tpl:PaginationCurrent}}</tpl:PaginationIf></title>
+  <meta name="copyright" content="{{tpl:BlogCopyrightNotice encode_html="1"}}" />
+  <meta name="author" content="{{tpl:BlogEditor encode_html="1"}}" />
+  <meta name="date" scheme="W3CDTF" content="{{tpl:BlogUpdateDate iso8601="1"}}" />
+  
+  <link rel="schema.dc" href="http://purl.org/dc/elements/1.1/" />
+  <meta name="dc.title" lang="{{tpl:BlogLanguage}}" content="{{tpl:lang Tag}} - {{tpl:TagID}} - {{tpl:BlogName encode_html="1"}}<tpl:PaginationIf start="0"> - {{tpl:lang page}} {{tpl:PaginationCurrent}}</tpl:PaginationIf>" />
+  <meta name="dc.language" content="{{tpl:BlogLanguage}}" />
+  <meta name="dc.publisher" content="{{tpl:BlogEditor encode_html="1"}}" />
+  <meta name="dc.rights" content="{{tpl:BlogCopyrightNotice encode_html="1"}}" />
+  <meta name="dc.date" scheme="W3CDTF" content="{{tpl:BlogUpdateDate iso8601="1"}}" />
+  <meta name="dc.type" content="text" />
+  <meta name="dc.format" content="text/html" />
+  
+  <link rel="top" href="{{tpl:BlogURL}}" title="{{tpl:lang Home}}" />
+  <link rel="contents" href="{{tpl:BlogArchiveURL}}" title="{{tpl:lang Archives}}" />
+  
+  <tpl:Entries no_content="1">
+    <tpl:EntriesHeader>
+      <tpl:Pagination>
+        <tpl:PaginationIf end="0">
+        <link rel="prev" title="{{tpl:lang previous entries}}" href="{{tpl:PaginationURL offset="1"}}" />
+        </tpl:PaginationIf>
+        
+        <tpl:PaginationIf start="0">
+        <link rel="next" title="{{tpl:lang next entries}}" href="{{tpl:PaginationURL offset="-1"}}" />
+        </tpl:PaginationIf>
+      </tpl:Pagination>
+    </tpl:EntriesHeader>
+    
+    <link rel="chapter" href="{{tpl:EntryURL}}" title="{{tpl:EntryTitle encode_html="1"}}" />
+  </tpl:Entries>
+  
+  <link rel="alternate" type="application/atom+xml" title="Atom 1.0" href="{{tpl:TagFeedURL type="atom"}}" />
+  <link rel="meta" type="application/xbel+xml" title="Blogroll" href="{{tpl:BlogrollXbelLink}}" />
+  
+  {{tpl:include src="_head.html"}}
+</head>
+
+<body class="dc-tag">
+<div id="page">
+{{tpl:include src="_top.html"}}
+
+<div id="wrapper">
+
+<div id="main">
+  <div id="content">
+  
+  <div id="content-info">
+    <h2>{{tpl:lang Tag}} - {{tpl:TagID}}</h2>
+    
+    <p><a type="application/atom+xml" href="{{tpl:TagFeedURL type="atom"}}"
+    title="{{tpl:lang This tag's entries Atom feed}}" class="feed">{{tpl:lang Entries feed}}</a>
+    
+    <tpl:SysIf operator="or" comments_active="1" pings_active="1">
+    - <a type="application/atom+xml" href="{{tpl:TagFeedURL type="atom"}}/comments"
+    title="{{tpl:lang This tag's comments Atom feed}}" class="feed">{{tpl:lang Comments feed}}</a>
+    </tpl:SysIf>
+    </p>
+  </div>
+  
+  <tpl:Entries>
+    <div id="p{{tpl:EntryID}}" class="post {{tpl:EntryIfOdd}} {{tpl:EntryIfFirst}}" lang="{{tpl:EntryLang}}" xml:lang="{{tpl:EntryLang}}">
+    <!-- # New day date -->
+    <tpl:DateHeader><p class="day-date">{{tpl:EntryDate}}</p></tpl:DateHeader>
+    
+    <h2 class="post-title"><a
+    href="{{tpl:EntryURL}}">{{tpl:EntryTitle encode_html="1"}}</a></h2>
+    
+    <p class="post-info">{{tpl:lang By}} {{tpl:EntryAuthorLink}}
+    {{tpl:lang on}} {{tpl:EntryDate}}, {{tpl:EntryTime}}
+    <tpl:EntryIf has_category="1">
+    - <a href="{{tpl:EntryCategoryURL}}">{{tpl:EntryCategory encode_html="1"}}</a>
+    </tpl:EntryIf>
+    </p>
+    
+    <tpl:EntryTags>
+    <tpl:TagsHeader><ul class="post-tags"></tpl:TagsHeader>
+    <li><a href="{{tpl:TagURL}}">{{tpl:TagID}}</a></li>
+    <tpl:TagsFooter></ul></tpl:TagsFooter>
+    </tpl:EntryTags>
+    
+    <!-- # --BEHAVIOR-- publicEntryBeforeContent -->
+    {{tpl:SysBehavior behavior="publicEntryBeforeContent"}}
+    
+    <!-- # Entry with an excerpt -->
+    <tpl:EntryIf extended="1">
+      <div class="post-content">{{tpl:EntryExcerpt}}</div>
+      <p class="read-it"><a href="{{tpl:EntryURL}}"
+      title="{{tpl:lang Continue reading}} {{tpl:EntryTitle encode_html="1"}}">{{tpl:lang Continue
+      reading}}</a>...</p>
+    </tpl:EntryIf>
+    
+    <!-- # Entry without excerpt -->
+    <tpl:EntryIf extended="0">
+      <div class="post-content">{{tpl:EntryContent}}</div>
+    </tpl:EntryIf>
+    
+    <!-- # --BEHAVIOR-- publicEntryAfterContent -->
+    {{tpl:SysBehavior behavior="publicEntryAfterContent"}}
+    
+    <!-- # Number of comments, trackbacks and attachments -->
+    <tpl:EntryIf operator="or" show_comments="1" show_pings="1" has_attachment="1">
+      <p class="post-info-co">
+    </tpl:EntryIf>
+    <tpl:EntryIf show_comments="1">
+      <a href="{{tpl:EntryURL}}#comments" class="comment_count">{{tpl:EntryCommentCount}}</a>
+    </tpl:EntryIf>
+    <tpl:EntryIf show_pings="1">
+      <a href="{{tpl:EntryURL}}#pings" class="ping_count">{{tpl:EntryPingCount}}</a></tpl:EntryIf>
+    <tpl:EntryIf has_attachment="1">
+      <a href="{{tpl:EntryURL}}#attachments" class="attach_count">{{tpl:EntryAttachmentCount}}</a></tpl:EntryIf>
+    <tpl:EntryIf operator="or" show_comments="1" show_pings="1" has_attachment="1">
+      </p>
+    </tpl:EntryIf>
+    </div>
+    
+    <tpl:EntriesFooter>
+      <tpl:Pagination>
+        <p class="pagination"><tpl:PaginationIf end="0"><a href="{{tpl:PaginationURL offset="+1"}}" class="prev">&#171;
+        {{tpl:lang previous entries}}</a> - </tpl:PaginationIf>
+        {{tpl:lang page}} {{tpl:PaginationCurrent}} {{tpl:lang of}} {{tpl:PaginationCounter}}
+        <tpl:PaginationIf start="0"> - <a href="{{tpl:PaginationURL offset="-1"}}" class="next">{{tpl:lang next entries}}
+        &#187;</a></tpl:PaginationIf></p>
+      </tpl:Pagination>
+    </tpl:EntriesFooter>
+  </tpl:Entries>
+  </div>
+</div> <!-- End #main -->
+
+<div id="sidebar">
+  <div id="blognav">
+    {{tpl:Widgets type="nav"}}
+  </div> <!-- End #blognav -->
+  
+  <div id="blogextra">
+    {{tpl:Widgets type="extra"}}
+  </div> <!-- End #blogextra -->
+</div>
+
+</div> <!-- End #wrapper -->
+
+{{tpl:include src="_footer.html"}}
+</div> <!-- End #page -->
+</body>
+</html>
Index: plugins/tags/default-templates/tags.html
===================================================================
--- plugins/tags/default-templates/tags.html	(revision 413)
+++ plugins/tags/default-templates/tags.html	(revision 413)
@@ -0,0 +1,69 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{{tpl:BlogLanguage}}" lang="{{tpl:BlogLanguage}}">
+<head>
+  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+  <meta name="ROBOTS" content="{{tpl:BlogMetaRobots robots="NOINDEX"}}" />
+  
+  <title>{{tpl:lang Tags}} - {{tpl:BlogName encode_html="1"}}</title>
+  <meta name="copyright" content="{{tpl:BlogCopyrightNotice encode_html="1"}}" />
+  <meta name="author" content="{{tpl:BlogEditor encode_html="1"}}" />
+  <meta name="date" scheme="W3CDTF" content="{{tpl:BlogUpdateDate iso8601="1"}}" />
+  
+  <link rel="schema.dc" href="http://purl.org/dc/elements/1.1/" />
+  <meta name="dc.title" lang="{{tpl:BlogLanguage}}" content="{{tpl:lang Tags}} - {{tpl:BlogName encode_html="1"}}" />
+  <meta name="dc.language" content="{{tpl:BlogLanguage}}" />
+  <meta name="dc.publisher" content="{{tpl:BlogEditor encode_html="1"}}" />
+  <meta name="dc.rights" content="{{tpl:BlogCopyrightNotice encode_html="1"}}" />
+  <meta name="dc.date" scheme="W3CDTF" content="{{tpl:BlogUpdateDate iso8601="1"}}" />
+  <meta name="dc.type" content="text" />
+  <meta name="dc.format" content="text/html" />
+  
+  <link rel="top" href="{{tpl:BlogURL}}" title="{{tpl:lang Home}}" />
+  <link rel="contents" href="{{tpl:BlogArchiveURL}}" title="{{tpl:lang Archives}}" />
+  
+  <link rel="meta" type="application/xbel+xml" title="Blogroll" href="{{tpl:BlogrollXbelLink}}" />
+  
+  {{tpl:include src="_head.html"}}
+</head>
+
+<body class="dc-tags">
+<div id="page">
+{{tpl:include src="_top.html"}}
+
+<div id="wrapper">
+
+<div id="main">
+  <div id="content">
+  
+  <div id="content-info">
+    <h2>{{tpl:lang Tags}}</h2>
+  </div>
+  
+  <div class="content-inner">  
+  <ul class="tags">
+    <tpl:Tags>
+      <li><a href="{{tpl:TagURL}}" class="tag{{tpl:TagRoundPercent}}">{{tpl:TagID}}</a></li>
+    </tpl:Tags>
+    </ul>
+  </div>
+  
+  </div>
+</div> <!-- End #main -->
+
+<div id="sidebar">
+  <div id="blognav">
+    {{tpl:Widgets type="nav"}}
+  </div> <!-- End #blognav -->
+  
+  <div id="blogextra">
+    {{tpl:Widgets type="extra"}}
+  </div> <!-- End #blogextra -->
+</div>
+
+</div> <!-- End #wrapper -->
+
+{{tpl:include src="_footer.html"}}
+</div> <!-- End #page -->
+</body>
+</html>
Index: plugins/themeEditor/_define.php
===================================================================
--- plugins/themeEditor/_define.php	(revision 270)
+++ plugins/themeEditor/_define.php	(revision 464)
@@ -16,6 +16,5 @@
 	/* Description*/		"Theme Editor",
 	/* Author */			"Olivier Meunier",
-	/* Version */			'0.9',
-	/* Permissions */		null
+	/* Version */			'0.9'
 );
 ?>
Index: plugins/userPref/_define.php
===================================================================
--- plugins/userPref/_define.php	(revision 3)
+++ plugins/userPref/_define.php	(revision 464)
@@ -16,6 +16,5 @@
 	/* Description*/		"Manage every user preference directive",
 	/* Author */			"Franck Paul",
-	/* Version */			'0.1',
-	/* Permissions */		null
+	/* Version */			'0.1'
 );
 ?>
Index: plugins/widgets/_admin.php
===================================================================
--- plugins/widgets/_admin.php	(revision 270)
+++ plugins/widgets/_admin.php	(revision 324)
@@ -16,5 +16,5 @@
 function widgets_dashboard_favs($core,$favs)
 {
-	$favs['widgets'] = new ArrayObject(array('widgets',__('Presentation widgets'),'plugin.php?p=widgets',
+	$favs['widgets'] = new ArrayObject(array('widgets','Presentation widgets','plugin.php?p=widgets',
 		'index.php?pf=widgets/icon.png','index.php?pf=widgets/icon-big.png',
 		'admin',null,null));
Index: plugins/widgets/_define.php
===================================================================
--- plugins/widgets/_define.php	(revision 270)
+++ plugins/widgets/_define.php	(revision 464)
@@ -17,6 +17,8 @@
 	/* Author */			"Olivier Meunier",
 	/* Version */			'2',
-	/* Permissions */		'admin',
-	/* Priority */			1000000000
+	array(
+		'permissions' =>	'admin',
+		'priority' =>		1000000000
+	)
 );
 ?>
Index: hemes/ductile/_config.php
===================================================================
--- themes/ductile/_config.php	(revision 443)
+++ 	(revision )
@@ -1,347 +1,0 @@
-<?php
-# -- BEGIN LICENSE BLOCK ---------------------------------------
-#
-# This file is part of Dotclear 2.
-#
-# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
-# Licensed under the GPL version 2.0 license.
-# See LICENSE file or
-# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
-#
-# -- END LICENSE BLOCK -----------------------------------------
-if (!defined('DC_CONTEXT_ADMIN')) { return; }
-
-l10n::set(dirname(__FILE__).'/locales/'.$_lang.'/admin');
-
-$sticker_images = array(
-	__('Contact') => 'sticker-contact.png',
-	__('Feed') => 'sticker-feed.png',
-	__('About') => 'sticker-about.png'
-);
-
-$fonts = array(
-	__('default') => '',
-	__('Ductile primary') => 'Ductile body',
-	__('Ductile secondary') => 'Ductile alternate',
-	__('Times New Roman') => 'Times New Roman',
-	__('Georgia') => 'Georgia',
-	__('Garamond') => 'Garamond',
-	__('Helvetica/Arial') => 'Helvetica/Arial',
-	__('Verdana') => 'Verdana',
-	__('Trebuchet MS') => 'Trebuchet MS',
-	__('Impact') => 'Impact',
-	__('Monospace') => 'Monospace'
-);
-
-function adjustFontSize($s)
-{
-	if (preg_match('/^([0-9.]+)\s*(%|pt|px|em|ex)?$/',$s,$m)) {
-		if (empty($m[2])) {
-			$m[2] = 'em';
-		}
-		return $m[1].$m[2];
-	}
-
-	return null;
-}
-
-function adjustColor($c)
-{
-	if ($c === '') {
-		return '';
-	}
-
-	$c = strtoupper($c);
-
-	if (preg_match('/^[A-F0-9]{3,6}$/',$c)) {
-		$c = '#'.$c;
-	}
-
-	if (preg_match('/^#[A-F0-9]{6}$/',$c)) {
-		return $c;
-	}
-
-	if (preg_match('/^#[A-F0-9]{3,}$/',$c)) {
-		return '#'.substr($c,1,1).substr($c,1,1).substr($c,2,1).substr($c,2,1).substr($c,3,1).substr($c,3,1);
-	}
-
-	return '';
-}
-
-$ductile_base = array(
-	// HTML
-	'subtitle_hidden' => null,
-	// CSS
-	'body_font' => null,
-	'alternate_font' => null,
-	'blog_title_w' => null,
-	'blog_title_s' => null,
-	'blog_title_c' => null,
-	'post_title_w' => null,
-	'post_title_s' => null,
-	'post_title_c' => null,
-	'post_link_w' => null,
-	'post_link_v_c' => null,
-	'post_link_f_c' => null,
-	'blog_title_w_m' => null,
-	'blog_title_s_m' => null,
-	'blog_title_c_m' => null,
-	'post_title_w_m' => null,
-	'post_title_s_m' => null,
-	'post_title_c_m' => null
-);
-
-$ductile_user = $core->blog->settings->themes->get($core->blog->settings->system->theme.'_style');
-$ductile_user = @unserialize($ductile_user);
-if (!is_array($ductile_user)) {
-	$ductile_user = array();
-}
-
-$ductile_user = array_merge($ductile_base,$ductile_user);
-
-$ductile_stickers_base = array(
-	array('label' => null,'url' => null,'image' => null),
-	array('label' => null,'url' => null,'image' => null),
-	array('label' => null,'url' => null,'image' => null)
-);
-
-$ductile_stickers = $core->blog->settings->themes->get($core->blog->settings->system->theme.'_stickers');
-$ductile_stickers = @unserialize($ductile_stickers);
-if (!is_array($ductile_stickers)) {
-	$ductile_stickers = $ductile_stickers_base;
-}
-
-$conf_tab = isset($_POST['conf_tab']) ? $_POST['conf_tab'] : 'html';
-
-if (!empty($_POST))
-{
-	try
-	{
-		# HTML
-		if ($conf_tab == 'html') {
-			$ductile_user['subtitle_hidden'] = (integer) !empty($_POST['subtitle_hidden']);
-			
-			$count = 0;
-			if (!empty($_POST['sticker1_label']) && !empty($_POST['sticker1_url'])) {
-				$ductile_stickers[$count]['label'] = $_POST['sticker1_label'];
-				$ductile_stickers[$count]['url'] = $_POST['sticker1_url'];
-				$ductile_stickers[$count]['image'] = $_POST['sticker1_image'];
-				$count++;
-			}
-			if (!empty($_POST['sticker2_label']) && !empty($_POST['sticker2_url'])) {
-				$ductile_stickers[$count]['label'] = $_POST['sticker2_label'];
-				$ductile_stickers[$count]['url'] = $_POST['sticker2_url'];
-				$ductile_stickers[$count]['image'] = $_POST['sticker2_image'];
-				$count++;
-			}
-			if (!empty($_POST['sticker3_label']) && !empty($_POST['sticker3_url'])) {
-				$ductile_stickers[$count]['label'] = $_POST['sticker3_label'];
-				$ductile_stickers[$count]['url'] = $_POST['sticker3_url'];
-				$ductile_stickers[$count]['image'] = $_POST['sticker3_image'];
-				$count++;
-			}
-			for ($i = $count; $i < 3; $i++) {
-				$ductile_stickers[$i]['label'] = null;
-				$ductile_stickers[$i]['url'] = null;
-				$ductile_stickers[$i]['image'] = null;
-			}
-		}
-		
-		# CSS
-		if ($conf_tab == 'css') {
-			$ductile_user['body_font'] = $_POST['body_font'];
-			$ductile_user['alternate_font'] = $_POST['alternate_font'];
-
-			$ductile_user['blog_title_w'] = (integer) !empty($_POST['blog_title_w']);
-			$ductile_user['blog_title_s'] = adjustFontSize($_POST['blog_title_s']);
-			$ductile_user['blog_title_c'] = adjustColor($_POST['blog_title_c']);
-		
-			$ductile_user['post_title_w'] = (integer) !empty($_POST['post_title_w']);
-			$ductile_user['post_title_s'] = adjustFontSize($_POST['post_title_s']);
-			$ductile_user['post_title_c'] = adjustColor($_POST['post_title_c']);
-		
-			$ductile_user['post_link_w'] = (integer) !empty($_POST['post_link_w']);
-			$ductile_user['post_link_v_c'] = adjustColor($_POST['post_link_v_c']);
-			$ductile_user['post_link_f_c'] = adjustColor($_POST['post_link_f_c']);
-		
-			$ductile_user['blog_title_w_m'] = (integer) !empty($_POST['blog_title_w_m']);
-			$ductile_user['blog_title_s_m'] = adjustFontSize($_POST['blog_title_s_m']);
-			$ductile_user['blog_title_c_m'] = adjustColor($_POST['blog_title_c_m']);
-		
-			$ductile_user['post_title_w_m'] = (integer) !empty($_POST['post_title_w_m']);
-			$ductile_user['post_title_s_m'] = adjustFontSize($_POST['post_title_s_m']);
-			$ductile_user['post_title_c_m'] = adjustColor($_POST['post_title_c_m']);
-		}
-		
-		$core->blog->settings->addNamespace('themes');
-		$core->blog->settings->themes->put($core->blog->settings->system->theme.'_style',serialize($ductile_user));
-		$core->blog->settings->themes->put($core->blog->settings->system->theme.'_stickers',serialize($ductile_stickers));
-		$core->blog->triggerBlog();
-
-		echo
-		'<div class="message"><p>'.
-		__('Theme configuration upgraded.').
-		'</p></div>';
-	}
-	catch (Exception $e)
-	{
-		$core->error->add($e->getMessage());
-	}
-}
-
-// To be deleted when adminThemeConfigManaged behaviour will be implemented in admin/blog_themes.php :
-echo '</form>';
-
-# HTML Tab
-
-echo '<div class="multi-part" id="themes-list'.($conf_tab == 'html' ? '' : '-html').'" title="'.__('Content').'">';
-
-echo '<form id="theme_config" action="blog_theme.php?conf=1" method="post" enctype="multipart/form-data">';
-
-echo '<fieldset><legend>'.__('Header').'</legend>'.
-'<p class="field"><label for="subtitle_hidden">'.__('Hide blog description:').' '.
-form::checkbox('subtitle_hidden',1,$ductile_user['subtitle_hidden']).'</label>'.'</p>'.
-'</fieldset>';
-
-echo '<fieldset><legend>'.__('Stickers').'</legend>';
-
-echo '<table id="stickerslist">'.'<caption>'.__('Stickers (footer)').'</caption>'.
-'<thead>'.
-'<tr>'.
-'<th scope="col">'.__('Position').'</th>'.
-'<th scope="col">'.__('Label').'</th>'.
-'<th scope="col">'.__('URL').'</th>'.
-'<th scope="col">'.__('Icon').'</th>'.
-'</tr>'.
-'</thead>'.
-'<tbody>'.
-'<tr>'.
-'<td scope="raw">1</td>'.
-'<td>'.form::field('sticker1_label',20,255,$ductile_stickers[0]['label']).'</td>'.
-'<td>'.form::field('sticker1_url',40,255,$ductile_stickers[0]['url']).'</td>'.
-'<td>'.form::combo('sticker1_image',$sticker_images,$ductile_stickers[0]['image']).'</td>'.
-'</tr>'.
-'<tr>'.
-'<td scope="raw">2</td>'.
-'<td>'.form::field('sticker2_label',20,255,$ductile_stickers[1]['label']).'</td>'.
-'<td>'.form::field('sticker2_url',40,255,$ductile_stickers[1]['url']).'</td>'.
-'<td>'.form::combo('sticker2_image',$sticker_images,$ductile_stickers[1]['image']).'</td>'.
-'</tr>'.
-'<tr>'.
-'<td scope="raw">3</td>'.
-'<td>'.form::field('sticker3_label',20,255,$ductile_stickers[2]['label']).'</td>'.
-'<td>'.form::field('sticker3_url',40,255,$ductile_stickers[2]['url']).'</td>'.
-'<td>'.form::combo('sticker3_image',$sticker_images,$ductile_stickers[2]['image']).'</td>'.
-'</tr>'.
-'</tbody>'.
-'</table>';
-
-echo '</fieldset>';
-
-echo '<input type="hidden" name="conf_tab" value="html">';
-echo '<p class="clear"><input type="submit" value="'.__('Save').'" />'.$core->formNonce().'</p>';
-echo '</form>';
-
-echo '</div>'; // Close tab
-
-# CSS tab
-
-echo '<div class="multi-part" id="themes-list'.($conf_tab == 'css' ? '' : '-css').'" title="'.__('Presentation').'">';
-
-echo '<form id="theme_config" action="blog_theme.php?conf=1" method="post" enctype="multipart/form-data">';
-
-echo '<h3>'.__('General settings').'</h3>';
-
-echo '<fieldset><legend>'.__('Fonts').'</legend>'.
-'<p class="field"><label for="body_font">'.__('Main:').' '.
-form::combo('body_font',$fonts,$ductile_user['body_font']).'</label></p>'.
-
-'<p class="field"><label for="alternate_font">'.__('Secondary:').' '.
-form::combo('alternate_font',$fonts,$ductile_user['alternate_font']).'</label></p>'.
-'</fieldset>';
-
-echo '<div class="two-cols">';
-echo '<div class="col">';
-
-echo '<fieldset><legend>'.__('Blog title').'</legend>'.
-'<p class="field"><label for="blog_title_w">'.__('In bold:').' '.
-form::checkbox('blog_title_w',1,$ductile_user['blog_title_w']).'</label>'.'</p>'.
-
-'<p class="field"><label for="blog_title_s">'.__('Font size (in em by default):').'</label> '.
-form::field('blog_title_s',7,7,$ductile_user['blog_title_s']).'</p>'.
-
-'<p class="field picker"><label for="blog_title_c">'.__('Color:').'</label> '.
-form::field('blog_title_c',7,7,$ductile_user['blog_title_c'],'colorpicker').'</p>'.
-'</fieldset>';
-
-echo '</div>';
-echo '<div class="col">';
-
-echo '<fieldset><legend>'.__('Post title').'</legend>'.
-'<p class="field"><label for="post_title_w">'.__('In bold:').' '.
-form::checkbox('post_title_w',1,$ductile_user['post_title_w']).'</label>'.'</p>'.
-
-'<p class="field"><label for="post_title_s">'.__('Font size (in em by default):').'</label> '.
-form::field('post_title_s',7,7,$ductile_user['post_title_s']).'</p>'.
-
-'<p class="field picker"><label for="post_title_c">'.__('Color:').'</label> '.
-form::field('post_title_c',7,7,$ductile_user['post_title_c'],'colorpicker').'</p>'.
-'</fieldset>';
-
-echo '</div>';
-echo '</div>';
-
-echo '<fieldset><legend>'.__('Inside posts links').'</legend>'.
-'<p class="field"><label for="post_link_w">'.__('In bold:').' '.
-form::checkbox('post_link_w',1,$ductile_user['post_link_w']).'</label>'.'</p>'.
-
-'<p class="field picker"><label for="post_link_v_c">'.__('Normal and visited links color:').'</label> '.
-form::field('post_link_v_c',7,7,$ductile_user['post_link_v_c'],'colorpicker').'</p>'.
-
-'<p class="field picker"><label for="body_link_f_c">'.__('Active, hover and focus links color:').'</label> '.
-form::field('post_link_f_c',7,7,$ductile_user['post_link_f_c'],'colorpicker').'</p>'.
-'</fieldset>';
-
-echo '<h3>'.__('Mobile specific settings').'</h3>';
-
-echo '<div class="two-cols">';
-echo '<div class="col">';
-
-echo '<fieldset><legend>'.__('Blog title').'</legend>'.
-'<p class="field"><label for="blog_title_w_m">'.__('In bold:').' '.
-form::checkbox('blog_title_w_m',1,$ductile_user['blog_title_w_m']).'</label>'.'</p>'.
-
-'<p class="field"><label for="blog_title_s_m">'.__('Font size (in em by default):').'</label> '.
-form::field('blog_title_s_m',7,7,$ductile_user['blog_title_s_m']).'</p>'.
-
-'<p class="field picker"><label for="blog_title_c_m">'.__('Color:').'</label> '.
-form::field('blog_title_c_m',7,7,$ductile_user['blog_title_c_m'],'colorpicker').'</p>'.
-'</fieldset>';
-
-echo '</div>';
-echo '<div class="col">';
-
-echo '<fieldset><legend>'.__('Post title').'</legend>'.
-'<p class="field"><label for="post_title_w_m">'.__('In bold:').' '.
-form::checkbox('post_title_w_m',1,$ductile_user['post_title_w_m']).'</label>'.'</p>'.
-
-'<p class="field"><label for="post_title_s_m">'.__('Font size (in em by default):').'</label> '.
-form::field('post_title_s_m',7,7,$ductile_user['post_title_s_m']).'</p>'.
-
-'<p class="field picker"><label for="post_title_c_m">'.__('Color:').'</label> '.
-form::field('post_title_c_m',7,7,$ductile_user['post_title_c_m'],'colorpicker').'</p>'.
-'</fieldset>';
-
-echo '</div>';
-echo '</div>';
-
-echo '<input type="hidden" name="conf_tab" value="css">';
-echo '<p class="clear"><input type="submit" value="'.__('Save').'" />'.$core->formNonce().'</p>';
-echo '</form>';
-
-echo '</div>'; // Close tab
-
-// To be deleted when adminThemeConfigManaged behaviour will be implemented in admin/blog_themes.php :
-echo '<form style="display:none">';
-
-?>
Index: hemes/ductile/_define.php
===================================================================
--- themes/ductile/_define.php	(revision 446)
+++ 	(revision )
@@ -1,18 +1,0 @@
-<?php
-# -- BEGIN LICENSE BLOCK ---------------------------------------
-#
-# Copyright (c) Association Dotclear
-# Licensed under the GPL version 2.0 license.
-# See LICENSE file or
-# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
-#
-# -- END LICENSE BLOCK -----------------------------------------
-if (!defined('DC_RC_PATH')) { return; }
-
-$this->registerModule(
-	/* Name */			"Ductile",
-	/* Description*/		"Chantier pour un nouveau theme",
-	/* Author */			"Dotclear Team",
-	/* Version */			'0.7'
-);
-?>
Index: hemes/ductile/_prepend.php
===================================================================
--- themes/ductile/_prepend.php	(revision 435)
+++ 	(revision )
@@ -1,35 +1,0 @@
-<?php
-# -- BEGIN LICENSE BLOCK ---------------------------------------
-#
-# This file is part of Dotclear 2.
-#
-# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
-# Licensed under the GPL version 2.0 license.
-# See LICENSE file or
-# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
-#
-# -- END LICENSE BLOCK -----------------------------------------
-
-# Public and Admin modes :
-
-if (!defined('DC_RC_PATH')) { return; }
-
-# Admin mode only :
-
-# Behaviors
-$GLOBALS['core']->addBehavior('adminPageHTMLHead',array('tplDuctileThemeAdmin','adminPageHTMLHead'));
-$GLOBALS['core']->addBehavior('adminThemeConfigManaged',array('tplDuctileThemeAdmin','adminThemeConfigManaged'));
-
-class tplDuctileThemeAdmin
-{
-	public static function adminPageHTMLHead()
-	{
-		echo "\n".'<!-- Header directives for Ductile configuration -->'."\n";
-	}
-
-	public static function adminThemeConfigManaged()
-	{
-		return true;
-	}
-}
-?>
Index: hemes/ductile/_public.php
===================================================================
--- themes/ductile/_public.php	(revision 444)
+++ 	(revision )
@@ -1,258 +1,0 @@
-<?php
-# -- BEGIN LICENSE BLOCK ---------------------------------------
-#
-# This file is part of Dotclear 2.
-#
-# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
-# Licensed under the GPL version 2.0 license.
-# See LICENSE file or
-# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
-#
-# -- END LICENSE BLOCK -----------------------------------------
-
-if (!defined('DC_RC_PATH')) { return; }
-
-# Behaviors
-$core->addBehavior('publicHeadContent',array('tplDuctileTheme','publicHeadContent'));
-$core->addBehavior('publicInsideFooter',array('tplDuctileTheme','publicInsideFooter'));
-
-class tplDuctileTheme
-{
-	public static function publicInsideFooter($core)
-	{
-		$res = '';
-		$default = false;
-		$img_url = $core->blog->settings->system->themes_url.'/'.$core->blog->settings->system->theme.'/img/';
-
-		$s = $core->blog->settings->themes->get($core->blog->settings->system->theme.'_stickers');
-
-		if ($s === null) {
-			$default = true;
-		} else {
-			$s = @unserialize($s);
-			if (!is_array($s)) {
-				$default = true;
-			} else {
-				$s = array_filter($s,"tplDuctileTheme::cleanStickers");
-				if (count($s) == 0) {
-					$default = true;
-				} else {
-					$count = 1;
-					foreach ($s as $sticker) {
-						$res .= self::setSticker($count,($count == count($s)),$sticker['label'],$sticker['url'],$img_url.$sticker['image']);
-						$count++;
-					}
-				}
-			}
-		}
-
-		if ($default || $res == '') {
-			$res = self::setSticker(1,true,__('Feed'),$core->blog->url.$core->url->getBase('feed').'/atom',$img_url.'sticker-feed.png');
-		}
-
-		if ($res != '') {
-			$res = '<ul id="stickers">'."\n".$res.'</ul>'."\n";
-			echo $res;
-		}
-	}
-	
-	protected static function cleanStickers($s)
-	{
-		if (is_array($s)) {
-			if (isset($s['label']) && isset($s['url']) && isset($s['image'])) {
-				if ($s['label'] != null && $s['url'] != null && $s['image'] != null) {
-					return true;
-				}
-			}
-		}
-		return false;
-	}
-	
-	protected static function setSticker($position,$last,$label,$url,$image)
-	{
-		return '<li id="sticker'.$position.'"'.($last ? ' class="last"' : '').'>'."\n".
-			'<a href="'.$url.'">'."\n".
-			'<img alt="" src="'.$image.'" />'."\n".
-			'<span>'.$label.'</span>'."\n".
-			'</a>'."\n".
-			'</li>'."\n";
-	}
-
-	public static function publicHeadContent($core)
-	{
-		echo 
-			'<style type="text/css">'."\n".
-			'/* '.__('Additionnal style directives').' */'."\n".
-			self::ductileStyleHelper().
-			"</style>\n";
-	}
-	
-	public static function ductileStyleHelper()
-	{
-		$s = $GLOBALS['core']->blog->settings->themes->get($GLOBALS['core']->blog->settings->system->theme.'_style');
-
-		if ($s === null) {
-			return;
-		}
-
-		$s = @unserialize($s);
-		if (!is_array($s)) {
-			return;
-		}
-
-		$css = array();
-
-		# Properties
-		
-		# Blog description
-		$selectors = '#blogdesc';
-		if (isset($s['subtitle_hidden'])) self::prop($css,$selectors,'display',($s['subtitle_hidden'] ? 'none' : null));
-
-		# Main font
-		$selectors = 'body, #supranav li a span, #comments.me, a.comment-number';
-		if (isset($s['body_font'])) self::prop($css,$selectors,'font-family',self::fontDef($s['body_font']));
-
-		# Secondary font
-		$selectors = '#blogdesc, #supranav, #content-info, #subcategories, #comments-feed, #sidebar h2, #sidebar h3, #footer p';
-		if (isset($s['alternate_font'])) self::prop($css,$selectors,'font-family',self::fontDef($s['alternate_font']));
-		
-		# Inside posts links font weight
-		$selectors = '.post-excerpt a, .post-content a';
-		if (isset($s['post_link_w'])) self::prop($css,$selectors,'font-weight',($s['post_link_w'] ? 'bold' : 'normal'));
-
-		# Inside posts links colors (normal, visited)
-		$selectors = '.post-excerpt a:link, .post-excerpt a:visited, .post-content a:link, .post-content a:visited';
-		if (isset($s['post_link_v_c'])) self::prop($css,$selectors,'color',$s['post_link_v_c']);
-
-		# Inside posts links colors (hover, active, focus)
-		$selectors = '.post-excerpt a:hover, .post-excerpt a:active, .post-excerpt a:focus, .post-content a:hover, .post-content a:active, .post-content a:focus';
-		if (isset($s['post_link_f_c'])) self::prop($css,$selectors,'color',$s['post_link_f_c']);
-
-		# Style directives
-		$res = '';
-		foreach ($css as $selector => $values) {
-			$res .= $selector." {\n";
-			foreach ($values as $k => $v) {
-				$res .= $k.':'.$v.";\n";
-			}
-			$res .= "}\n";
-		}
-
-		# Large screens
-		$css_large = array();
-
-		# Blog title font weight
-		$selectors = 'h1, h1 a:link, h1 a:visited, h1 a:hover, h1 a:visited, h1 a:focus';
-		if (isset($s['blog_title_w'])) self::prop($css_large,$selectors,'font-weight',($s['blog_title_w'] ? 'bold' : 'normal'));
-		
-		# Blog title font size
-		$selectors = 'h1';
-		if (isset($s['blog_title_s'])) self::prop($css_large,$selectors,'font-size',$s['blog_title_s']);
-		
-		# Blog title color
-		$selectors = 'h1 a:link, h1 a:visited, h1 a:hover, h1 a:visited, h1 a:focus';
-		if (isset($s['blog_title_c'])) self::prop($css_large,$selectors,'color',$s['blog_title_c']);
-
-		# Post title font weight
-		$selectors = 'h2.post-title, h2.post-title a:link, h2.post-title a:visited, h2.post-title a:hover, h2.post-title a:visited, h2.post-title a:focus';
-		if (isset($s['post_title_w'])) self::prop($css_large,$selectors,'font-weight',($s['post_title_w'] ? 'bold' : 'normal'));
-		
-		# Post title font size
-		$selectors = 'h2.post-title';
-		if (isset($s['post_title_s'])) self::prop($css_large,$selectors,'font-size',$s['post_title_s']);
-		
-		# Post title color
-		$selectors = 'h2.post-title a:link, h2.post-title a:visited, h2.post-title a:hover, h2.post-title a:visited, h2.post-title a:focus';
-		if (isset($s['post_title_c'])) self::prop($css_large,$selectors,'color',$s['post_title_c']);
-
-		# Style directives for large screens
-		if (count($css_large)) {
-			$res .= '@media only screen and (min-width: 481px) {'."\n";
-			foreach ($css_large as $selector => $values) {
-				$res .= $selector." {\n";
-				foreach ($values as $k => $v) {
-					$res .= $k.':'.$v.";\n";
-				}
-				$res .= "}\n";
-			}
-			$res .= "}\n";
-		}
-
-		# Small screens
-		$css_small = array();
-
-		# Blog title font weight
-		$selectors = 'h1, h1 a:link, h1 a:visited, h1 a:hover, h1 a:visited, h1 a:focus';
-		if (isset($s['blog_title_w_m'])) self::prop($css_small,$selectors,'font-weight',($s['blog_title_w_m'] ? 'bold' : 'normal'));
-		
-		# Blog title font size
-		$selectors = 'h1';
-		if (isset($s['blog_title_s_m'])) self::prop($css_small,$selectors,'font-size',$s['blog_title_s_m']);
-		
-		# Blog title color
-		$selectors = 'h1 a:link, h1 a:visited, h1 a:hover, h1 a:visited, h1 a:focus';
-		if (isset($s['blog_title_c_m'])) self::prop($css_small,$selectors,'color',$s['blog_title_c_m']);
-
-		# Post title font weight
-		$selectors = 'h2.post-title, h2.post-title a:link, h2.post-title a:visited, h2.post-title a:hover, h2.post-title a:visited, h2.post-title a:focus';
-		if (isset($s['post_title_w_m'])) self::prop($css_small,$selectors,'font-weight',($s['post_title_w_m'] ? 'bold' : 'normal'));
-		
-		# Post title font size
-		$selectors = 'h2.post-title';
-		if (isset($s['post_title_s_m'])) self::prop($css_small,$selectors,'font-size',$s['post_title_s_m']);
-		
-		# Post title color
-		$selectors = 'h2.post-title a:link, h2.post-title a:visited, h2.post-title a:hover, h2.post-title a:visited, h2.post-title a:focus';
-		if (isset($s['post_title_c_m'])) self::prop($css_small,$selectors,'color',$s['post_title_c_m']);
-
-		# Style directives for small screens
-		if (count($css_small)) {
-			$res .= '@media only screen and (max-width: 480px) {'."\n";
-			foreach ($css_small as $selector => $values) {
-				$res .= $selector." {\n";
-				foreach ($values as $k => $v) {
-					$res .= $k.':'.$v.";\n";
-				}
-				$res .= "}\n";
-			}
-			$res .= "}\n";
-		}
-		
-		return $res;
-	}
-
-	protected static $fonts = array(
-		// Theme standard
-		'Ductile body' => '"Century Schoolbook", "Century Schoolbook L", Georgia, serif',
-		'Ductile alternate' => '"Franklin gothic medium", "arial narrow", "DejaVu Sans Condensed", "helvetica neue", helvetica, sans-serif',
-
-		// Serif families
-		'Times New Roman' => 'Cambria, "Hoefler Text", Utopia, "Liberation Serif", "Nimbus Roman No9 L Regular", Times, "Times New Roman", serif',
-		'Georgia' => 'Constantia, "Lucida Bright", Lucidabright, "Lucida Serif", Lucida, "DejaVu Serif," "Bitstream Vera Serif", "Liberation Serif", Georgia, serif',
-		'Garamond' => '"Palatino Linotype", Palatino, Palladio, "URW Palladio L", "Book Antiqua", Baskerville, "Bookman Old Style", "Bitstream Charter", "Nimbus Roman No9 L", Garamond, "Apple Garamond", "ITC Garamond Narrow", "New Century Schoolbook", "Century Schoolbook", "Century Schoolbook L", Georgia, serif',
-
-		// Sans-serif families
-		'Helvetica/Arial' => 'Frutiger, "Frutiger Linotype", Univers, Calibri, "Gill Sans", "Gill Sans MT", "Myriad Pro", Myriad, "DejaVu Sans Condensed", "Liberation Sans", "Nimbus Sans L", Tahoma, Geneva, "Helvetica Neue", Helvetica, Arial, sans-serif',
-		'Verdana' => 'Corbel, "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", "DejaVu Sans", "Bitstream Vera Sans", "Liberation Sans", Verdana, "Verdana Ref", sans-serif',
-		'Trebuchet MS' => '"Segoe UI", Candara, "Bitstream Vera Sans", "DejaVu Sans", "Bitstream Vera Sans", "Trebuchet MS", Verdana, "Verdana Ref", sans-serif',
-
-		// Cursive families
-		'Impact' => 'Impact, Haettenschweiler, "Franklin Gothic Bold", Charcoal, "Helvetica Inserat", "Bitstream Vera Sans Bold", "Arial Black", sans-serif',
-
-		// Monospace families
-		'Monospace' => 'Consolas, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace'
-	);
-
-	protected static function fontDef($c)
-	{
-		return isset(self::$fonts[$c]) ? self::$fonts[$c] : null;
-	}
-
-	protected static function prop(&$css,$selector,$prop,$value)
-	{
-		if ($value) {
-			$css[$selector][$prop] = $value;
-		}
-	}
-}
-?>
Index: hemes/ductile/locales/fr/admin.po
===================================================================
--- themes/ductile/locales/fr/admin.po	(revision 421)
+++ 	(revision )
@@ -1,83 +1,0 @@
-msgid "Theme configuration upgraded."
-msgstr "Configuration du thème mise à jour."
-
-msgid "Content"
-msgstr "Contenu"
-
-msgid "Header"
-msgstr "Entête"
-
-msgid "Hide blog description:"
-msgstr "Cacher la description du blog :"
-
-msgid "Presentation"
-msgstr "Présentation"
-
-msgid "General settings"
-msgstr "Paramètres généraux"
-
-msgid "Mobile specific settings"
-msgstr "Paramètres spécifiques pour les mobiles"
-
-msgid "Blog title"
-msgstr "Titre du blog"
-
-msgid "In bold:"
-msgstr "En gras :"
-
-msgid "Font size (in em by default):"
-msgstr "Taille de police (en em par défaut) :"
-
-msgid "Color:"
-msgstr "Couleur :"
-
-msgid "Post title"
-msgstr "Titre des billets"
-
-msgid "Inside posts links"
-msgstr "Liens dans les billets"
-
-msgid "Normal and visited links color:"
-msgstr "Couleur des liens normaux et visités :"
-
-msgid "Active, hover and focus links color:"
-msgstr "Couleur des liens actifs, survolés et ayant le focus :"
-
-msgid "Fonts"
-msgstr "Polices de caractère"
-
-msgid "Main:"
-msgstr "Principale :"
-
-msgid "Secondary:"
-msgstr "Secondaire :"
-
-msgid "Ductile primary"
-msgstr "Principale de Ductile"
-
-msgid "Ductile secondary"
-msgstr "Secondaire de Ductile"
-
-msgid "Times New Roman"
-msgstr "Times New Roman"
-
-msgid "Georgia"
-msgstr "Georgia"
-
-msgid "Garamond"
-msgstr "Garamond"
-
-msgid "Helvetica/Arial"
-msgstr "Helvetica/Arial"
-
-msgid "Verdana"
-msgstr "Verdana"
-
-msgid "Trebuchet MS"
-msgstr "Trebuchet MS"
-
-msgid "Impact"
-msgstr "Impact"
-
-msgid "Monospace"
-msgstr "Monospace"
Index: hemes/ductile/locales/fr/main.po
===================================================================
--- themes/ductile/locales/fr/main.po	(revision 421)
+++ 	(revision )
@@ -1,2 +1,0 @@
-msgid "Additionnal style directives"
-msgstr "Directives CSS supplémentaires"
Index: hemes/ductile/mediaqueries.css
===================================================================
--- themes/ductile/mediaqueries.css	(revision 470)
+++ 	(revision )
@@ -1,275 +1,0 @@
-@charset "UTF-8";
-
-/* seuils retenus :
-< 480px: tout en une colonne, sidebar et stickers en bas
-> 480px: stickers en haut
-> 640px: sidebar toujours en bas mais divisé en deux colonnes
-> 1024px: passage à deux colonnes, sidebar à droite
-> 1280px: décalage du post-info vers la gauche
-> 1600px: marges plus grandes */
-
-/* --------------------------------------------------------------------
-	Moins de 480px (téléphones)
--------------------------------------------------------------------- */
-@media only screen and (max-width:480px) {
-	.nomobile {
-		display: none !important;
-		}
-	h1 {
-		font-size: 1.8em;
-		}
-	h1 a {
-		display: block;
-		padding: 6px 8px;
-		background: #f4f4f5;
-		background: -webkit-gradient(linear, left top, left bottom, from(#f4f4f5), to(#d7d7dC));
-		background: -moz-linear-gradient(top,  #f4f4f5,  #d7d7dC);
-		border-right: 1px solid #aaa;
-		border-bottom: 1px solid #ccc;
-		}
-	#supranav {
-		border:none;
-		margin: 8px 0 0;
-		}
-	#supranav li a {
-		border-right: 0;
-		display: block;
-		padding: 4px 8px;
-		border-bottom: 1px solid #ccc;
-		}
-	.post-title {
-		font-size: 1.5em;
-		font-weight: bold;
-		font-family: "Franklin gothic medium","arial narrow","DejaVu Sans Condensed","helvetica neue",helvetica,sans-serif;
-		}
-	.post-title a {
-		font-style: normal;
-		font-weight: bold;
-		}
-	#stickers {
-		margin: 0;
-		padding: 0;
-		border-bottom: 8px solid #fff;
-		}
-	#stickers li {
-		position: relative;
-		padding: .5em 0;
-		margin-left: 0;
-		border-style: solid;
-		border-color: #fff;
-		border-width: 2px 6px;
-		overflow: hidden;
-		}
-	#stickers img {
-		position: absolute;
-		top: -2px;
-		clip: rect(0 32px 36px 0);
-		clip: rect(0, 32px, 36px, 0);
-		}
-	#stickers span {
-		margin-left: 40px;
-		}
-	#stickers a {
-		text-decoration: none;
-		}
-}
-
-/* --------------------------------------------------------------------
-	Autres (plus de 480px)
--------------------------------------------------------------------- */
-
-@media only screen and (min-width: 481px) {
-	#top {
-		padding-top: 24px;
-		}
-	h1 {
-		font-size: 2em;
-		padding-right: 240px;
-		padding-bottom: 4px;
-		margin-left: 32px;
-		}
-	#supranav {
-		margin: 36px 0 0;
-		border-bottom: 1px solid #ccc;
-		}
-	#supranav li {
-		display: inline;
-		padding: 8px 0;
-		}
-	#supranav li a {
-		display: inline-block;
-		padding: 8px 32px 8px 28px;
-		border-right: 1px solid #ccc;
-	 	}
-	#supranav li a span {
-		display: block;
-		}
-	.post-title {
-		font-size: 2.5em;
-		font-weight: normal;
-		}
-	.post-title a {
-		font-style: italic;
-		font-weight: normal;
-		}
-	#stickers {
-		position: absolute;
-		top: 0;
-		right: 0;
-		padding-right: 3%;
-		font-size: .75em;
-		}
-	#stickers li {
-		display: block;
-		float: right;
-		text-align: center;
-		width: 60px;
-		padding: 0;
-		}
-	#stickers li span {
-		display: block;
-		text-align: center;
-		}
-	#stickers li a:hover,
-	#stickers li a:active,
-	#stickers li a:focus {
-		background-color: #fff;
-		}
-	#stickers a:hover, #stickers a:focus {
-		color: #666;
-		background: #fff;
-		}
-}
-
-/* ------------------------------------------------------ special redimensionnement paysage */
-@media screen and (max-width:640px) and (orientation: landscape) { 
-  body { 
-   -webkit-text-size-adjust: 70%; 
-  } 
-}
-
-/* ------------------------------------------------------ règles communes > 640px */
-@media only screen and (max-width:639px) {
-	body {
-		-webkit-text-size-adjust: none;
-		}
-	#wrapper {
-		padding: 0 2%;
-		}
-	img {
-		max-width: 100%;
-		height: auto;
-		width: auto\9; /* pour ie8 */
-		}
-}
-
-/* ------------------------------------------------------ spécifique 640px à 1024px */
-@media only screen and (min-width: 640px) and (max-width: 1023px) {
-	#wrapper {
-		padding: 0 10%;
-		}
-	#blognav, #blogextra { 
-		width: 48%; float:left;
-		}
-	#blognav {
-		margin-right: 4%;
-		}
-	#stickers {
-		padding-right: 10%;
-		}
-}
-
-/* ------------------------------------------------------ spécifique 840px à 1024px */
-@media only screen and (min-width: 840px) and (max-width: 1023px) {
-	#wrapper {
-		padding: 0 13%;
-		}
-	#stickers {
-		padding-right: 13%;
-		}	
-}
-
-/* ------------------------------------------------------ 
-	au-delà de 1024px on passe à deux colonnes
------------------------------------------------------- */
-@media only screen and (min-width: 1024px) {
-	#wrapper {
-		padding: 0 7%;
-		}
-	#main {
-		width : 100%;
-		margin : 0 -17em 0 0;
-		float : left;
-		display: inline;
-		}
-	#content {
-		margin : 0 20em 0 0;
-		padding : 0 0 2em 0;
-		}
-	#sidebar {
-		width : 17em;
-		float : right;
-		}
-	#blognav, #blogextra {
-		margin : 0;
-		}
-	#stickers {
-		padding-right: 7%;
-		}
-	#sidebar #blognav div:first-child {
-		margin-top: 4.66em;
-		}
-	#sidebar div#search:first-child { 
-		background: none;
-		margin-top: 0;
-		margin-bottom: 2em;
-		padding-bottom: 2px;
-		font-size: 1em;
-		border: 1px solid #ddd;
-		border-top: none 0;
-		}
-	#sidebar div#search:first-child h2 {
-		font-size: 1em;
-		text-transform: uppercase;
-		text-shadow: 0 1px 1px rgba(0,0,0,.2);
-		vertical-align: top;
-		color: #666;
-		}
-	#sidebar div#search:first-child p {
-		margin: .33em 0;
-		}
-}
-
-/* ------------------------------------------------------ 
-	au-delà de 1280px on décale le post-info à gauche
-------------------------------------------------------- */
-@media only screen and (min-width: 1280px) {
-	#content {
-		margin : 0 20em 0 220px;
-		}
-	.post-attr { 
-		margin-left: -220px; 
-		float: left; 
-		width: 180px; 
-		text-align: right;
-		}
-	.post-attr a, .post-info, .post-tags {
-		padding-right: 0 !important;
-		}
-	.dc-archive-month .post-attr {
-		margin-left: 0;
-		float:none;
-		width: auto;
-		text-align: left;
-		}
-}
-
-/* ------------------------------------------------------ au-delà de 1600px */
-@media only screen and (min-width: 1600px) {
-	#wrapper {
-		padding: 0 10%;
-		}
-	#stickers {
-		padding-right: 10%;
-		}
-}
Index: hemes/ductile/rebase.css
===================================================================
--- themes/ductile/rebase.css	(revision 308)
+++ 	(revision )
@@ -1,99 +1,0 @@
-@charset "UTF-8";
-
-html, 
-body {
-	margin: 0;
-	padding: 0;
-	font-size: 100.1%;
-	line-height: 1.5;
-	}
-div, form, fieldset {
-	margin: 0;
-	padding: 0;
-	border: none;
-	}
-h2, h3, h4, h5, h6 {
-	line-height: 1.2;
-	font-weight: bold;
-	margin: 1em 0 .5em 0;
-	}
-h1 {
-	margin: 0;
-	font-weight: normal;
-	}
-h2 {
-	font-size: 1.6em;
-	}
-h3 {
-	font-size: 1.33em;
-	}
-h4 {
-	font-size: 1.2em;
-	}
-h5 {
-	font-size: 1.1em;
-	}
-h6 {
-	font-size: 1.5em;
-	}
-p {
-	margin: 1em 0 .5em 0;
-	}
-img a {
-	border: none;
-	}
-sup, sub {
-	font-size: .7em;
-	line-height: .7em;
-	}
-abbr, acronym {
-	border-bottom: 1px dotted;
-	cursor: help;
-	}
-strong {
-	font-size: .94em;
-	}
-blockquote, q {
-	font-style: italic;
-	}
-blockquote em, q em {
-	font-style: normal;
-	}
-cite {
-	font-size: .9em;
-	}
-ul, ol, dd {
-	margin: 1em 0 .5em 1.5em;
-	}
-ul ul, ol ol {
-	margin-top: .5em;
-	}
-code, pre {
-	font-family: "Andale mono","Courier New", Courier, mono;
-	font-size: .875em;
-	}
-code {
-	padding: 0 2px;
-	}
-pre {
-	margin: 1em;
-	overflow: auto;
-	padding: 1px .5em;
-	line-height: 1.2;
-	}
-hr {
-	height: 1px;
-	border: 0;
-	border-top: 1px solid #aaa;
-	width: 60%;
-	height: 1px;
-	}
-input, button, select {
-	vertical-align: middle;
-	}
-em, i {
-	font-style: italic;
-	}
-strong, b {
-	font-weight: bold;
-	}
Index: hemes/ductile/style.css
===================================================================
--- themes/ductile/style.css	(revision 470)
+++ 	(revision )
@@ -1,757 +1,0 @@
-@charset "UTF-8";
-
-/* Ductile
-	Dotclear theme by Dotclear Team
-	Version de chantier
-*/
-
-/* Infos
-Plan de cette feuille :
-1. Structure, imports
-2. Liens, html
-3. Page
-4. Haut de page
-5. Wrapper, main, content
-6. Billets
-7. Commentaires et rétroliens
-8. Sidebar
-9. Footer
-10. Classes communes
-11. Pages spécifiques
-12. Clearers
-
-Couleurs :
-Typo: #222 courant, #4c4c85 commentaires
-Liens: #666 courant, #ad3f4c titre billet et Lire la suite
-Fond formulaire comm: #eef
-Fond sidebar: #ededed
-
-Thanks to:
-Colorzilla wysiwyg gradient editor http://www.colorzilla.com/gradient-editor/
-*/
-
-/* -----------------------------------------------------------------
-	1. STRUCTURE - IMPORTS
------------------------------------------------------------------- */
-
-@import url(rebase.css);
-@import url(mediaqueries.css);
-
-/* ------------------------------------------------------- body */
-body {
-	background: #fff;
-	font-family: "Century Schoolbook", "Century Schoolbook L", Georgia, serif;
-	color: #222;
-	}
-
-/* ------------------------------------------------------------
-	2. LIENS & Complément balises HTML
-------------------------------------------------------------- */
-del {
-	color: #800000;
-	}
-blockquote {
-	border: 2px solid #eef;
-	padding: 1px 1em .5em;
-	}
-code, pre {
-	background: #efefef;
-	border-right: 1px solid #aaa;
-	border-bottom: 1px solid #aaa;
-	font-size: .81em;
-	}
-
-a {
-	color: #666;
-	}
-a:hover, a:focus {
-	background-color: #ebebee;
-	text-decoration: none;
-	}
-
-/* ------------------------------------------------------------
-	3. PAGE
-------------------------------------------------------------- */
-
-#page {
-	position: relative;
-	}
-
-/* ------------------------------------------------------------
-	4. HAUT DE PAGE
-------------------------------------------------------------- */
-#header {
-	text-shadow: 0 1px 1px rgba(0,0,0,.2);
-	line-height: 1;
-	}
-h1 {
-	font-variant: small-caps;
-	}
-h1 a {
-	text-decoration: none;
-	color: #333;
-	}
-#prelude {
-	position: absolute;
-	margin: 0;
-	top: 0;
-	left: 3px;
-	color: #fff;
-	font-size: .875em;
-	list-style-type: none;
-	}
-#prelude li {
-	display: inline;
-	}
-#prelude a, #prelude a:hover, #prelude a:visited {
-	position:absolute;
-	left:0;
-	top:-500px;
-	width:1px;
-	height:1px;
-	overflow:hidden;
-	}
-#prelude a:active, #prelude a:focus {
-	position:static;
-	width:auto;
-	height:auto;
-	}
-#blogdesc {
-	margin: 0 0 0 32px;
-	font-family: "Franklin gothic medium","arial narrow","DejaVu Sans Condensed","helvetica neue",helvetica,sans-serif;
-	font-style: italic;
-	color: #909090;
-	text-shadow: none;
-	}
-#supranav {
-	font-family: "Franklin gothic medium","arial narrow","DejaVu Sans Condensed","helvetica neue",helvetica,sans-serif;
-	padding: 0 0 0 4px;
-	list-style-type: none;
-	line-height: 1.25;
-	font-size: .875em;
-	}
-#supranav li {
-	text-transform: uppercase;
-	vertical-align: top;
-	}
-#supranav li a {
-	text-decoration: none;
-	white-space: nowrap;
-	margin-bottom: 4px;
-	-webkit-border-bottom-left-radius: 7px;
-	-moz-border-radius-bottomleft: 7px;
-	border-bottom-left-radius: 7px;	
-	background: transparent url(img/menu.png) no-repeat right top;
- }
-#supranav li a:hover, #supranav li a:active, #supranav li a:focus {
-	background-color: #ebebee;
-	background-position: right -150px;
-	}
-#supranav li.active a {
-	background-position: right -150px;
-	}
-#supranav li a span {
-	display: block;
-	text-transform: none;
-	text-shadow: none;
-	font-family: georgia;
-	font-style:italic;
-	}
-
-/* ------------------------------------------------------------
-	5. WRAPPER MAIN CONTENT
-------------------------------------------------------------- */
-
-#wrapper { clear:both; }
-#main { }
-#content { 
-	padding-bottom: 2em; 
-	}
-
-/* ------------------------------------------------------- content-info */
-#content-info {
-	margin-top: 4em;
-	font-size: .875em;
-	font-family: "Franklin gothic medium","arial narrow","DejaVu Sans Condensed","helvetica neue",helvetica,sans-serif;
-	}
-#content-info h2 { 
-	font-size: 1.2em;
-	}
-#subcategories {
-	font-size: .875em;
-	font-family: "Franklin gothic medium","arial narrow","DejaVu Sans Condensed","helvetica neue",helvetica,sans-serif;
-	}
-#subcategories h3 { 
-	font-size: 1.1em;
-	font-variant: small-caps;
-	}
-#content-info p, 
-#content-info ul, 
-#subcategories ul { 
-	margin: .5em 0;
-	}
-
-/* ------------------------------------------------------- pagination, navlinks */
-.navlinks, 
-.pagination {
-	margin: 2em 0 1em 0;
-	padding: 4px 8px;
-	text-align: center;
-	font-size: .875em;
-	color: #000;
-	background: rgb(244,244,245);
-	background: -moz-linear-gradient(top, rgba(244,244,245,1) 0%, rgba(215,215,220,1) 100%);
-	background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(244,244,245,1)), color-stop(100%,rgba(215,215,220,1)));
-	background: -webkit-linear-gradient(top, rgba(244,244,245,1) 0%,rgba(215,215,220,1) 100%);
-	background: -o-linear-gradient(top, rgba(244,244,245,1) 0%,rgba(215,215,220,1) 100%);
-	background: -ms-linear-gradient(top, rgba(244,244,245,1) 0%,rgba(215,215,220,1) 100%);
-	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f4f4f5', endColorstr='#d7d7dc',GradientType=0 );
-	background: linear-gradient(top, rgba(244,244,245,1) 0%,rgba(215,215,220,1) 100%);
-	-moz-border-radius: 4px;
-	-webkit-border-radius: 4px;
-	border-radius: 4px;
-	border-right: 1px solid #aaa;
-	border-bottom: 1px solid #ccc;
-	}
-.navlinks {
-	margin-top: 4em;
-	}
-.navlinks a, 
-.pagination a {
-	padding: 0 1em;
-	white-space: nowrap;
-	}
-
-/* ------------------------------------------------------------
-	6. BILLETS
-------------------------------------------------------------- */
-
-.post {
-	background: transparent url(img/filet.png) repeat-x left bottom;
-	}
-.day-date {
-	display: none;
-	}
-.post-title {
-	margin-bottom: .33em;
-	color: #000;
-	line-height: 1.17;
-	}
-.post-title a {
-	text-decoration: none;
-	color: #ad3f4c;
-	}
-.post h3, 
-.post h4, 
-.post h5,
-.post h6 {
-	font-variant: small-caps;
-	font-weight: normal;
-	color: #666;
-	}
-.post-info, 
-.post-tags, 
-.post-info-co, 
-.read-it, 
-.page-info {
-	line-height: 1.2;	
-	margin: .33em 0;
-	}
-.post-info, 
-.post-tags {
-	font-size: .875em;
-	margin: 0;
-	background: #fff;
-	display: inline;
-	padding: 0 .66em 0 0;
-	}
-.post-info span + span {
-	padding-left: .5em;
-	}
-.post-cat a {
-	padding-left: 24px;
-	background: #fff no-repeat left center url(img/category.png);
-	}
-.post-info a, 
-.post-tags a, 
-.post-info-co a {
-	white-space: nowrap;
-	}
-.post-tags a {
-	padding-right: 1em;
-	padding-left: 14px;
-	background: #fff no-repeat left center url(img/tag.png);
-	}
-.post-tags li {
-	display: inline;
-	}
-.post-content {
-	padding-bottom: 9px;
-	}
-.post ul {
-	list-style-type: square;
-	}
-.footnotes {
-	font-size: .875em;
-	}
-.read-it {
-	text-align: right;
-	margin: 0 0 .25em 0;
-	}
-.read-it a {
-	color: #ad3f4c;
-	}
-.post-info-co, 
-.page-info {
-	margin: 0;
-	background: #fff;
-	display: inline;
-	font-size: 0.875em;
-	font-style: italic;
-	padding-right: .5em;
-	}
-.post-info-co a {
-	text-decoration: none;
-	padding-right: 1em;
-	padding-left: 28px;
-	background-color: #fff;
-	background-repeat: no-repeat;
-	background-position: left center;
-	}
-.post-info-co a.comment_count {
-	background-image: url(img/comment.png);
-	}
-.post-info-co a.ping_count {
-	background-image: url(img/ping.png);
-	}
-.post-info-co a.attach_count {
-	background-image: url(img/attach.png);	
-	}
-#attachments {
-	font-size: .875em;
-	border-bottom: 1px solid #999;
-	margin: 0 0 2em;
-	}
-#attachments h3 {
-	font-variant: small-caps;
-	font-weight: normal;
-	color: #666;
-	}
-#attachments ul {
-	list-style-type: none;
-	margin: 0 0 1em;
-	padding: 0;
-	}
-#attachments ul li {
-	padding-left: 24px;
-	background: #fff url(img/download.png) no-repeat;
-	}
-
-/* ------------------------------------------------------------
-	7. COMMENTAIRES, PINGS
-------------------------------------------------------------- */
-
-/* ------------------------------------------------------- commentaires et rétroliens */
-#comments, 
-#pings, 
-#comment-form,
-#comments-feed { 
-	color: #4c4c85;
-	font-family: "Franklin gothic medium","arial narrow","DejaVu Sans Condensed","helvetica neue",helvetica,sans-serif;
-	font-size: .875em;
-	}
-#comment-form {
-	padding: 1em;
-	background: #eef;
-	margin-top: 1em;
-	color: #333;
-	border: 1px solid #ddf;
-	}
-#pr {
-	padding: 1em;
-	border: 1px dashed #4c4c85;
-	margin-bottom: 1em;
-	}
-#comments h3, 
-#pings h3, 
-#pr h3, 
-#comment-form h3 { 
-	margin-top: 2em;
-	color: #666;
-	}
-#comment-form h3 {
-	margin-top: 0;
-	}
-#comments dl { }
-#comments dt { 
-	padding-bottom: .2em;
-	border-bottom: 1px solid #ccc;
-	margin-top: 1.5em;
-	line-height: 1.1;
-	}
-#comments dd { }
-#comments .first { }
-#comments .odd { }
-#comments .me { 
-	font-family: "Century Schoolbook", "Century Schoolbook L", Georgia, serif;
-	color: #333;
-	font-size: 1.14em;
-	}
-.comment-number {
-	font-size: 2em;
-	font-weight: normal;
-	font-style: italic;
-	text-decoration: none;
-	font-family: "Century Schoolbook", "Century Schoolbook L", Georgia, serif;
-	color: #909090;
-	}
-
-#pings dl { }
-#pings dt { 
-	border-bottom: 1px solid #ccc;
-	margin-top: 1.5em;
-	line-height: 1.1;
-	padding-bottom: .2em;
-	}
-#pings dd { }
-#pings .first { }
-#pings .odd { }
-
-#pr dl { }
-#pr dd { }
-
-/* ------------------------------------------------------- formulaire des commentaires */
-#comment-form fieldset { }
-.field { 
-	margin-bottom: 1em;
-	}
-.field label { 
-	display: block;
-	font-size: .875em;
-	color: #666;
-	text-indent: 6px;
-	}
-.field input, 
-.field textarea {
-	display: block;
-	font-size: 100%;
-	border: 1px solid #ccc;
-	text-indent: 4px;
-	background: #fff;
-	-webkit-border-radius: 3px; 
-	-moz-border-radius: 3px;
-	border-radius: 3px;
-	}
-.field textarea { 
-	font-family: sans-serif;
-	padding: .5em 1em;	
-	}
-.field input:focus, 
-.field textarea:focus {
-	background: #fff;
-	}
-#comment-form input[type=submit], 
-#comment-form input[type=reset] {
-	font-size: .875em;
-	display: inline-block;
-	text-transform: capitalize;
-	font-weight: bold;
-	text-align: center;
-	padding: .33em .66em;
-	text-shadow: 0 1px 1px rgba(0,0,0,.3);
-	-webkit-border-radius: 5px; 
-	-moz-border-radius: 5px;
-	border-radius: 5px;
-	border: solid 1px #777;
-	-webkit-box-shadow: 0 1px 2px rgba(0,0,0,.2);
-	-moz-box-shadow: 0 1px 2px rgba(0,0,0,.2);
-	box-shadow: 0 1px 2px rgba(0,0,0,.2);
-	background: rgb(119,119,119);
-	background: -moz-linear-gradient(top, rgba(119,119,119,1) 0%, rgba(85,85,85,1) 100%);
-	background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(119,119,119,1)), color-stop(100%,rgba(85,85,85,1)));
-	background: -webkit-linear-gradient(top, rgba(119,119,119,1) 0%,rgba(85,85,85,1) 100%);
-	background: -o-linear-gradient(top, rgba(119,119,119,1) 0%,rgba(85,85,85,1) 100%);
-	background: -ms-linear-gradient(top, rgba(119,119,119,1) 0%,rgba(85,85,85,1) 100%);
-	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#777777', endColorstr='#555555',GradientType=0 );
-	color: #eee;
-	}
-#comment-form input[type=submit]:hover, #comment-form input[type=submit]:focus,
-#comment-form input[type=reset]:hover, #comment-form input[type=reset]:focus {
-	background: linear-gradient(top, rgba(119,119,119,1) 0%,rgba(85,85,85,1) 100%);
-	background: rgb(85,85,85);
-	background: -moz-linear-gradient(top, rgba(85,85,85,1) 0%, rgba(119,119,119,1) 100%);
-	background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(85,85,85,1)), color-stop(100%,rgba(119,119,119,1)));
-	background: -webkit-linear-gradient(top, rgba(85,85,85,1) 0%,rgba(119,119,119,1) 100%);
-	background: -o-linear-gradient(top, rgba(85,85,85,1) 0%,rgba(119,119,119,1) 100%);
-	background: -ms-linear-gradient(top, rgba(85,85,85,1) 0%,rgba(119,119,119,1) 100%);
-	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#555555', endColorstr='#777777',GradientType=0 );
-	background: linear-gradient(top, rgba(85,85,85,1) 0%,rgba(119,119,119,1) 100%);
-	text-decoration: none;
-	}
-#c_content {
-	width: 95%;
-	padding: 4px;
-	}
-
-.form-help { 
-	margin-top: 0;
-	font-size: .875em;
-	font-style: italic;
-	}
-
-#ping-url { 
-	background: #efefef;
-	border-right: 1px solid #aaa;
-	border-bottom: 1px solid #aaa;
-	font-size: .81em;
-	padding-left: .5em;
-	}
-#comments-feed { 
-	margin-top: 2em; 
-	}
-
-/* ------------------------------------------------------------
-	8. SIDEBAR
-------------------------------------------------------------- */
-
-#sidebar {
-	font-size: 0.875em;
-	}
-#sidebar h2 {
-	font-size: 1.1em;
-	margin: 0;
-	font-weight: normal;
-	font-family: "Franklin gothic medium","arial narrow","DejaVu Sans Condensed","helvetica neue",helvetica,sans-serif;
-	color: #333;
-	}
-#sidebar h3 {
-	font-size: 1em;
-	margin-bottom: 0;
-	font-weight: normal;
-	font-family: "Franklin gothic medium","arial narrow","DejaVu Sans Condensed","helvetica neue",helvetica,sans-serif;
-	color: #333;
-	}
-#sidebar ul {
-	margin: .75em 0 .5em 4px;
-	list-style-type: none;
-	padding: 0;
-	}
-#sidebar ul li ul {
-	margin-top: .5em;
-	}
-#sidebar ul li {
-	padding-left: 16px;
-	background: transparent url(img/square.png) no-repeat 0 .5em;
-	}
-#sidebar ul li ul li {
-	background-image: url(img/square2.png);
-	}
-#sidebar ul li ul li ul li {
-	background-image: url(img/square3.png);
-	}
-#sidebar .syndicate ul li {
-	background-image: none;
-	padding-left: 0;
-}
-#blognav > div, 
-#blogextra > div {
-	background: #ededed;
-	margin-bottom: 1em;
-	padding: 4px 8px;
-	-webkit-box-shadow: 2px 2px 4px rgba(0,0,0,.2);
-	-moz-box-shadow: 2px 2px 4px rgba(0,0,0,.2);
-	-o-box-shadow: 2px 2px 4px rgba(0,0,0,.2);
-	box-shadow: 2px 2px 4px rgba(0,0,0,.2);
-	}
-	
-/* ------------------------------------------------------- recherche */
-#search p {
-	background: #fff; 
-	text-align: right;
-	border: 1px solid #ddd;
-	vertical-align: middle;
-	padding: 0;
-	}
-#search input { 
-	margin: 0;
-	border: none;
-	background: transparent;
-	height: auto;
-	line-height: 2em;
-	}
-#q {
-	float: left;
-	width: 78%;
-	font-size: 100%;
-	padding-left: 2px;
-	}
-#q:focus {
-	background: #fcfcf9;
-	}
-#search .submit {
-	background: #706F6F;
-	color: #fff;
-	vertical-align: top;
-	width: 20%;
-	font-variant: small-caps;
-	height: 2em;
-	}
-#search .submit:hover, 
-#search .submit:focus {
-	background: #333;
-	}
-	
-/* ------------------------------------------------------------
-	9. FOOTER
-------------------------------------------------------------- */
-
-#footer {
-	clear: both;
-	background: #686867;
-	color: #fff;
-	}
-#footer p {
-	padding: .66em 2em;
-	margin: 0;
-	text-align: right;
-	font-size: .875em;
-	font-family: "Franklin gothic medium","arial narrow","DejaVu Sans Condensed","helvetica neue",helvetica,sans-serif;
-	}
-#footer a {
-	color: #fff;
-	}
-#footer a:hover, 
-#footer a:focus {
-	background: #686867;
-	}
-#stickers {
-	list-style-type: none;
-	margin: 0;
-	}
-	
-/* ------------------------------------------------------------
-	10. CLASSES COMMUNES
-------------------------------------------------------------- */
-
-/* ------------------------------------------------------- RSS */
-.feed { 
-	padding-left: 20px;
-	background : transparent url(img/feed.png) no-repeat left center;
-	}
-
-/* ------------------------------------------------------- tags */	
-.dc-tags .content-inner, 
-.dc-tags .content-inner ul {
-	font-size: 1.25em;
-	margin: 0;
-	padding: 0;
-	}
-.dc-tags #content ul li, 
-.dc-tags #content ul li a, 
-#sidebar .tags ul li, 
-#sidebar .tags ul li a {
-	display : inline;
-	width : auto;
-	padding-left : 0;
-	padding-right : .5em;
-	background-color : transparent;
-	background-image: none;
-	text-decoration: none;
-	line-height : 1.5em;
-	}
-.tags ul li a:hover {
-	background-image :none;
-	}
-.dc-tags .tag0, .tags .tag0 { font-size: 85%; }
-.dc-tags .tag10, .tags .tag10 { font-size: 90%; }
-.dc-tags .tag20, .tags .tag20 { font-size: 95%; }
-.dc-tags .tag30, .tags .tag30 { font-size: 100%; }
-.dc-tags .tag40, .tags .tag40 { font-size: 105%; }
-.dc-tags .tag50, .tags .tag50 { font-size: 110%; }
-.dc-tags .tag60, .tags .tag60 { font-size: 115%; }
-.dc-tags .tag70, .tags .tag70 { font-size: 120%; }
-.dc-tags .tag80, .tags .tag80 { font-size: 125%; }
-.dc-tags .tag90, .tags .tag90 { font-size: 130%; }
-.dc-tags .tag100, .tags .tag100 { font-size: 135%; }
-
-/* ------------------------------------------------------- messages d'erreur */
-.error {
-	border : 1px solid #c44;
-	background : #df0;
-	padding : 0.5em;
-	}
-.error ul {
-	padding-left : 20px;
-	}
-.error li {
-	list-style : square;
-	}
-
-/* ------------------------------------------------------- class à dispo pour billets */
-.left { float: left; margin-right : 1em; }
-.right { float: right; margin-left : 1em; }
-.center { margin-left : auto; margin-right : auto; }
-.left-text { text-align : left; }
-.right-text { text-align : right; }
-.center-text { text-align : center; }
-.little-text { font-size : .875em;}
-.little-upper-text { font-size : .875em; text-transform : uppercase; }
-
-
-/* ------------------------------------------------------------
-	11. PAGES SPECIFIQUES
-------------------------------------------------------------- */
-
-.dc-home { }
-.dc-post { }
-.dc-category { }
-
-.dc-archive #content {
-	margin-left: 0;
-	}
-.arch-block {
-	float: left;
-	display: inline;
-	margin-right: 4em;
-	margin-bottom: 3em;
-	}
-.arch-block h3, .dc-archive #blogextra h2 {
-	font-size: 1.2em;
-	font-style: italic;
-	font-weight: normal;
-	margin-bottom: 2em;
-	}
-.arch-block ul {
-	list-style-type: none;
-	margin: 0;
-	padding: 0;
-	}
-
-.dc-archive-month h2.post-title {
-	font-size: 1.3em;
-	}
-
-.dc-tags { }
-.dc-tag { }
-.dc-404 { }
-.dc-search { }
-
-
-/* ---------------------------------------------------
-  12. ET POUR FINIR NE PAS OUBLIER LES CLEARERS
---------------------------------------------------- */
-.post, 
-.footnotes, 
-#attachments,
-.read-it, 
-.post-info-co, 
-#comments, #footer {
-	clear:both;
-	}
-
-/* ================================================ 
-	personnalisations blog chantier
-================================================ */
-.post-content img, .post-excerpt img {
-	border: 1px solid #ccc;
-	}
Index: hemes/ductile/tpl/_entry-full.html
===================================================================
--- themes/ductile/tpl/_entry-full.html	(revision 440)
+++ 	(revision )
@@ -1,50 +1,0 @@
-    <div id="p{{tpl:EntryID}}" class="post {{tpl:EntryIfOdd}} {{tpl:EntryIfFirst}} full" lang="{{tpl:EntryLang}}" xml:lang="{{tpl:EntryLang}}">
-    <!-- # New day date -->
-    <tpl:DateHeader><p class="day-date">{{tpl:EntryDate}}</p></tpl:DateHeader>
-    
-    <h2 class="post-title"><a
-    href="{{tpl:EntryURL}}">{{tpl:EntryTitle encode_html="1"}}</a></h2>
-    
-		<div class="post-attr">
-	    <p class="post-info">
-	    	<span class="post-author">{{tpl:lang By}} {{tpl:EntryAuthorLink}}, </span>
-	    	<span class="post-date">{{tpl:lang on}} {{tpl:EntryDate}}, {{tpl:EntryTime}}. </span>
-	    	<tpl:EntryIf has_category="1">
-	    		<span class="post-cat"><a href="{{tpl:EntryCategoryURL}}">{{tpl:EntryCategory encode_html="1"}}</a></span>
-	    	</tpl:EntryIf>
-	    </p>
-	    
-	    <tpl:EntryTags>
-	    <tpl:TagsHeader><p class="post-tags"></tpl:TagsHeader>
-	    <a href="{{tpl:TagURL}}">{{tpl:TagID}} </a>
-	    <tpl:TagsFooter></p></tpl:TagsFooter>
-	    </tpl:EntryTags>
-		</div>    
-
-    <!-- # --BEHAVIOR-- publicEntryBeforeContent -->
-    {{tpl:SysBehavior behavior="publicEntryBeforeContent"}}
-    
-    	<tpl:EntryIf extended="1">
-      	<div class="post-excerpt">{{tpl:EntryExcerpt}}</div>
-      </tpl:EntryIf>
-      <div class="post-content">{{tpl:EntryContent}}</div>
-
-    
-    <!-- # --BEHAVIOR-- publicEntryAfterContent -->
-    {{tpl:SysBehavior behavior="publicEntryAfterContent"}}
-    
-    <!-- # Number of comments, trackbacks and attachments -->
-    <tpl:EntryIf operator="or" show_comments="1" show_pings="1" has_attachment="1">
-      <p class="post-info-co">
-    </tpl:EntryIf>
-    <tpl:EntryIf show_comments="1">
-      <a href="{{tpl:EntryURL}}#comments" class="comment_count">{{tpl:EntryCommentCount}}</a>
-    </tpl:EntryIf>
-    <tpl:EntryIf show_pings="1">
-      <a href="{{tpl:EntryURL}}#pings" class="ping_count">{{tpl:EntryPingCount}}</a></tpl:EntryIf>
-    <tpl:EntryIf has_attachment="1">
-      <a href="{{tpl:EntryURL}}#attachments" class="attach_count">{{tpl:EntryAttachmentCount}}</a></tpl:EntryIf>
-    <tpl:EntryIf operator="or" show_comments="1" show_pings="1" has_attachment="1">
-      </p>
-    </tpl:EntryIf>
-    </div>
Index: hemes/ductile/tpl/_entry-short.html
===================================================================
--- themes/ductile/tpl/_entry-short.html	(revision 441)
+++ 	(revision )
@@ -1,60 +1,0 @@
-    <div id="p{{tpl:EntryID}}" class="post {{tpl:EntryIfOdd}} {{tpl:EntryIfFirst}} short" lang="{{tpl:EntryLang}}" xml:lang="{{tpl:EntryLang}}">
-    <!-- # New day date -->
-    <tpl:DateHeader><p class="day-date">{{tpl:EntryDate}}</p></tpl:DateHeader>
-    
-    <h2 class="post-title"><a
-    href="{{tpl:EntryURL}}">{{tpl:EntryTitle encode_html="1"}}</a></h2>
-    
-		<div class="post-attr">
-	    <p class="post-info">
-	    	<span class="post-author">{{tpl:lang By}} {{tpl:EntryAuthorLink}}, </span>
-	    	<span class="post-date">{{tpl:lang on}} {{tpl:EntryDate}}. </span>
-	    	<tpl:EntryIf has_category="1">
-	    		<span class="post-cat"><a href="{{tpl:EntryCategoryURL}}">{{tpl:EntryCategory encode_html="1"}}</a></span>
-	    	</tpl:EntryIf>
-	    </p>
-	    
-	    <tpl:EntryTags>
-	    <tpl:TagsHeader><p class="post-tags"></tpl:TagsHeader>
-	    <a href="{{tpl:TagURL}}">{{tpl:TagID}}</a>
-	    <tpl:TagsFooter></p></tpl:TagsFooter>
-	    </tpl:EntryTags>
-		</div>    
-    
-    <!-- # --BEHAVIOR-- publicEntryBeforeContent -->
-    {{tpl:SysBehavior behavior="publicEntryBeforeContent"}}
-    
-    <!-- # Entry with an excerpt -->
-    <tpl:EntryIf extended="1">
-      <div class="post-content">{{tpl:EntryExcerpt}}</div>
-      <p class="read-it"><a href="{{tpl:EntryURL}}"
-      title="{{tpl:lang Continue reading}} {{tpl:EntryTitle encode_html="1"}}">{{tpl:lang Continue
-      reading}}</a></p>
-    </tpl:EntryIf>
-    
-    <!-- # Entry without excerpt -->
-    <tpl:EntryIf extended="0">
-      <div class="post-content">{{tpl:EntryContent encode_html="1" remove_html="1" cut_string="300"}}</div>
-      <p class="read-it"><a href="{{tpl:EntryURL}}"
-      title="{{tpl:lang Continue reading}} {{tpl:EntryTitle encode_html="1"}}">{{tpl:lang Continue
-      reading}}</a></p>
-    </tpl:EntryIf>
-    
-    <!-- # --BEHAVIOR-- publicEntryAfterContent -->
-    {{tpl:SysBehavior behavior="publicEntryAfterContent"}}
-    
-    <!-- # Number of comments, trackbacks and attachments -->
-    <tpl:EntryIf operator="or" show_comments="1" show_pings="1" has_attachment="1">
-      <p class="post-info-co">
-    </tpl:EntryIf>
-    <tpl:EntryIf show_comments="1">
-      <a href="{{tpl:EntryURL}}#comments" class="comment_count">{{tpl:EntryCommentCount}}</a>
-    </tpl:EntryIf>
-    <tpl:EntryIf show_pings="1">
-      <a href="{{tpl:EntryURL}}#pings" class="ping_count">{{tpl:EntryPingCount}}</a></tpl:EntryIf>
-    <tpl:EntryIf has_attachment="1">
-      <a href="{{tpl:EntryURL}}#attachments" class="attach_count">{{tpl:EntryAttachmentCount}}</a></tpl:EntryIf>
-    <tpl:EntryIf operator="or" show_comments="1" show_pings="1" has_attachment="1">
-      </p>
-    </tpl:EntryIf>
-    </div>
Index: hemes/ductile/tpl/_entry-title.html
===================================================================
--- themes/ductile/tpl/_entry-title.html	(revision 440)
+++ 	(revision )
@@ -1,38 +1,0 @@
-    <div id="p{{tpl:EntryID}}" class="post {{tpl:EntryIfOdd}} {{tpl:EntryIfFirst}} title" lang="{{tpl:EntryLang}}" xml:lang="{{tpl:EntryLang}}">
-    <!-- # New day date -->
-    <tpl:DateHeader><p class="day-date">{{tpl:EntryDate}}</p></tpl:DateHeader>
-    
-    <h2 class="post-title"><a
-    href="{{tpl:EntryURL}}">{{tpl:EntryTitle encode_html="1"}}</a></h2>
-    
-		<div class="post-attr">
-	    <p class="post-info">
-	    	<span class="post-author">{{tpl:lang By}} {{tpl:EntryAuthorLink}}, </span>
-	    	<span class="post-date">{{tpl:lang on}} {{tpl:EntryDate}}. </span>
-	    	<tpl:EntryIf has_category="1">
-	    		<span class="post-cat"><a href="{{tpl:EntryCategoryURL}}">{{tpl:EntryCategory encode_html="1"}}</a></span>
-	    	</tpl:EntryIf>
-	    </p>
-		</div>    
-    
-    <!-- # --BEHAVIOR-- publicEntryBeforeContent -->
-    {{tpl:SysBehavior behavior="publicEntryBeforeContent"}}
-    
-    <!-- # --BEHAVIOR-- publicEntryAfterContent -->
-    {{tpl:SysBehavior behavior="publicEntryAfterContent"}}
-    
-    <!-- # Number of comments, trackbacks and attachments -->
-    <tpl:EntryIf operator="or" show_comments="1" show_pings="1" has_attachment="1">
-      <p class="post-info-co">
-    </tpl:EntryIf>
-    <tpl:EntryIf show_comments="1">
-      <a href="{{tpl:EntryURL}}#comments" class="comment_count">{{tpl:EntryCommentCount}}</a>
-    </tpl:EntryIf>
-    <tpl:EntryIf show_pings="1">
-      <a href="{{tpl:EntryURL}}#pings" class="ping_count">{{tpl:EntryPingCount}}</a></tpl:EntryIf>
-    <tpl:EntryIf has_attachment="1">
-      <a href="{{tpl:EntryURL}}#attachments" class="attach_count">{{tpl:EntryAttachmentCount}}</a></tpl:EntryIf>
-    <tpl:EntryIf operator="or" show_comments="1" show_pings="1" has_attachment="1">
-      </p>
-    </tpl:EntryIf>
-    </div>
Index: hemes/ductile/tpl/_footer.html
===================================================================
--- themes/ductile/tpl/_footer.html	(revision 440)
+++ 	(revision )
@@ -1,12 +1,0 @@
-<div id="footer">
-	{{tpl:SysBehavior behavior="publicInsideFooter"}}
-
-	<p>{{tpl:SysPoweredBy}}</p>
-</div>
-
-<!-- compat media queries -->
-<!--[if lt IE 9]>
-	<script src="http://css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.js"></script>
-<![endif]-->
-
-{{tpl:SysBehavior behavior="publicFooterContent"}}
Index: hemes/ductile/tpl/_head.html
===================================================================
--- themes/ductile/tpl/_head.html	(revision 440)
+++ 	(revision )
@@ -1,15 +1,0 @@
-<!-- media queries -->
-	<meta name="viewport" content="width=device-width" />
-
-<style type="text/css" media="screen">
-@import url({{tpl:BlogThemeURL}}/style.css);
-</style>
-<style type="text/css" media="print">
-@import url({{tpl:BlogThemeURL}}/../default/print.css);
-</style>
-
-<script type="text/javascript" src="{{tpl:BlogThemeURL}}/../default/js/jquery.js"></script>
-<script type="text/javascript" src="{{tpl:BlogThemeURL}}/../default/js/jquery.cookie.js"></script>
-
-{{tpl:include src="user_head.html"}}
-{{tpl:SysBehavior behavior="publicHeadContent"}}
Index: hemes/ductile/tpl/_pagination.html
===================================================================
--- themes/ductile/tpl/_pagination.html	(revision 459)
+++ 	(revision )
@@ -1,14 +1,0 @@
-<tpl:Pagination>
-	<p class="pagination">
-		<tpl:PaginationIf end="0">
-			<a href="{{tpl:PaginationURL offset="+1"}}" class="prev">&#171;
-			{{tpl:lang previous entries}}</a> - 
-		</tpl:PaginationIf>
-
-		{{tpl:lang page}} {{tpl:PaginationCurrent}} {{tpl:lang of}} {{tpl:PaginationCounter}}
-
-		<tpl:PaginationIf start="0"> - <a href="{{tpl:PaginationURL offset="-1"}}" class="next">
-			{{tpl:lang next entries}} &#187;</a>
-		</tpl:PaginationIf>
-	</p>
-</tpl:Pagination>
Index: hemes/ductile/tpl/_sidebar.html
===================================================================
--- themes/ductile/tpl/_sidebar.html	(revision 436)
+++ 	(revision )
@@ -1,10 +1,0 @@
-<div id="sidebar">
-
-  <div id="blognav">
-    {{tpl:Widgets type="nav"}}
-  </div> <!-- End #blognav -->
-  
-  <div id="blogextra">
-    {{tpl:Widgets type="extra"}}
-  </div> <!-- End #blogextra -->
-</div>
Index: hemes/ductile/tpl/_top.html
===================================================================
--- themes/ductile/tpl/_top.html	(revision 436)
+++ 	(revision )
@@ -1,27 +1,0 @@
-<div id="header">
-
-	<ul id="prelude" class="nomobile">
-		<li><a href="#main">{{tpl:lang To content}}</a></li>
-		<li><a href="#blognav">{{tpl:lang To menu}}</a></li>
-		<li><a href="#search">{{tpl:lang To search}}</a></li>
-	</ul>
-
-	<div id="top">
-  	<h1><span><a href="{{tpl:BlogURL}}">{{tpl:BlogName encode_html="1"}}</a></span></h1>
-		<p id="blogdesc" class="nomobile">{{tpl:BlogDescription}}</p>
-	</div>
-
-	<!-- # --BEHAVIOR-- publicTopAfterContent -->
-	{{tpl:SysBehavior behavior="publicTopAfterContent"}}
-
-	<!-- Pour Franck: 
-	Ajouter un id incrémental
-	Par défaut : accueil, archives (rien dans le span)
-	-->
-	<ul id="supranav">
-		<li id="li1" class="active"><a href="{{tpl:BlogURL}}">Accueil<span class="nomobile"> articles récents</span></a></li>
-		<li id="li2"><a href="#">Construire un thème<span class="nomobile"> tutoriels</span></a></li>
-		<li id="li3"><a href="#">Maquettes<span class="nomobile"> projets graphiques</span></a></li>
-		<li id="li4"><a href="{{tpl:BlogURL}}archive">Archives<span class="nomobile"> 2005-2011</span></a></li>
-	</ul>
-</div>
Index: hemes/ductile/tpl/archive.html
===================================================================
--- themes/ductile/tpl/archive.html	(revision 470)
+++ 	(revision )
@@ -1,117 +1,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{{tpl:BlogLanguage}}" lang="{{tpl:BlogLanguage}}">
-<head>
-  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-  <meta name="ROBOTS" content="{{tpl:BlogMetaRobots}}" />
-  
-  <title>{{tpl:lang Archives}} - {{tpl:BlogName encode_html="1"}}</title>
-  <meta name="copyright" content="{{tpl:BlogCopyrightNotice encode_html="1"}}" />
-  <meta name="author" content="{{tpl:BlogEditor encode_html="1"}}" />
-  <meta name="date" scheme="W3CDTF" content="{{tpl:BlogUpdateDate iso8601="1"}}" />
-  
-  <link rel="schema.dc" href="http://purl.org/dc/elements/1.1/" />
-  <meta name="dc.title" lang="{{tpl:BlogLanguage}}" content="{{tpl:lang Archives}} - {{tpl:BlogName encode_html="1"}}" />
-  <meta name="dc.language" content="{{tpl:BlogLanguage}}" />
-  <meta name="dc.publisher" content="{{tpl:BlogEditor encode_html="1"}}" />
-  <meta name="dc.rights" content="{{tpl:BlogCopyrightNotice encode_html="1"}}" />
-  <meta name="dc.date" scheme="W3CDTF" content="{{tpl:BlogUpdateDate iso8601="1"}}" />
-  <meta name="dc.type" content="text" />
-  <meta name="dc.format" content="text/html" />
-  
-  <link rel="top" href="{{tpl:BlogURL}}" title="{{tpl:lang Home}}" />
-  
-  <tpl:Archives>
-    <link rel="chapter" href="{{tpl:ArchiveURL}}" title="{{tpl:ArchiveDate encode_html="1"}}" />
-  </tpl:Archives>
-  
-  <link rel="contents" title="{{tpl:lang Archives}}" href="{{tpl:BlogArchiveURL}}" />
-  <tpl:Categories>
-  <link rel="section" href="{{tpl:CategoryURL}}" title="{{tpl:CategoryTitle encode_html="1"}}" />
-  </tpl:Categories>
-  <link rel="alternate" type="application/atom+xml" title="Atom 1.0" href="{{tpl:BlogFeedURL type="atom"}}" />
-  
-  {{tpl:include src="_head.html"}}
-</head>
-
-<body class="dc-archive">
-<div id="page">
-{{tpl:include src="_top.html"}}
-
-<div id="wrapper">
-
-<div id="main">
-  <div id="content">
-  
-  <div id="content-info">
-    <h2>{{tpl:lang Archives}}</h2>
-  </div>
-  
-  <div class="content-inner">
-
-		<div id="by-date" class="arch-block"> <!-- by date -->
-			<h3>{{tpl:lang By date}}</h3>
-	  	<tpl:Archives>
-		    <tpl:ArchivesYearHeader>
-		    	<div>
-		      <h4>{{tpl:ArchiveDate format="%Y"}}</h4>
-		      <ul>
-			    </tpl:ArchivesYearHeader>
-			      <li><a href="{{tpl:ArchiveURL}}"
-			      title="{{tpl:ArchiveDate encode_html="1"}}">{{tpl:ArchiveDate encode_html="1" format="%B"}}</a>
-			      ({{tpl:ArchiveEntriesCount}})</li>
-			    <tpl:ArchivesYearFooter>
-		      </ul>
-		      </div>
-		    </tpl:ArchivesYearFooter>
-	  	</tpl:Archives>
-	  </div>
-	
-		<div id="by-cat" class="arch-block"> <!-- by cat -->
-			<h3>{{tpl:lang By category}}</h3>
-			<tpl:Widget id="categories">
-				<setting name="title"></setting>
-			</tpl:Widget>
-		</div>
-	
-		<div id="by-tag" class="arch-block"> <!-- by tag -->
-			<h3>{{tpl:lang By tag}}</h3>
-			<ul>
-				<tpl:MetaData type="tag">
-					<li><a href="{{tpl:MetaURL}}" class="tag{{tpl:MetaRoundPercent}}">{{tpl:MetaID}}</a></li>
-				</tpl:MetaData>
-			</ul>	
-		</div>
-	
-		<div id="aside" class="arch-block"> <!-- others -->
-			<h3>{{tpl:lang Pages}}</h3>
-			<tpl:Widget id="pages">
-					<setting name="title"></setting>
-					<setting name="homeonly">0</setting>
-				</tpl:Widget>
-		</div>
-				
-  </div> <!-- End .content-inner -->
-  
-  </div> <!-- End #main -->
-</div> <!-- End #main -->
-
-<div id="sidebar">
-  <div id="blognav">
-		<tpl:Widget id="search">
-		</tpl:Widget>
-  </div> <!-- End #blognav -->
-
-  <div id="blogextra">
-		<tpl:Widget id="bestof">
-			<setting name="homeonly">0</setting>
-		</tpl:Widget>
-  </div> <!-- End #blogextra -->
-</div>
-
-</div> <!-- End #wrapper -->
-
-{{tpl:include src="_footer.html"}}
-</div> <!-- End #page -->
-</body>
-</html>
Index: hemes/ductile/tpl/archive_month.html
===================================================================
--- themes/ductile/tpl/archive_month.html	(revision 470)
+++ 	(revision )
@@ -1,80 +1,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{{tpl:BlogLanguage}}" lang="{{tpl:BlogLanguage}}">
-<head>
-  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-  <meta name="ROBOTS" content="{{tpl:BlogMetaRobots robots="NOINDEX"}}" />
-  
-  <title>{{tpl:lang Archives}} - {{tpl:ArchiveDate}} - {{tpl:BlogName encode_html="1"}}</title>
-  <meta name="copyright" content="{{tpl:BlogCopyrightNotice encode_html="1"}}" />
-  <meta name="author" content="{{tpl:BlogEditor encode_html="1"}}" />
-  <meta name="date" scheme="W3CDTF" content="{{tpl:BlogUpdateDate iso8601="1"}}" />
-  
-  <link rel="schema.dc" href="http://purl.org/dc/elements/1.1/" />
-  <meta name="dc.title" lang="{{tpl:BlogLanguage}}" content="{{tpl:lang Archives}} - {{tpl:ArchiveDate}} - {{tpl:BlogName encode_html="1"}}" />
-  <meta name="dc.language" content="{{tpl:BlogLanguage}}" />
-  <meta name="dc.publisher" content="{{tpl:BlogEditor encode_html="1"}}" />
-  <meta name="dc.rights" content="{{tpl:BlogCopyrightNotice encode_html="1"}}" />
-  <meta name="dc.date" scheme="W3CDTF" content="{{tpl:BlogUpdateDate iso8601="1"}}" />
-  <meta name="dc.type" content="text" />
-  <meta name="dc.format" content="text/html" />
-  
-  <link rel="top" href="{{tpl:BlogURL}}" title="{{tpl:lang Home}}" />
-  <link rel="up" href="{{tpl:BlogArchiveURL}}" title="{{tpl:lang Archives}}" />
-  <link rel="contents" href="{{tpl:BlogArchiveURL}}" title="{{tpl:lang Archives}}" />
-  
-  
-  <tpl:ArchiveNext><link rel="next" href="{{tpl:ArchiveURL}}"
-  title="{{tpl:ArchiveDate encode_html="1"}}" /></tpl:ArchiveNext>
-  <tpl:ArchivePrevious><link rel="prev" href="{{tpl:ArchiveURL}}"
-  title="{{tpl:ArchiveDate encode_html="1"}}" /></tpl:ArchivePrevious>
-  
-  <tpl:Entries no_content="1">
-  <link rel="chapter" href="{{tpl:EntryURL}}" title="{{tpl:EntryTitle encode_html="1"}}" />
-  </tpl:Entries>
-  
-  {{tpl:include src="_head.html"}}
-</head>
-
-<body class="dc-archive-month">
-<div id="page">
-{{tpl:include src="_top.html"}}
-
-<div id="wrapper">
-
-<div id="main">
-  <div id="content">
-  
-	  <p class="navlinks">
-		  <tpl:ArchivePrevious><a href="{{tpl:ArchiveURL}}" class="prev">&#171; {{tpl:ArchiveDate encode_html="1"}}</a> - </tpl:ArchivePrevious>
-		  {{tpl:ArchiveDate}}
-		  <tpl:ArchiveNext> - <a href="{{tpl:ArchiveURL}}" class="next">{{tpl:ArchiveDate encode_html="1"}} &#187;</a></tpl:ArchiveNext>
-	  </p>
-  
-	  <div id="content-info">
-	    <h2>{{tpl:ArchiveDate}} <span>({{tpl:ArchiveEntriesCount}})</span></h2>
-	  </div>
-  
-	  <div class="content-inner">
-	  	<tpl:Entries no_content="1">
-				{{tpl:include src="_entry-title.html"}}
-		  </tpl:Entries>
-	  </div>
-
-	  <p class="navlinks">
-		  <tpl:ArchivePrevious><a href="{{tpl:ArchiveURL}}" class="prev">&#171; {{tpl:ArchiveDate encode_html="1"}}</a> - </tpl:ArchivePrevious>
-		  {{tpl:ArchiveDate}}
-		  <tpl:ArchiveNext> - <a href="{{tpl:ArchiveURL}}" class="next">{{tpl:ArchiveDate encode_html="1"}} &#187;</a></tpl:ArchiveNext>
-	  </p>
-  
-  </div>
-</div> <!-- End #main -->
-
-{{tpl:include src="_sidebar.html"}}
-
-</div> <!-- End #wrapper -->
-
-{{tpl:include src="_footer.html"}}
-</div> <!-- End #page -->
-</body>
-</html>
Index: hemes/ductile/tpl/home.html
===================================================================
--- themes/ductile/tpl/home.html	(revision 470)
+++ 	(revision )
@@ -1,96 +1,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{{tpl:BlogLanguage}}" lang="{{tpl:BlogLanguage}}">
-<head>
-  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-  <meta name="ROBOTS" content="{{tpl:BlogMetaRobots}}" />
-  
-  <title>{{tpl:BlogName encode_html="1"}}<tpl:PaginationIf start="0"> - {{tpl:lang page}} {{tpl:PaginationCurrent}}</tpl:PaginationIf></title>
-  <meta name="description" lang="{{tpl:BlogLanguage}}" content="{{tpl:BlogDescription cut_string="180" encode_html="1"}}<tpl:PaginationIf start="0"> - {{tpl:lang page}} {{tpl:PaginationCurrent}}</tpl:PaginationIf>" />
-  <meta name="copyright" content="{{tpl:BlogCopyrightNotice encode_html="1"}}" />
-  <meta name="author" content="{{tpl:BlogEditor encode_html="1"}}" />
-  <meta name="date" scheme="W3CDTF" content="{{tpl:BlogUpdateDate iso8601="1"}}" />
-  
-  <link rel="schema.dc" href="http://purl.org/dc/elements/1.1/" />
-  <meta name="dc.title" lang="{{tpl:BlogLanguage}}" content="{{tpl:BlogName encode_html="1"}}<tpl:PaginationIf start="0"> - {{tpl:lang page}} {{tpl:PaginationCurrent}}</tpl:PaginationIf>" />
-  <meta name="dc.description" lang="{{tpl:BlogLanguage}}" content="{{tpl:BlogDescription encode_html="1"}}" />
-  <meta name="dc.language" content="{{tpl:BlogLanguage}}" />
-  <meta name="dc.publisher" content="{{tpl:BlogEditor encode_html="1"}}" />
-  <meta name="dc.rights" content="{{tpl:BlogCopyrightNotice encode_html="1"}}" />
-  <meta name="dc.date" scheme="W3CDTF" content="{{tpl:BlogUpdateDate iso8601="1"}}" />
-  <meta name="dc.type" content="text" />
-  <meta name="dc.format" content="text/html" />
-  
-  <link rel="contents" title="{{tpl:lang Archives}}" href="{{tpl:BlogArchiveURL}}" />
-  <tpl:Categories>
-  <link rel="section" href="{{tpl:CategoryURL}}" title="{{tpl:CategoryTitle encode_html="1"}}" />
-  </tpl:Categories>
-  
-  <tpl:Entries no_content="1">
-    <tpl:EntriesHeader>
-      <tpl:Pagination>
-        <tpl:PaginationIf end="0">
-        <link rel="prev" title="{{tpl:lang previous entries}}" href="{{tpl:PaginationURL offset="1"}}" />
-        </tpl:PaginationIf>
-        
-        <tpl:PaginationIf start="0">
-        <link rel="next" title="{{tpl:lang next entries}}" href="{{tpl:PaginationURL offset="-1"}}" />
-        </tpl:PaginationIf>
-      </tpl:Pagination>
-    </tpl:EntriesHeader>
-    
-    <link rel="chapter" href="{{tpl:EntryURL}}" title="{{tpl:EntryTitle encode_html="1"}}" />
-  </tpl:Entries>
-  
-  <link rel="alternate" type="application/atom+xml" title="Atom 1.0" href="{{tpl:BlogFeedURL type="atom"}}" />
-  <link rel="EditURI" type="application/rsd+xml" title="RSD" href="{{tpl:BlogRSDURL}}" />
-  <link rel="meta" type="application/xbel+xml" title="Blogroll" href="{{tpl:BlogrollXbelLink}}" />
-  
-  {{tpl:include src="_head.html"}}
-</head>
-
-<body class="dc-home">
-<div id="page">
-{{tpl:include src="_top.html"}}
-
-<div id="wrapper">
-
-<div id="main">
-  <div id="content">
-
-  <tpl:Entries>
-
-		<!-- First page -->
-		<tpl:SysIf current_mode="default">
-			<tpl:LoopPosition start="1" length="1">
-	  		{{tpl:include src="_entry-full.html"}}
-	  	</tpl:LoopPosition>
-	
-			<tpl:LoopPosition start="2">
-	  		{{tpl:include src="_entry-short.html"}}
-	  	</tpl:LoopPosition>
-  	</tpl:SysIf>
-  	
-		<!-- Next pages -->
-		<tpl:SysIf current_mode="!default">
-  		{{tpl:include src="_entry-short.html"}}
-  	</tpl:SysIf>  	
-    
-		<!-- Pagination -->
-    <tpl:EntriesFooter>
-			{{tpl:include src="_pagination.html"}}
-    </tpl:EntriesFooter>
-
-  </tpl:Entries>
-
-  </div> <!-- End #content -->
-</div> <!-- End #main -->
-
-{{tpl:include src="_sidebar.html"}}
-
-</div> <!-- End #wrapper -->
-
-{{tpl:include src="_footer.html"}}
-</div> <!-- End #page -->
-</body>
-</html>
