Index: admin/blog_pref.php
===================================================================
--- admin/blog_pref.php	(revision 1682)
+++ admin/blog_pref.php	(revision 1636)
@@ -586,11 +586,10 @@
 			{
 				echo
-				'<div class="user-perm">'.
 				'<h4>'.sprintf($user_url_p,html::escapeHTML($k)).
 				' ('.html::escapeHTML(dcUtils::getUserCN(
 					$k, $v['name'], $v['firstname'], $v['displayname']
-				)).')</h4>'.
-				'<h5>'.__('Permissions:').'</h5>'.
-				'<ul>';
+				)).')</h4>';
+				
+				echo '<ul class="nice">';
 				if ($v['super']) {
 					echo '<li>'.__('Super administrator').'</li>';
@@ -600,11 +599,10 @@
 					}
 				}
-				echo 
-				'</ul>';
+				echo '</ul>';
 				
 				if (!$v['super'] && $core->auth->isSuperAdmin()) {
 					echo 
 					'<form action="users_actions.php" method="post">'.
-					'<p class="change-user-perm"><input type="submit" class="reset" value="'.__('Change permissions').'" />'.
+					'<p><input type="submit" value="'.__('Change permissions').'" />'.
 					form::hidden(array('redir'),'blog_pref.php?id='.$k).
 					form::hidden(array('action'),'perms').
@@ -615,11 +613,4 @@
 					'</form>';
 				}
-				echo
-				'<h5>'.__('Publications on this blog:').'</h5>'.
-				'<ul>'.
-				'<li>'.__('Blog entries:').' <a href="#">123</a></li>'.
-				'<li>'.__('Pages:').' <a href="#">2</a></li>'.
-				'</ul>';
-				echo '</div>';
 			}
 		}
Index: admin/media.php
===================================================================
--- admin/media.php	(revision 1681)
+++ admin/media.php	(revision 1678)
@@ -231,4 +231,5 @@
 $core->auth->user_prefs->addWorkspace('interface');
 $user_ui_enhanceduploader = $core->auth->user_prefs->interface->enhanceduploader;
+
 
 if (!isset($core->media)) {
@@ -342,18 +343,17 @@
 if ($core_media_writable)
 {
-	echo 
-	'<h3>'.sprintf(__('In %s:'),($d == '' ? '“'.__('Media manager').'”' : '“'.$d.'”')).'</h3>'.
-	'<div class="media-action-box">';
+	echo '<div class="two-cols">';
 	
 	if ($user_ui_enhanceduploader) {
 		echo
-		'<div class="enhanced_uploader">';
+		'<div class="col enhanced_uploader">';
 	} else {
 		echo
-		'<div>';
-	}
-
-	echo
-	'<h4>'.__('Add files').'</h4>'.
+		'<div class="col">';
+	}
+
+	echo
+	'<div class="fieldset">'.
+	'<h3>'.__('Add files').'</h3>'.
 	'<p>'.__('Please take care to publish media that you own and that are not protected by copyright.').'</p>'.
 	'<p class="max-sizer form-note info">&nbsp;'.__('Maximum file size allowed:').' '.files::size(DC_MAX_UPLOAD_SIZE).'</p>'.
@@ -391,12 +391,11 @@
 	'<p style="clear:both;">'.form::hidden(array('d'),$d).'</p>'.
 	'</form>'.
-	'</div>'.
-	'</div>';
-
-	echo
-	'<div class="media-action-box">'.
-	'<form action="'.html::escapeURL($page_url).'" method="post">'.
+	'</div></div>';
+
+	echo
+	'<div class="col">'.
+	'<form class="clear fieldset" action="'.html::escapeURL($page_url).'" method="post">'.
 	'<div id="new-dir-f">'.
-	'<h4>'.__('Create new directory').'</h4>'.
+	'<h3>'.__('New directory').'</h3>'.
 	$core->formNonce().
 	'<p><label for="newdir">'.__('Directory Name:').'</label>'.
@@ -405,17 +404,16 @@
 	form::hidden(array('d'),html::escapeHTML($d)).'</p>'.
 	'</div>'.
-	'</form>'.
-	'</div>';
-	}
+	'</form></div>';
+	
+	echo '</div>';
+}
 
 # Empty remove form (for javascript actions)
 echo
