<?php
  $author_post_count = count_user_posts( get_the_author_meta( 'ID' ) );
  $author_comment_count = $wpdb->get_var('SELECT COUNT(1) FROM ' . $wpdb->comments . ' WHERE comment_approved=1 and user_id=' . get_the_author_meta( 'ID' ));?>
<div id="article-latestArticles">
  <div class="author"><a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ) ?>"><span class="avatar before-fade-in after-fade-in" style="background-image: url(<?php echo MBT_monkey_get_avatar(get_the_author_meta( 'ID' ));?>);"></span></a>
	<div class="desc"><span class="name"><a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ) ?>"><?php echo get_the_author() ?></a></span><span class="badge"><?php echo monkey_current_user_role(get_the_author_meta( 'ID' ));?></span>
	  <div class="brief"><?php the_author_description(); ?></div>
	</div>
	<div class="article-number-infor">
		<div>
		  <div class="article-total"><span><?php echo $author_post_count;?></span>篇</div>
		  文章总数</div>
		<div>
		  <div class="read-number"><span><?php echo $author_comment_count;?></span>条</div>
		  评论总数</div>
	</div>
  </div>
  <div class="latest-articles"> <h3>最新文章 <i></i></h3>
  <?php 
		$args = array('caller_get_posts' => 1, 'showposts' => '3', 'author' => get_the_author_meta( 'ID' ), 'post_type' => 'post', 'post_status' => 'publish');
		query_posts($args);
		while (have_posts()) {
			the_post();
		?>
  <article><a class="pic" href="<?php the_permalink(); ?>" style="background-image: url(<?php echo MThemes_thumbnail(80,60); ?>)"></a><div class="desc"><a class="title" href="<?php the_permalink(); ?>" target="_blank"><?php the_title(); ?></a></div></article>
   <?php
		}wp_reset_query();
	?>
  <div class="more-article"><a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ) ?>" target="_blank">更多 &gt;</a></div></div>
</div>
