--- general-template.php        (wordpress/trunk/wp-includes/general-template.php)  (revision 6632)
+++ general-template.php        (wordpress/trunk/wp-includes/general-template.php)  (working copy)
@@ -359,7 +359,7 @@
 	$defaults = array(
 		'type' => 'monthly', 'limit' => '',
 		'format' => 'html', 'before' => '',
-		'after' => '', 'show_post_count' => false
+		'after' => '', 'show_post_count' => 0
 	);
 
 	$r = wp_parse_args( $args, $defaults );
@@ -412,8 +412,24 @@
 			foreach ( $arcresults as $arcresult ) {
 				$url	= get_month_link($arcresult->year,	$arcresult->month);
 				$text = sprintf(__('%1$s %2$d'), $wp_locale->get_month($arcresult->month), $arcresult->year);
-				if ( $show_post_count )
-					$after = '&nbsp;('.$arcresult->posts.')' . $afterafter;
+				if ( $show_post_count ) {
+					if ( $show_post_count > 1 ) {
+						$detail_counts="";
+						foreach( get_categories() as $categoria) {
+							$howmanyincat=count(query_posts("year=$arcresult->year&monthnum=$arcresult->month&category_name=$categoria->cat_name"));
+							if ($howmanyincat > 0) 
+								$detail_counts .= $howmanyincat . " " .  $categoria->cat_name . ', ';
+						}
+						$detail_counts=substr($detail_counts, 0, -2);
+					}
+					if ( $show_post_count == 1 ) {
+						$after = '&nbsp;('. $arcresult->posts . ')' . $afterafter;
+					} else if ( $show_post_count == 2 ) {
+						$after = '&nbsp;('. $detail_counts . ')' . $afterafter;
+					} else {
+						$after = '&nbsp;('.$arcresult->posts . ', ' . $detail_counts . ')' . $afterafter;
+					}
+				}
 				echo get_archives_link($url, $text, $format, $before, $after);
 			}
 		}
@@ -433,8 +449,24 @@
 			foreach ($arcresults as $arcresult) {
 				$url = get_year_link($arcresult->year);
 				$text = sprintf('%d', $arcresult->year);
-				if ($show_post_count)
-					$after = '&nbsp;('.$arcresult->posts.')' . $afterafter;
+				if ($show_post_count) {
+					if ( $show_post_count > 1 ) {
+						$detail_counts="";
+						foreach( get_categories() as $categoria) {
+							$howmanyincat=count(query_posts("year=$arcresult->year&monthnum=$arcresult->month&category_name=$categoria->cat_name"));
+							if ($howmanyincat > 0) 
+								$detail_counts .= $howmanyincat . " " .  $categoria->cat_name . ', ';
+						}
+						$detail_counts=substr($detail_counts, 0, -2);
+					}
+					if ( $show_post_count == 1 ) {
+						$after = '&nbsp;('. $arcresult->posts . ')' . $afterafter;
+					} else if ( $show_post_count == 2 ) {
+						$after = '&nbsp;('. $detail_counts . ')' . $afterafter;
+					} else {
+						$after = '&nbsp;('.$arcresult->posts . ', ' . $detail_counts . ')' . $afterafter;
+					}
+				}
 				echo get_archives_link($url, $text, $format, $before, $after);
 			}
 		}