-'<form id="media-remove-hide" action="'.html::escapeURL($page_url).'" method="post" class="hidden">'.
-'<div>'.
+'<form id="media-remove-hide" action="'.html::escapeURL($page_url).'" method="post"><div class="clear">'.
 form::hidden('rmyes',1).form::hidden('d',html::escapeHTML($d)).
 form::hidden('remove','').
 $core->formNonce().
-'</div>'.
-'</form>';
+'</div></form>';
 
 # Get zip directory
@@ -424,10 +422,6 @@
 {
 	echo
-	'<div class="media-action-box">'.
-	'<h4>'.__('Backup content').'</h4>'.
-	'<p>'.__('Compress this directory with its content as a zip file and download it.').'</p>'.
-	'<p><a class="submit" href="'.html::escapeURL($page_url).'&amp;zipdl=1">'.
-	__('Download').'</a></p>'.
-	'</div>';
+	'<p class="zip-dl"><a class="submit" href="'.html::escapeURL($page_url).'&amp;zipdl=1">'.
+	__('Download this directory as a zip file').'</a></p>';
 }
 
Index: admin/style/default.css
===================================================================
--- admin/style/default.css	(revision 1681)
+++ admin/style/default.css	(revision 1678)
@@ -797,5 +797,5 @@
 	border: none;
 }
-.media-item, .media-action-box {
+.media-item {
 	position: relative;
 	border: 1px solid #ccc;
@@ -803,7 +803,9 @@
 	padding: 1em;
 	width: 300px;
+	height: 120px;
 	display: inline-block;
 	vertical-align: top;
-	min-height: 120px
+}
+div.media-list .media-item {
 }
 a.media-icon {
@@ -903,29 +905,4 @@
 	margin-left: 0;
 }
-.user-perm {
-	margin-bottom: 2em;
-	background: transparent url(user.png) no-repeat left top;
-}
-.user-perm h4, .user-perm h5, .user-perm p, .user-perm ul, .user-perm li {
-	margin: 0;
-	padding: 0;
-}
-.user-perm h4 {
-	padding-left: 24px;
-}
-.user-perm ul {
-	list-style-type: inside;
-}
-.user-perm li {
-	margin-left: 1em;
-	padding-left: 0;
-}
-p.change-user-perm {
-	margin: .33em 0;
-}
-.user-perm h5 {
-	margin:	.66em 0 0 0;
-}
-
 /* -------------------------------------------------------------------- Themes */
 #themes {
Index: inc/core/class.dc.trackback.php
===================================================================
--- inc/core/class.dc.trackback.php	(revision 1674)
+++ inc/core/class.dc.trackback.php	(revision 1684)
@@ -14,7 +14,7 @@
 /**
 @ingroup DC_CORE
-@brief Trackbacks sender and server
-
-Sends and receives trackbacks. Also handles trackbacks auto discovery.
+@brief Trackbacks/Pingbacks sender and server
+
+Sends and receives trackbacks/pingbacks. Also handles trackbacks/pingbacks auto discovery.
 */
 class dcTrackback
@@ -146,4 +146,34 @@
 	}
 	//@}
+	
+	private function addBacklink($post_id, $url, $blog_name, $title, $excerpt, &$comment)
+	{
+		if (empty($blog_name)) {
+			$blog_name = 'Anonymous blog';
+		}
+		
+		$comment =
+		"<!-- TB -->\n".
+		'<p><strong>'.($title ? $title : $blog_name)."</strong></p>\n".
+		'<p>'.$excerpt.'</p>';
+		
+		$cur = $this->core->con->openCursor($this->core->prefix.'comment');
+		$cur->comment_author = (string) $blog_name;
+		$cur->comment_site = (string) $url;
+		$cur->comment_content = (string) $comment;
+		$cur->post_id = $post_id;
+		$cur->comment_trackback = 1;
+		$cur->comment_status = $this->core->blog->settings->system->trackbacks_pub ? 1 : -1;
+		$cur->comment_ip = http::realIP();
+		
+		# --BEHAVIOR-- publicBeforeTrackbackCreate
+		$this->core->callBehavior('publicBeforeTrackbackCreate',$cur);
+		if ($cur->post_id) {
+			$comment_id = $this->core->blog->addComment($cur);
+			
+			# --BEHAVIOR-- publicAfterTrackbackCreate
+			$this->core->callBehavior('publicAfterTrackbackCreate',$cur,$comment_id);
+		}
+	}
 	
 	/// @name Receive trackbacks
