Index: admin/_charte.php
===================================================================
--- admin/_charte.php	(revision 2111)
+++ admin/_charte.php	(revision 2152)
@@ -158,5 +158,5 @@
 						</div><!--
 						--><div class="two-boxes even">
-							<p><span class="step">2</span> S'il n'y a que deux boîtes, une autre class n'est pas nécessaire. S'il y en a plusieurs, il est conseillé de leur attribuer alternativement les class <code>"odd"</code> et <code>"even"</code> pour que les marges se placent correctement.</p>
+							<p><span class="step">2</span> On peut assortir une boîte des class <code>"odd"</code> (nothing left) et <code>"even"</code> pour que les marges se placent correctement.</p>
 						</div><!--
 						--><div class="two-boxes odd">
Index: admin/index.php
===================================================================
--- admin/index.php	(revision 2116)
+++ admin/index.php	(revision 2159)
@@ -228,5 +228,5 @@
 }
 
-if ($core->auth->getInfo('user_default_blog') != $core->blog->id && $core->auth->blog_count > 1) {
+if ($core->auth->getInfo('user_default_blog') != $core->blog->id && $core->auth->getBlogCount() > 1) {
 	echo
 	'<p><a href="index.php?default_blog=1" class="button">'.__('Make this blog my default blog').'</a></p>';
Index: admin/js/_plugins.js
===================================================================
--- admin/js/_plugins.js	(revision 2157)
+++ admin/js/_plugins.js	(revision 0)
@@ -1,158 +1,6 @@
-dotclear.moduleExpander = function(line) {
-        var td = line.firstChild;
-        
-        var img = document.createElement('img');
-        img.src = dotclear.img_plus_src;
-        img.alt = dotclear.img_plus_alt;
-        img.className = 'expand';
-        $(img).css('cursor','pointer');
-        img.line = line;
-        img.onclick = function() { dotclear.viewModuleContent(this,this.line); };
-        
-        td.insertBefore(img,td.firstChild);
-};
-
-dotclear.modulesExpander = function(line,lines) {
-        var td = line.firstChild;
-
-        var img = document.createElement('img');
-        img.src = dotclear.img_plus_src;
-        img.alt = dotclear.img_plus_alt;
-        img.className = 'expand';
-        $(img).css('cursor','pointer');
-        img.lines = lines;
-        img.onclick = function() { dotclear.viewModulesContent(this,this.lines); };
-
-        td.insertBefore(img,td.firstChild);
-};
-
-dotclear.viewModulesContent = function(img,lines) {
-        
-        action = 'toggle';
-
-        if (img.alt == dotclear.img_plus_alt) {
-                img.src = dotclear.img_minus_src;
-                img.alt = dotclear.img_minus_alt;
-                action = 'open';
-        } else {
-                img.src = dotclear.img_plus_src;
-                img.alt = dotclear.img_plus_alt;
-                action = 'close';
-        }
-        
-        lines.each(function() {
-                var td = this.firstChild;
-                dotclear.viewModuleContent(td.firstChild,td.firstChild.line,action);
-        });
-};
-
-dotclear.viewModuleContent = function(img,line,action) {
-
-        var action = action || 'toggle';
-		var cols = $('td',$(line)).length
-        var sp = line.id.split('_m_');
-		var listId=sp[0];
-		var moduleId= sp[1];
-
-        var tr = document.getElementById('pe'+moduleId);
-        
-		if ( !tr && ( action == 'toggle' || action == 'open' ) ) {
-                tr = document.createElement('tr');
-                tr.id = 'pe'+moduleId;
-
-                var td = document.createElement('td');
-                td.colSpan = cols;
-                td.className = 'expand';
-                tr.appendChild(td);
-                
-                img.src = dotclear.img_minus_src;
-                img.alt = dotclear.img_minus_alt;
-                
-                // Get post content
-                $.get('services.php',{f:'getModuleById', id: moduleId, list: listId},function(data) {
-                        var rsp = $(data).children('rsp')[0];
-                        
-                        if (rsp.attributes[0].value == 'ok') {
-                                var author = $(rsp).find('author').text();
-                                var details = $(rsp).find('details').text();
-                                var support = $(rsp).find('support').text();
-								var box = document.createElement('div');
-                                var dl = document.createElement('ul');
-                                dl.className = "mod-more";
-                                
-                                if (author) {
-                                        $(dl).append($('<li>'+dotclear.msg.module_author+' '+author+'</li>'));
-                                }
-                                if (details) {
-                                        var dd = '';
-                                        dd += '<a class="details" href="'+details+'">'+dotclear.msg.module_details+'</a>';
-                                        if (support) {
-                                                dd += ' - ';
-                                                dd += '<a class="support" href="'+support+'">'+dotclear.msg.module_support+'</a>';
-                                        }
-                                        $(dl).append($('<li>'+dotclear.msg.module_help+' '+dd+'</li>'));
-                                }
-
-                                $(td).append($(box).addClass('two-boxes').append(dl));
-                                
-                                var section = $(rsp).find('section').text();
-                                var tags = $(rsp).find('tags').text();
-                                
-								var boxb = document.createElement('div');
-                                var dlb = document.createElement('ul');
-                                dlb.className = "mod-more";
-                                
-                                if (section) {
-                                        $(dlb).append($('<li>'+dotclear.msg.module_section+' '+section+'</li>'));
-                                }
-                                if (tags) {
-                                        $(dlb).append($('<li>'+dotclear.msg.module_tags+' '+tags+'</li>'));
-                                }
-                                $(td).append($(boxb).addClass('two-boxes').append(dlb));
-                        } else {
-                                alert($(rsp).find('message').text());
-                        }
-                });
-                
-                $(line).addClass('expand');
-                line.parentNode.insertBefore(tr,line.nextSibling);
-        }
-        else if (tr && tr.style.display == 'none' && ( action == 'toggle' || action == 'open' ) )
-        {
-                $(tr).css('display', 'table-row');
-                $(line).addClass('expand');
-                img.src = dotclear.img_minus_src;
-                img.alt = dotclear.img_minus_alt;
-        }
-        else if (tr && tr.style.display != 'none' && ( action == 'toggle' || action == 'close' ) )
-        {
-                $(tr).css('display', 'none');
-                $(line).removeClass('expand');
-                img.src = dotclear.img_plus_src;
-                img.alt = dotclear.img_plus_alt;
-        }
-        
-        parentTable = $(line).parents('table');
-        if( parentTable.find('tr.expand').length == parentTable.find('tr.line').length ) {
-                img = parentTable.find('tr:not(.line) th:first img');
-                img.attr('src',dotclear.img_minus_src);
-                img.attr('alt',dotclear.img_minus_alt);
-        }
-        
-        if( parentTable.find('tr.expand').length == 0 ) {
-                img = parentTable.find('tr:not(.line) th:first img');
-                img.attr('src',dotclear.img_plus_src);
-                img.attr('alt',dotclear.img_plus_alt);
-        }
-        
-};
-
-
 $(function() {
-        $('table.modules.expandable tr:not(.line)').each(function() {
-                dotclear.modulesExpander(this,$('table.modules tr.line'));
-        });
-        $('table.modules.expandable tr.line').each(function() {
-                dotclear.moduleExpander(this);
-        });
+	$('table.plugins form input[type=submit][name=delete]').click(function() {
+		var p_name = $('input[name=plugin_id]',$(this).parent()).val();
+		return window.confirm(dotclear.msg.confirm_delete_plugin.replace('%s',p_name));
+	});
 });
Index: admin/js/jsToolBar/jsToolBar.wysiwyg.js
===================================================================
--- admin/js/jsToolBar/jsToolBar.wysiwyg.js	(revision 2101)
+++ admin/js/jsToolBar/jsToolBar.wysiwyg.js	(revision 2155)
@@ -89,5 +89,5 @@
 			var idoc = This.iwin.document;
 			var para = idoc.createElement('p');
-			para.appendChild(idoc.createTextNode(''));
+			para.appendChild(idoc.createElement('br'));
 			while (idoc.body.hasChildNodes()) {
 				idoc.body.removeChild(idoc.body.lastChild);
Index: admin/media.php
===================================================================
--- admin/media.php	(revision 2099)
+++ admin/media.php	(revision 2152)
@@ -409,5 +409,5 @@
 {
 	echo
-	'<div class="two-boxes fieldset">';	
+	'<div class="two-boxes fieldset even">';	
 	if ($user_ui_enhanceduploader) {
 		echo
Index: admin/plugins.php
===================================================================
--- admin/plugins.php	(revision 2158)
+++ admin/plugins.php	(revision 2007)
@@ -13,59 +13,155 @@
 require dirname(__FILE__).'/../inc/admin/prepend.php';
 
-dcPage::check('admin');
-
-# --------------------------------------------------
-# @todo Add settings to Dotclear update features
-if ($core->blog->settings->system->plugins_allow_multi_install === null) {
-	$core->blog->settings->system->put(
-		'plugins_allow_multi_install', false, 'boolean', 'Allow multi-installation for plugins', true, true
-	);
-}
-if ($core->blog->settings->system->repository_plugin_url === null) {
-	$core->blog->settings->system->put(
-		'repository_plugin_url', 'http://update.dotaddict.org/dc2/plugins.xml', 'string', 'Plugins XML feed location', true, true
-	);
-}
-# --------------------------------------------------
-
-# -- Repository helper --
-$repository = new dcRepository(
-	$core->plugins, 
-	$core->blog->settings->system->repository_plugin_url
-);
-$repository->check();
-
-# -- Page helper --
-$list = new adminModulesList(
-	$core, 
-	DC_PLUGINS_ROOT,
-	$core->blog->settings->system->plugins_allow_multi_install
-);
-
-# -- Execute actions --
-if ($core->auth->isSuperAdmin() && $list->isPathWritable()) {
-
+dcPage::checkSuper();
+
+$default_tab = !empty($_REQUEST['tab']) ? html::escapeHTML($_REQUEST['tab']) : 'plugins';
+
+$p_paths = explode(PATH_SEPARATOR, DC_PLUGINS_ROOT);
+$p_path = array_pop($p_paths);
+unset($p_paths);
+
+$is_writable = false;
+if (is_dir($p_path) && is_writeable($p_path)) {
+	$is_writable = true;
+	$p_path_pat = preg_quote($p_path,'!');
+}
+
+$plugin_id = !empty($_POST['plugin_id']) ? $_POST['plugin_id'] : null;
+
+if ($is_writable)
+{
+	# Delete plugin
+	if ($plugin_id && !empty($_POST['delete']))
+	{
+		try
+		{
+			if (empty($_POST['deactivated']))
+			{
+				if (!$core->plugins->moduleExists($plugin_id)) {
+					throw new Exception(__('No such plugin.'));
+				}
+				
+				$plugin = $core->plugins->getModules($plugin_id);
+				$plugin['id'] = $plugin_id;
+				
+				if (!preg_match('!^'.$p_path_pat.'!', $plugin['root'])) {
+					throw new Exception(__('You don\'t have permissions to delete this plugin.'));
+				}
+				
+				# --BEHAVIOR-- pluginBeforeDelete
+				$core->callBehavior('pluginsBeforeDelete', $plugin);
+				
+				$core->plugins->deleteModule($plugin_id);
+				
+				# --BEHAVIOR-- pluginAfterDelete
+				$core->callBehavior('pluginsAfterDelete', $plugin);
+			}
+			else
+			{
+				$core->plugins->deleteModule($plugin_id,true);
+			}
+			
+			http::redirect('plugins.php?removed=1');
+		}
+		catch (Exception $e)
+		{
+			$core->error->add($e->getMessage());
+		}
+	}
+	# Deactivate plugin
+	elseif ($plugin_id && !empty($_POST['deactivate']))
+	{
+		try
+		{
+			if (!$core->plugins->moduleExists($plugin_id)) {
+				throw new Exception(__('No such plugin.'));
+			}
+			
+			$plugin = $core->plugins->getModules($plugin_id);
+			$plugin['id'] = $plugin_id;
+			
+			if (!$plugin['root_writable']) {
+				throw new Exception(__('You don\'t have permissions to deactivate this plugin.'));
+			}
+			
+			# --BEHAVIOR-- pluginBeforeDeactivate
+			$core->callBehavior('pluginsBeforeDeactivate', $plugin);
+				
+			$core->plugins->deactivateModule($plugin_id);
+
+			# --BEHAVIOR-- pluginAfterDeactivate
+			$core->callBehavior('pluginsAfterDeactivate', $plugin);
+				
+			http::redirect('plugins.php');
+		}
+		catch (Exception $e)
+		{
+			$core->error->add($e->getMessage());
+		}
+	}
+	# Activate plugin
+	elseif ($plugin_id && !empty($_POST['activate']))
+	{
+		try
+		{
+			$p = $core->plugins->getDisabledModules();
+			if (!isset($p[$plugin_id])) {
+				throw new Exception(__('No such plugin.'));
+			}
+
+			# --BEHAVIOR-- pluginBeforeActivate
+			$core->callBehavior('pluginsBeforeActivate', $plugin_id);
+			
+			$core->plugins->activateModule($plugin_id);
+
+			# --BEHAVIOR-- pluginAfterActivate
+			$core->callBehavior('pluginsAfterActivate', $plugin_id);
+			
+			http::redirect('plugins.php');
+		}
+		catch (Exception $e)
+		{
+			$core->error->add($e->getMessage());
+		}
+	}
 	# Plugin upload
-	if ((!empty($_POST['upload_pkg']) && !empty($_FILES['pkg_file'])) ||
+	elseif ((!empty($_POST['upload_pkg']) && !empty($_FILES['pkg_file'])) ||
 		(!empty($_POST['fetch_pkg']) && !empty($_POST['pkg_url'])))
 	{
 		try
 		{
-			if (empty($_POST['your_pwd']) || !$core->auth->checkPassword(crypt::hmac(DC_MASTER_KEY, $_POST['your_pwd']))) {
+			if (empty($_POST['your_pwd']) || !$core->auth->checkPassword(crypt::hmac(DC_MASTER_KEY,$_POST['your_pwd']))) {
 				throw new Exception(__('Password verification failed'));
 			}
 			
-			if (!empty($_POST['upload_pkg'])) {
+			if (!empty($_POST['upload_pkg']))
+			{
 				files::uploadStatus($_FILES['pkg_file']);
 				
-				$dest = $list->getPath().'/'.$_FILES['pkg_file']['name'];
-				if (!move_uploaded_file($_FILES['pkg_file']['tmp_name'], $dest)) {
+				$dest = $p_path.'/'.$_FILES['pkg_file']['name'];
+				if (!move_uploaded_file($_FILES['pkg_file']['tmp_name'],$dest)) {
 					throw new Exception(__('Unable to move uploaded file.'));
 				}
 			}
-			else {
+			else
+			{
 				$url = urldecode($_POST['pkg_url']);
-				$dest = $list->getPath().'/'.basename($url);
-				$repository->download($url, $dest);
+				$dest = $p_path.'/'.basename($url);
+				
+				try
+				{
+					$client = netHttp::initClient($url,$path);
+					$client->setUserAgent('Dotclear - http://www.dotclear.org/');
+					$client->useGzip(false);
+					$client->setPersistReferers(false);
+					$client->setOutput($dest);
+					$client->get($path);
+				}
+				catch( Exception $e)
+				{
+					throw new Exception(__('An error occurred while downloading the file.'));
+				}
+				
+				unset($client);
 			}
 
@@ -73,39 +169,27 @@
 			$core->callBehavior('pluginsBeforeAdd', $plugin_id);
 						
-			$ret_code = $core->plugins->installPackage($dest, $core->plugins);
+			$ret_code = $core->plugins->installPackage($dest,$core->plugins);
 
 			# --BEHAVIOR-- pluginAfterAdd
 			$core->callBehavior('pluginsAfterAdd', $plugin_id);
 			
-			http::redirect('plugins.php?msg='.($ret_code == 2 ? 'update' : 'install').'#plugins');
-		}
-		catch (Exception $e) {
+			http::redirect('plugins.php?added='.$ret_code);
+		}
+		catch (Exception $e)
+		{
 			$core->error->add($e->getMessage());
-		}
-	}
-	elseif (!empty($_POST['module'])) {
-		try {
-			$list->executeAction('plugins', $core->plugins, $repository);
-		}
-		catch (Exception $e) {
-			$core->error->add($e->getMessage());
-		}
-	}
-}
-
-# -- Plugin install --
-$plugins_install = null;
-if (!$core->error->flag()) {
-	$plugins_install = $core->plugins->installModules();
-}
-
-# -- Page header --
+			$default_tab = 'addplugin';
+		}
+	}
+}
+
+# Plugin install
+$plugins_install = $core->plugins->installModules();
+
+/* DISPLAY Main page
+-------------------------------------------------------- */
 dcPage::open(__('Plugins management'),
 	dcPage::jsLoad('js/_plugins.js').
-	dcPage::jsPageTabs().
-
-	# --BEHAVIOR-- pluginsToolsHeaders
-	$core->callBehavior('pluginsToolsHeaders', $core),
-
+	dcPage::jsPageTabs($default_tab),
 	dcPage::breadcrumb(
 		array(
@@ -115,137 +199,157 @@
 );
 
-# -- Succes messages --
-if (!empty($_GET['msg'])) {
-	$list->displayMessage($_GET['msg'],__('Plugins'));
-}
-
-# -- Plugins install messages --
-if (!empty($plugins_install['success'])) {
-	echo 
-	'<div class="static-msg">'.__('Following plugins have been installed:').'<ul>';
+if (!empty($_GET['removed'])) {
+	dcPage::success(__('Plugin has been successfully deleted.'));
+}
+if (!empty($_GET['added'])) {
+	dcPage::success(($_GET['added'] == 2 ? __('Plugin has been successfully upgraded') : __('Plugin has been successfully installed.')));
+}
+
+# Plugins install messages
+if (!empty($plugins_install['success']))
+{
+	echo '<div class="static-msg">'.__('Following plugins have been installed:').'<ul>';
 	foreach ($plugins_install['success'] as $k => $v) {
-		echo 
-		'<li>'.$k.'</li>';
-	}
-	echo 
-	'</ul></div>';
-}
-if (!empty($plugins_install['failure'])) {
-	echo 
-	'<div class="error">'.__('Following plugins have not been installed:').'<ul>';
+		echo '<li>'.$k.'</li>';
+	}
+	echo '</ul></div>';
+}
+if (!empty($plugins_install['failure']))
+{
+	echo '<div class="error">'.__('Following plugins have not been installed:').'<ul>';
 	foreach ($plugins_install['failure'] as $k => $v) {
-		echo 
-		'<li>'.$k.' ('.$v.')</li>';
-	}
-	echo 
-	'</ul></div>';
-}
-
-# -- Display modules lists --
-if ($core->auth->isSuperAdmin() && $list->isPathWritable()) {
-
-	# Updated modules from repo
-	$modules = $repository->get(true);
-	if (!empty($modules)) {
-		echo 
-		'<div class="multi-part" id="update" title="'.html::escapeHTML(__('Update plugins')).'">'.
-		'<h3>'.html::escapeHTML(__('Update plugins')).'</h3>'.
-		'<p>'.sprintf(
-			__('There is one plugin to update available from %2$s.', 'There are %s plugins to update available from %s.', count($modules)),
-			count($modules),
-			'<a href="http://dotaddict.org/dc2/plugins">Dotaddict</a>'
-		).'</p>';
-
-		$list
-			->newList('plugin-update')
-			->setModules($modules)
-			->setPageTab('update')
-			->displayModulesList(
-				/*cols */		array('icon', 'name', 'version', 'current_version', 'desc'),
-				/* actions */	array('update')
-			);
-
+		echo '<li>'.$k.' ('.$v.')</li>';
+	}
+	echo '</ul></div>';
+}
+
+# List all active plugins
+echo '<p>'.__('Plugins add new functionalities to Dotclear. '.
+'Here you can activate or deactivate installed plugins.').'</p>';
+
+echo (!$core->plugins->moduleExists('daInstaller') ?
+	sprintf('<p><strong>'.__('You can find additional plugins for your blog on %s.').'</strong></p>',
+		'<a href="http://plugins.dotaddict.org/dc2/">Dotaddict</a>') :
+	sprintf('<p><strong>'.__('You can find additional plugins for your blog on %s or using the %s.').'</strong></p>',
+		'<a href="http://plugins.dotaddict.org/dc2/">Dotaddict</a>',
+		'<a href="plugin.php?p=daInstaller">'.__('DotAddict.org Installer').'</a>'));
+
+if ($is_writable) {
+	echo '<p>'.__('To install or upgrade a plugin you generally just need to upload it '.
+	'in "Install or upgrade a plugin" section.');
+} else {
+	echo '<p>'.__('To install or upgrade a plugin you just need to extract it in your plugins directory.');
+}
+echo '</p>';
+
+echo
+'<div class="multi-part" id="plugins" title="'.__('Plugins').'">';
+
+$p_available = $core->plugins->getModules();
+uasort($p_available,create_function('$a,$b','return strcasecmp($a["name"],$b["name"]);'));
+if (!empty($p_available)) 
+{
+	echo
+	'<h3>'.__('Activated plugins').'</h3>'.
+	'<div class="table-outer clear">'.
+	'<table class="plugins"><tr>'.
+	'<th>'.__('Plugin').'</th>'.
+	'<th class="nowrap">'.__('Version').'</th>'.
+	'<th class="nowrap">'.__('Details').'</th>'.
+	'<th class="nowrap">'.__('Action').'</th>'.
+	'</tr>';
+	
+	$distrib_plugins = array('aboutConfig','akismet','antispam','attachments','blogroll','blowupConfig','daInstaller',
+		'fairTrackbacks','importExport','maintenance','pages','pings','simpleMenu','tags','themeEditor','userPref','widgets');
+	$distrib_img = '<img src="images/dotclear_pw.png"'.
+		' alt="'.__('Plugin from official distribution').'" title="'.__('Plugin from official distribution').'" />';
+
+	foreach ($p_available as $k => $v)
+	{
+		$is_deletable = $is_writable && preg_match('!^'.$p_path_pat.'!',$v['root']);
+		$is_deactivable = $v['root_writable'];
+		$is_distrib = in_array($k, $distrib_plugins);
+		
 		echo
-		'</div>';
-	}
-}
-
-# List all active plugins
+		'<tr class="line wide">'.
+		'<td class="minimal nowrap"><strong>'.html::escapeHTML($k).'</strong></td>'.
+		'<td class="minimal">'.html::escapeHTML($v['version']).'</td>'.
+		'<td class="maximal'.($is_distrib ? ' distrib' : '').'"><strong>'.html::escapeHTML(__($v['name'])).'</strong> '.
+		'<br />'.html::escapeHTML(__($v['desc'])).($is_distrib ? ' '.$distrib_img : '').'</td>'.
+		'<td class="nowrap action">';
+		
+		if ($is_deletable || $is_deactivable)
+		{
+			echo
+			'<form action="plugins.php" method="post">'.
+			'<div>'.
+			$core->formNonce().
+			form::hidden(array('plugin_id'),html::escapeHTML($k)).
+			($is_deactivable ? '<input type="submit" name="deactivate" value="'.__('Deactivate').'" /> ' : '').
+			($is_deletable ? '<input type="submit" class="delete" name="delete" value="'.__('Delete').'" /> ' : '').
+			'</div>'.
+			'</form>';
+		}
+		
+		echo
+		'</td>'.
+		'</tr>';
+	}
+	echo
+	'</table></div>';
+}
+
+$p_disabled = $core->plugins->getDisabledModules();
+uksort($p_disabled,create_function('$a,$b','return strcasecmp($a,$b);'));
+if (!empty($p_disabled))
+{
+	echo
+	'<h3>'.__('Deactivated plugins').'</h3>'.
+	'<div class="clear table-outer">'.
+	'<table class="plugins"><tr>'.
+	'<th>'.__('Plugin').'</th>'.
+	'<th class="nowrap">'.__('Action').'</th>'.
+	'</tr>';
+	
+	foreach ($p_disabled as $k => $v)
+	{
+		$is_deletable = $is_writable && preg_match('!^'.$p_path_pat.'!',$v['root']);
+		$is_activable = $v['root_writable'];
+		
+		echo
+		'<tr class="line wide">'.
+		'<td class="maximal nowrap"><strong>'.html::escapeHTML($k).'</strong></td>'.
+		'<td class="nowrap action">';
+		
+		if ($is_deletable || $is_activable)
+		{
+			echo
+			'<form action="plugins.php" method="post">'.
+			'<div>'.
+			$core->formNonce().
+			form::hidden(array('plugin_id'),html::escapeHTML($k)).
+			form::hidden(array('deactivated'),1).
+			($is_activable ? '<input type="submit" name="activate" value="'.__('Activate').'" /> ' : '').
+			($is_deletable ? '<input type="submit" class="delete" name="delete" value="'.__('Delete').'" /> ' : '').
+			'</div>'.
+			'</form>';
+		}
+		
+		echo
+		'</td>'.
+		'</tr>';
+	}
+	echo
+	'</table></div>';
+}
+
+echo '</div>';
+
+# Add a new plugin
 echo
-'<div class="multi-part" id="plugins" title="'.__('Installed plugins').'">';
-
-$modules = $core->plugins->getModules();
-if (!empty($modules)) {
-
-	echo
-	'<h3>'.__('Activated plugins').'</h3>'.
-	'<p>'.__('Manage installed plugins from this list.').'</p>';
-
-	$list
-		->newList('plugin-activate')
-		->setModules($modules)
-		->setPageTab('plugins')
-		->displayModulesList(
-			/* cols */		array('expander', 'icon', 'name', 'config', 'version', 'desc', 'distrib'),
-			/* actions */	array('deactivate', 'delete')
-		);
-}
-
-# Deactivated modules
-$modules = $core->plugins->getDisabledModules();
-if (!empty($modules)) {
-
-	echo
-	'<h3>'.__('Deactivated plugins').'</h3>'.
-	'<p>'.__('Deactivated plugins are installed but not usable. You can activate them from here.').'</p>';
-
-	$list
-		->newList('plugin-deactivate')
-		->setModules($modules)
-		->setPageTab('plugins')
-		->displayModulesList(
-			/* cols */		array('icon', 'name', 'distrib'),
-			/* actions */	array('activate', 'delete')
-		);
-}
-
-echo 
-'</div>';
-
-if ($core->auth->isSuperAdmin() && $list->isPathWritable()) {
-
-	# New modules from repo
-	$search = $list->getSearchQuery();
-	$modules = $search ? $repository->search($search) : $repository->get();
-
-	echo
-	'<div class="multi-part" id="new" title="'.__('Add plugins from Dotaddict').'">'.
-	'<h3>'.__('Add plugins from Dotaddict repository').'</h3>';
-
-	$list
-		->newList('plugin-new')
-		->setModules($modules)
-		->setPageTab('new')
-		->displaySearchForm()
-		->displayNavMenu()
-		->displayModulesList(
-			/* cols */		array('expander', 'name', 'version', 'desc'),
-			/* actions */	array('install'),
-			/* nav limit */	true
-		);
-
-	echo
-	'<p class="info vertical-separator">'.sprintf(
-		__("Visit %s repository, the resources center for Dotclear."),
-		'<a href="http://dotaddict.org/dc2/plugins">Dotaddict</a>'
-		).
-	'</p>'.
-
-	'</div>';
-
-	# Add a new plugin
-	echo
-	'<div class="multi-part" id="addplugin" title="'.__('Install or upgrade manually').'">';
-
+'<div class="multi-part" id="addplugin" title="'.__('Install or upgrade a plugin').'">';
+
+if ($is_writable)
+{
 	echo '<p>'.__('You can install plugins by uploading or downloading zip files.').'</p>';
 	
@@ -253,5 +357,5 @@
 	echo
 	'<form method="post" action="plugins.php" id="uploadpkg" enctype="multipart/form-data" class="fieldset">'.
-	'<h4>'.__('Upload a zip file').'</h4>'.
+	'<h3>'.__('Upload a zip file').'</h3>'.
 	'<p class="field"><label for="pkg_file" class="classic required"><abbr title="'.__('Required field').'">*</abbr> '.__('Plugin zip file:').'</label> '.
 	'<input type="file" id="pkg_file" name="pkg_file" /></p>'.
@@ -266,5 +370,5 @@
 	echo
 	'<form method="post" action="plugins.php" id="fetchpkg" class="fieldset">'.
-	'<h4>'.__('Download a zip file').'</h4>'.
+	'<h3>'.__('Download a zip file').'</h3>'.
 	'<p class="field"><label for="pkg_url" class="classic required"><abbr title="'.__('Required field').'">*</abbr> '.__('Plugin zip file URL:').'</label> '.
 	form::field(array('pkg_url','pkg_url'),40,255).'</p>'.
@@ -274,17 +378,16 @@
 	$core->formNonce().'</p>'.
 	'</form>';
-
-	echo
-	'</div>';
-}
+}
+else
+{
+	echo
+	'<p class="static-msg">'.
+	__('To enable this function, please give write access to your plugins directory.').
+	'</p>';
+}
+echo '</div>';
 
 # --BEHAVIOR-- pluginsToolsTabs
-$core->callBehavior('pluginsToolsTabs', $core);
-
-# -- Notice for super admin --
-if ($core->auth->isSuperAdmin() && !$list->isPathWritable()) {
-	echo 
-	'<p class="warning">'.__('Some functions are disabled, please give write access to your plugins directory to enable them.').'</p>';
-}
+$core->callBehavior('pluginsToolsTabs',$core);
 
 dcPage::close();
Index: admin/preferences.php
===================================================================
--- admin/preferences.php	(revision 2021)
+++ admin/preferences.php	(revision 2152)
@@ -543,5 +543,5 @@
 echo '<h3>'.__('My dashboard').'</h3>';
 
-echo '<form action="preferences.php" method="post" id="favs-form" class="two-boxes">';
+echo '<form action="preferences.php" method="post" id="favs-form" class="two-boxes odd">';
 
 echo '<div id="my-favs" class="fieldset"><h4>'.__('My favorites').'</h4>';
Index: admin/services.php
===================================================================
--- admin/services.php	(revision 2156)
+++ admin/services.php	(revision 1699)
@@ -27,5 +27,4 @@
 $core->rest->addFunction('searchMeta',array('dcRestMethods','searchMeta'));
 $core->rest->addFunction('setSectionFold',array('dcRestMethods','setSectionFold'));
-$core->rest->addFunction('getModuleById',array('dcRestMethods','getModuleById'));
 
 $core->rest->serve();
@@ -443,57 +442,6 @@
 		return true;
 	}
-	
-	public static function getModuleById($core, $get, $post)
-	{
-		if (empty($get['id'])) {
-				throw new Exception('No module ID');
-		}
-		if (empty($get['list'])) {
-				throw new Exception('No list ID');
-		}
-
-		$id = $get['id'];
-		$list = $get['list'];
-		$module = array();
-
-		if ($list == 'plugin-activate') {
-			$modules = $core->plugins->getModules();
-			if (empty($modules) || !isset($modules[$id])) {
-				throw new Exception('Unknow module ID');
-			}
-			$module = $modules[$id];
-		}
-		elseif ($list == 'plugin-new') {
-			$repository = new dcRepository(
-				$core->plugins, 
-				$core->blog->settings->system->repository_plugin_url
-			);
-			$repository->check();
-
-			$modules = $repository->get();
-			if (empty($modules) || !isset($modules[$id])) {
-				throw new Exception('Unknow module ID');
-			}
-			$module = $modules[$id];
-		}
-		else {
-			// behavior not implemented yet
-		}
-
-		if (empty($module)) {
-				throw new Exception('Unknow module ID');
-		}
-
-		$module = adminModulesList::setModuleInfo($id, $module);
-
-		$rsp = new xmlTag('module');
-		$rsp->id = $id;
-		
-		foreach($module as $k => $v) {
-			$rsp->{$k}((string) $v);
-		}
-
-		return $rsp;
-	}
+		
+	
 }
 ?>
Index: admin/style/default.css
===================================================================
--- admin/style/default.css	(revision 2158)
+++ admin/style/default.css	(revision 2152)
@@ -149,51 +149,29 @@
 		}
 /* ------------------------------------------------- layout: optionnal one/two-boxes */
-.one-box, .two-boxes, .three-boxes, .box {
-	margin-bottom: 1em;
-	}
 .one-box {
 	text-align: justify;
 	}
+.two-boxes, .three-boxes, .box {
+	display: inline-block;
+	vertical-align: top;
+	margin: 0 1.5% 1em;
+	-moz-box-sizing: border-box; 
+	-webkit-box-sizing: border-box; 
+	box-sizing: border-box;	
+	}
 .two-boxes {
 	width: 47%;
-	display: inline-block;
-	vertical-align: top;
-	margin-right: 2%;
-	-moz-box-sizing: border-box; 
-	-webkit-box-sizing: border-box; 
-	box-sizing: border-box;
-	}
-	.two-boxes:first-child, .two-boxes.odd, .two-boxes.odd:last-child {
-		margin-right: 3%;
-		margin-left: 0;
-		}
-	.two-boxes.even:last-child, .two-boxes.even {
-		margin-left: 3%;
-		margin-right: 0;
-		}
+	}
 .three-boxes {
 	width: 30%;
-	display: inline-block;
-	vertical-align: top;
-	margin-left: 1.5%;
-	margin-right: 1.5%; 
-	-moz-box-sizing: border-box; 
-	-webkit-box-sizing: border-box; 
-	box-sizing: border-box;
-	}
-	.three-boxes:first-child, .three-boxes.first-child {
-		margin-left: 0;
-		}
-	.three-boxes:last-child, .three-boxes.last-child {
-		margin-right: 0;
-		}
-/* boîtes intérieures distribuées horizontalement */
+	}
 .box {
-	display: inline-block;
-	vertical-align: top;
-	margin-right: 3%; 
-	text-align: left;
-	}
-.box:last-child {
+	margin-left: 0;
+	margin-right: 0;
+	}
+.odd {
+	margin-left: 0;
+	}
+.even {
 	margin-right: 0;
 	}
@@ -448,4 +426,7 @@
 h1 a:link, h1 a:visited {
 	border:	none;
+	}
+.discrete a {
+	color: #333;
 	}
 /* ----------------------------------------------------------------------------
@@ -1474,8 +1455,8 @@
 		}
 		.box.small {
-			width: 300px;
+			width: 320px;
 			}
 		.box.medium {
-			width: 640px;
+			width: 660px;
 			}
 		.box.large {
@@ -1966,51 +1947,11 @@
 		}
 /* -------------------------------------------------------------------- plugins.php */
-.modules td.action, .modules td.icon {
+#plugins td.action {
 	vertical-align: middle;
 	}
-.modules td.icon img:last-child {
-	width: 16px;
-	height: 16px;
-	}
-.modules td.icon img.expand {
-	margin-bottom: 3px;
-	}
-.modules td.distrib img {
+.distrib img {
 	display: block;
 	float: right;
-	}
-.modules dt {
-	font-weight: bold;
-	}
-.modules a.details {
-	background: transparent url(search.png) no-repeat 2px 2px;
-	padding: 4px 4px 0 20px;
-	}
-.modules a.support {
-	background: transparent url(../images/page_help.png) no-repeat 2px 2px;
-	padding: 4px 4px 0 20px;
-	}
-#m_search {	
-	background: transparent url(search.png) no-repeat 4px center;
-	padding-left: 20px;
-	}
-.modules tr.expand, .modules td.expand {
-	background: #f7f7f7;
-	border-color: #bee74b;
-	}
-.modules tr.expand td:first-child {
-	font-weight: bold;
-	background: #DFE5E7;
-	}
-.modules td.expand {
-	padding: 0;
-	}
-.mod-more, .mod-more li {
-	margin: .25em 0 0 1em;
-	padding: 0;
-	list-style-type: none;
-	}
-.mod-more {
-	padding-top: .5em;
+	margin-top: -1em;
 	}
 /* ---------------------------------------------------------- post.php, page.php */
@@ -2434,4 +2375,44 @@
 	display: block;
 	}
+/* ---------------------------------------------- Couleurs ajoutées via javascript	
+/* color-picker.js */
+.color-color-picker {
+	border: 1px solid #000;
+	width: 195px;
+	background: #fff;
+	}
+/* _blog_theme.js */
+.select-button {
+	font-weight: bold;
+	}
+/* _media_item.js */
+.color-div {
+	border: 1px solid #ccc;
+	}
+/* fadings ('color' est utilisé comme variable, pas comme text color) */
+.colorBeginPassword, .colorBeginValidatorErr, .colorBeginUserMail {
+	color: #fff;
+	}
+.colorEndPassword, .colorEndError, .colorEndValidatorErr, .colorEndUserMail {
+	color: #ffbaba;
+	}
+.colorBeginMessage {
+	color: #ccc;
+	}
+.colorEndMessage, .colorBeginValidatorMsg {
+	color: #676e78;
+	}
+.colorBeginError {
+	color: #ffdec8;
+	}
+.colorBeginSuccess {
+	color: #9BCA1C;
+	}
+.colorEndSuccess {
+	color: #bee74b;
+	}
+ .colorEndValidatorMsg {
+	color: #ffcc00;
+	}
 /* ------------------------------------------------------------------------------------
 															UN POIL DE MEDIA QUERIES
@@ -2473,8 +2454,11 @@
 	#top-info-user a.active {
 		padding: 2px 8px;
+		background: #999;
+		color: #FFF;
+		border-width: 0;
+		-webkit-border-radius: 6px;
+		        border-radius: 6px;
 		} 
 	.three-boxes, .three-boxes .box,
-	.three-boxes:first-child, .three-boxes.first-child,
-	.three-boxes:last-child, .three-boxes.last-child,
 	.two-cols .col70, .two-cols .col30 {
 		width: 100%;
@@ -2497,8 +2481,5 @@
 		top: 77px;
 		}
-	.one-box, .two-boxes,
-	.one-box .box, .two-boxes .box, .two-boxes.odd, .two-boxes.even,
-	.two-boxes:first-child, .two-boxes.odd, .two-boxes.odd:last-child,
-	.two-boxes.even:last-child, .two-boxes.even,
+	.one-box, .two-boxes, .two-boxes.odd, .two-boxes.even, .box,
 	.two-cols .col {
 		width: 100%;
@@ -2533,5 +2514,5 @@
 		display: inline;
 		}
-	#content {
+	#content, .hide-mm #content {
 		margin: 0;
 		padding: 0 .5em !important;
@@ -2542,14 +2523,14 @@
 	#main #content > h2 {
 		margin: 0;
-		padding: 6px 0;
+		padding: 6px 30px 6px 0;
 		}
 	#dashboard-boxes .box.medium,
 	#dashboard-boxes .box.small,
 	#dashboard-boxes .box.large {
-		width: 90%;
+		width: 100%;
 		margin: 10px auto;
 		}
 	}
-@media screen and (max-width: 500px) {
+@media screen and (max-width: 420px) {
 	h1, h1 a {
 		padding: 0;
@@ -2559,10 +2540,10 @@
 		display: none;
 		}
+	#top-info-blog {
+		margin-bottom: .5em;
+		max-width: 75%;
+		}
 	#top-info-blog select {
 		margin-bottom: .5em;
-		margin-right: 0 !important;
-		}
-	#top-info-blog p {
-		display: block;
 		}
 	#icons p {
@@ -2573,42 +2554,2 @@
 		}
 	}
-/* ---------------------------------------------- Couleurs ajoutées via javascript	
-/* color-picker.js */
-.color-color-picker {
-	border: 1px solid #000;
-	width: 195px;
-	background: #fff;
-	}
-/* _blog_theme.js */
-.select-button {
-	font-weight: bold;
-	}
-/* _media_item.js */
-.color-div {
-	border: 1px solid #ccc;
-	}
-/* fadings ('color' est utilisé comme variable, pas comme text color) */
-.colorBeginPassword, .colorBeginValidatorErr, .colorBeginUserMail {
-	color: #fff;
-	}
-.colorEndPassword, .colorEndError, .colorEndValidatorErr, .colorEndUserMail {
-	color: #ffbaba;
-	}
-.colorBeginMessage {
-	color: #ccc;
-	}
-.colorEndMessage, .colorBeginValidatorMsg {
-	color: #676e78;
-	}
-.colorBeginError {
-	color: #ffdec8;
-	}
-.colorBeginSuccess {
-	color: #9BCA1C;
-	}
-.colorEndSuccess {
-	color: #bee74b;
-	}
- .colorEndValidatorMsg {
-	color: #ffcc00;
-	}
