Discuz6.1论坛,主题列表显示作者小头像

Discuz6.1论坛,主题列表显示作者小头像 

eg.gif

打开 templates/default 目录下的模板文件 forumdisplay.htm 找到

 

PHP代码
  1. <td class="author">  
  2.                                         <cite>  
  3.                                         <!--{if $thread['authorid'] && $thread['author']}-->  
  4.                                                 <a href="space.php?uid=$thread[authorid]">$thread[author]</a>  
  5.                                         <!--{else}-->  
  6.                                                 <!--{if $forum['ismoderator']}-->  
  7.                                                         <a href="space.php?uid=$thread[authorid]">{lang anonymous}</a>  
  8.                                                 <!--{else}-->  
  9.                                                         {lang anonymous}  
  10.                                                 <!--{/if}-->  
  11.                                         <!--{/if}-->  
  12.                                         </cite>  
  13.                                         <em>$thread[dateline]</em>  
  14.                                 </td>  

我的在第278行

 

替换成

 

PHP代码
  1. <td class="author">  
  2.                                         <div style="float:left;width:26px;padding-top:4px;">  
  3.                                           <img src="http://你的UCenter地址/avatar.php?uid=$thread[authorid]&size=small" class="ava_border" width="24px" height="24px" style="border:1px solid #ccc; padding:2px; margin:0px; background-color:#fff;" />  
  4.                                           </div>  
  5.                                         <div style="float:left;padding:2px 0px 0px 4px;">  
  6.                                         <cite>  
  7.                                         <!--{if $thread['authorid'] && $thread['author']}-->  
  8.                                                 <a href="space.php?uid=$thread[authorid]">$thread[author]</a>  
  9.                                         <!--{else}-->  
  10.                                                 <!--{if $forum['ismoderator']}-->  
  11.                                                         <a href="space.php?uid=$thread[authorid]">{lang anonymous}</a>  
  12.                                                 <!--{else}-->  
  13.                                                         {lang anonymous}  
  14.                                                 <!--{/if}-->  
  15.                                         <!--{/if}-->  
  16.                                         </cite>  
  17.                                         <em>$thread[dateline]</em>  
  18.                                         </div>  
  19.                                 </td>  

 

发表评论

电子邮件地址不会被公开。 必填项已用*标注

😉😐😡😈🙂😯🙁🙄😛😳😮:mrgreen:😆💡😀👿😥😎😕