@@ -216,8 +246,5 @@
 			
 			if (!$charset) {
-				$charset = mb_detect_encoding($title.' '.$excerpt.' '.$blog_name,
-				'UTF-8,ISO-8859-1,ISO-8859-2,ISO-8859-3,'.
-				'ISO-8859-4,ISO-8859-5,ISO-8859-6,ISO-8859-7,ISO-8859-8,'.
-				'ISO-8859-9,ISO-8859-10,ISO-8859-13,ISO-8859-14,ISO-8859-15');
+				$charset = self::detectCharset($title.' '.$excerpt.' '.$blog_name);
 			}
 			
@@ -246,32 +273,7 @@
 			$url = trim(html::clean($url));
 			
-			if (!$blog_name) {
-				$blog_name = 'Anonymous blog';
-			}
-			
-			$comment =
-			"<!-- TB -->\n".
-			'<p><strong>'.($title ? $title : $blog_name)."</strong></p>\n".
-			'<p>'.$excerpt.'</p>';
-			
-			$cur = $this->core->con->openCursor($this->core->prefix.'comment');
-			$cur->comment_author = (string) $blog_name;
-			$cur->comment_site = (string) $url;
-			$cur->comment_content = (string) $comment;
-			$cur->post_id = $post_id;
-			$cur->comment_trackback = 1;
-			$cur->comment_status = $this->core->blog->settings->system->trackbacks_pub ? 1 : -1;
-			$cur->comment_ip = http::realIP();
-			
 			try
 			{
-				# --BEHAVIOR-- publicBeforeTrackbackCreate
-				$this->core->callBehavior('publicBeforeTrackbackCreate',$cur);
-				if ($cur->post_id) {
-					$comment_id = $this->core->blog->addComment($cur);
-					
-					# --BEHAVIOR-- publicAfterTrackbackCreate
-					$this->core->callBehavior('publicAfterTrackbackCreate',$cur,$comment_id);
-				}
+				$this->addBacklink($post_id, $url, $blog_name, $title, $excerpt, $comment);
 			}
 			catch (Exception $e)
@@ -281,15 +283,4 @@
 			}
 		}
-		
-		
-		$debug_trace =
-		"  <debug>\n".
-		'    <title>'.$title."</title>\n".
-		'    <excerpt>'.$excerpt."</excerpt>\n".
-		'    <url>'.$url."</url>\n".
-		'    <blog_name>'.$blog_name."</blog_name>\n".
-		'    <charset>'.$charset."</charset>\n".
-		'    <comment>'.$comment."</comment>\n".
-		"  </debug>\n";
 		
 		$resp =
@@ -303,5 +294,13 @@
 		
 		if (!empty($_POST['__debug'])) {
-			$resp .= $debug_trace;
+			$resp .= 
+			"  <debug>\n".
+			'    <title>'.$title."</title>\n".
+			'    <excerpt>'.$excerpt."</excerpt>\n".
+			'    <url>'.$url."</url>\n".
+			'    <blog_name>'.$blog_name."</blog_name>\n".
+			'    <charset>'.$charset."</charset>\n".
+			'    <comment>'.$comment."</comment>\n".
+			"  </debug>\n";
 		}
 		
@@ -381,9 +380,10 @@
 			$remote_content = $http->getContent();
 
