//获取头像
<?php if ($val['anonymous'] == 0) { ?>
<a data-id="<?php echo $val['user_info']['uid']; ?>" href="people/<?php echo $val['user_info']['url_token']; ?>" rel="nofollow"><img class="img" src="<?php echo get_avatar_url($val['user_info']['uid'], 'max'); ?>" alt="" width="20" /></a>
<?php } else { ?>
<a><img width="20" src="<?php echo G_STATIC_URL; ?>/common/avatar-max-img.png" alt="<?php _e('匿名用户'); ?>" title="<?php _e('匿名用户'); ?>" /></a>
<?php } ?>
//输出ID
<?php if ($val['anonymous'] == 0) { ?><a href="m/people/<?php echo $val['user_info']['url_token']; ?>"><?php echo $val['user_info']['user_name']; ?></a><?php } else { ?><a href="javascript:;"><?php _e('匿名用户'); ?></a><?php } ?> <?php _e('楼主'); ?>
<span class="pull-right color-999"><?php echo date_friendly($val['add_time'], 604800, 'Y-m-d'); ?></span>
效果如下图所示
阅读全文
收起全文