Index: .hgignore
===================================================================
--- .hgignore	(revision 293)
+++ .hgignore	(revision 14)
@@ -2,4 +2,2 @@
 inc/config.php
 \.htaccess
-public/filters
-themes/ductile/_work
Index: .hgsubstate
===================================================================
--- .hgsubstate	(revision 295)
+++ .hgsubstate	(revision 270)
@@ -1,1 +1,1 @@
-0f6964a14ee9a85a933749fe56cb0ca294dd6597 inc/libs/clearbricks
+116601670d66e706e0759dfb3889efd4eb576f34 inc/libs/clearbricks
Index: Makefile
===================================================================
--- Makefile	(revision 285)
+++ Makefile	(revision 288)
@@ -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
Index: admin/js/_index.js
===================================================================
--- admin/js/_index.js	(revision 234)
+++ admin/js/_index.js	(revision 297)
@@ -66,4 +66,4 @@
 	$('#quick h3').toggleWithLegend($('#quick').children().not('h3'),{
 		cookie: 'dcx_quick_entry',
-	}, positionFooter);
+	});
 });
Index: admin/js/common.js
===================================================================
--- admin/js/common.js	(revision 234)
+++ admin/js/common.js	(revision 299)
@@ -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;
 		});
@@ -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: 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/prepend.php
===================================================================
--- inc/prepend.php	(revision 286)
+++ inc/prepend.php	(revision 289)
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: hemes/ductile/_define.php
===================================================================
--- themes/ductile/_define.php	(revision 273)
+++ 	(revision )
@@ -1,20 +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; }
-
-$this->registerModule(
-	/* Name */			"Ductile",
-	/* Description*/		"Chantier pour un nouveau theme",
-	/* Author */			"Dotclear Team",
-	/* Version */			'1.0'
-);
-?>
Index: hemes/ductile/layouts.css
===================================================================
--- themes/ductile/layouts.css	(revision 300)
+++ 	(revision )
@@ -1,38 +1,0 @@
-@charset "UTF-8";
-/* pour le head - a réflechir : <meta name="viewport" content="width=device-width" /> */
-
-/* petit ours */
-@media screen and (max-width:640px) {
-body {
-	padding: 0 1%;
-	}
-}
-
-/* moyen ours */
-@media screen 
-and (min-width: 641px)
-and (max-width: 960px) {
-body {
-	padding: 0 10%;
-	color: #999;
-	}
-}
-
-/* grand ours */
-@media screen 
-and (min-width: 961px)
-and (max-width: 1420px) {
-body {
-	padding: 0 15%;
-	color: red;
-	}
-}
-
-/* yeti */
-@media screen 
-and (min-width: 1421px) {
-body {
-	padding: 0 15%;
-	background: pink;
-	}
-}
Index: hemes/ductile/rebase.css
===================================================================
--- themes/ductile/rebase.css	(revision 300)
+++ 	(revision )
@@ -1,97 +1,0 @@
-@charset "UTF-8";
-html, 
-body {
-	margin: 0;
-	padding: 0 .5em;
-	font-family: Georgia, serif;
-	font-size: 100.1%;
-	line-height: 1.5;
-	color: #333;
-	background: #fff;
-	}
-div, form, fieldset {
-	margin: 0;
-	padding: 0;
-	border: none;
-	}
-h1, h2, h3, h4, h5, h6 {
-	line-height: 1.25;
-	font-weight: bold;
-	font-style: normal;
-	margin: 1em 0 .5em 0;
-	}
-h1 {
-	font-size: 2.5em;
-	margin: 0;
-	}
-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: 92%;
-	}
-blockquote, q {
-	font-family: Georgia, "Times New Roman", Times, serif;
-	font-style: italic;
-	}
-blockquote em, q em {
-	font-style: normal;
-	}
-cite {
-	font-size: .9em;
-	}
-ul, ol, dd {
-	margin: 1em 0 .5em 28px;
-	}
-code, pre {
-	font-family: "Andale mono","Courier New", Courier, mono;
-	background: #f0f0f5;
-	}
-pre {
-	margin: 1em;
-	overflow: auto;
-	padding: 1px 8px;
-	line-height: 120%;
-	}
-hr {
-	height: 1px;
-	border: 0;
-	border-top: 1px dashed #999;
-	width: 50%;
-	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 300)
+++ 	(revision )
@@ -1,15 +1,0 @@
-@charset "UTF-8";
-
-/* Ductile
-Dotclear theme
-Version de chantier
-Start: 19 mai 2011
-last change: */
-
-/* fichiers séparés à réunir plus tard
-(faudra pas oublier le print aussi)
- */
-
-@import url(rebase.css);
-@import url(colors.css);
-@import url(layouts.css);