-			$charset = mb_detect_encoding($remote_content,
-				'UTF-8,ISO-8859-1,ISO-8859-2,ISO-8859-3,'.
-				'ISO-8859-4,ISO-8859-5,ISO-8859-6,ISO-8859-7,ISO-8859-8,'.
-				'ISO-8859-9,ISO-8859-10,ISO-8859-13,ISO-8859-14,ISO-8859-15');
-
+			$charset = self::getCharsetFromRequest($http->getHeader('content-type'));
+
+			if (!$charset) {
+				$charset = self::detectCharset($remote_content);
+			}
+			
 			if (strtolower($charset) != 'utf-8') {
 				$remote_content = iconv($charset,'UTF-8',$remote_content);
@@ -416,32 +416,11 @@
 			}
 			if ($excerpt) {
-				$excerpt = '(&#8230;) '.text::cutString(html::escapeHTML($excerpt),255).' (&#8230;)';
+				$excerpt = '(&#8230;) '.text::cutString(html::escapeHTML($excerpt),200).' (&#8230;)';
 			}
 			else {
-				$excerpt = '(??)';
-			}
-
-			$comment =
-			"<!-- TB -->\n".
-			'<p><strong>'.$title."</strong></p>\n".
-			'<p>'.$excerpt.'</p>';
-			
-			$cur = $this->core->con->openCursor($this->core->prefix.'comment');
-			$cur->comment_author = 'Anonymous blog';
-			$cur->comment_site = (string) $from_url;
-			$cur->comment_content = (string) $comment;
-			$cur->post_id = $posts->post_id;
-			$cur->comment_trackback = 1;
-			$cur->comment_status = $this->core->blog->settings->system->trackbacks_pub ? 1 : -1;
-			$cur->comment_ip = http::realIP();
-			
-			# --BEHAVIOR-- publicBeforeTrackbackCreate
-			$this->core->callBehavior('publicBeforeTrackbackCreate',$cur);
-			if ($cur->post_id) {
-				$comment_id = $this->core->blog->addComment($cur);
-				
-				# --BEHAVIOR-- publicAfterTrackbackCreate
-				$this->core->callBehavior('publicAfterTrackbackCreate',$cur,$comment_id);
-			}
+				$excerpt = '(&#8230;)';
+			}
+
+			$this->addBacklink($posts->post_id, $from_url, '', $title, $excerpt, $comment);
 		}
 		catch (Exception $e) {
@@ -464,9 +443,12 @@
 	}
 	
-	private static function getCharsetFromRequest()
-	{
-		if (isset($_SERVER['CONTENT_TYPE']))
-		{
-			if (preg_match('|charset=([a-zA-Z0-9-]+)|',$_SERVER['CONTENT_TYPE'],$m)) {
+	private static function getCharsetFromRequest($header = '')
+	{
+		if (!$header && isset($_SERVER['CONTENT_TYPE'])) {
+			$header = $_SERVER['CONTENT_TYPE'];
+		}
+		
+		if ($header) {
+			if (preg_match('|charset=([a-zA-Z0-9-]+)|',$header,$m)) {
 				return $m[1];
 			}
@@ -475,5 +457,13 @@
 		return null;
 	}
-	
+
+	private static function detectCharset($string)
+	{
+		return mb_detect_encoding($remote_content,
+				'UTF-8,ISO-8859-1,ISO-8859-2,ISO-8859-3,'.
+				'ISO-8859-4,ISO-8859-5,ISO-8859-6,ISO-8859-7,ISO-8859-8,'.
+				'ISO-8859-9,ISO-8859-10,ISO-8859-13,ISO-8859-14,ISO-8859-15');
+	}
+		
 	/// @name Trackbacks auto discovery
 	//@{
Index: locales/fr/main.po
===================================================================
--- locales/fr/main.po	(revision 1681)
+++ locales/fr/main.po	(revision 1678)
@@ -3286,28 +3286,4 @@
 msgstr "Modifier le %1$s de %2$s"
 
-msgid "Backup content"
-msgstr "Sauvegarder le contenu"
-
-msgid "Create new directory"
-msgstr "Créer un répertoire"
-
-msgid "In %s:"
-msgstr "Dans %s :"
-
-msgid "Download"
-msgstr "Télécharger"
-
-msgid "Compress this directory with its content as a zip file and download it."
-msgstr "Compressez ce dossier et son contenu dans un fichier zip et téléchargez-le."
-
-msgid "Permissions:"
-msgstr "Permissions :"
-
-msgid "Publications on this blog:"
-msgstr "Publications sur ce blog :"
-
-msgid "Blog entries:"
-msgstr "Billets :"
-
-msgid "Pages:"
-msgstr "Pages :"
+msgid "Backup"
+msgstr "Sauvegarde"
