请选择 进入手机版 | 继续访问电脑版
 找回密码
 立即注册
腾讯爱好者 QQ首页 QQ网站建设 查看内容

discuz X2.5 主题列表显示作者头像的方法

2013-12-20 17:45|来自: 腾讯爱好者|我要投稿 |意见反馈 |查看: 7741

       为了会员的活跃性,我们很多站长喜欢把主题列表显示作者的头像,便于互动。那么这是怎么实现的呢?跟着小编来一起看看吧!

我们先看个效果图:


修改路径:template/default/forum/forumdisplay_list.htm

搜索代码:

  1. <cite>
  2. <!--{if $thread['authorid'] && $thread['author']}-->
  3. <a href="home.php?mod=space&uid=$thread[authorid]" c="1">$thread[author]</a>
  4. <!--{if !empty($verify[$thread['authorid']])}--> $verify[$thread[authorid]]<!--{/if}-->
  5.                         <!--{else}-->
  6.         $_G[setting][anonymoustext]
  7.                         <!--{/if}-->
  8.                         </cite>


替换为:


  1. <div style="float:left;width:28px;padding-top:2px;">
  2.             <img src="/uc_server/avatar.php?uid=$thread[authorid]&size=small"

  3. class="ava_border" width="25px" height="25px" style="border:1px solid #ccc; padding:2px;

  4. margin:0px; background-color:#fff;" />
  5. </div>
  6.                     <div style="float:left;padding:2px 0px 0px 6px;">
  7.        <cite>
  8.       <!--{if $thread['authorid'] && $thread['author']}-->
  9.         <a href="space.php?uid=$thread[authorid]">$thread[author]</a>
  10.        <!--{else}-->
  11.         <!--{if $forum['ismoderator']}-->
  12.          <a href="space.php?uid=$thread[authorid]">{lang anonymous}</a
  13.         <!--{else}-->
  14.         {lang anonymous}
  15.        <!--{/if}-->
  16.        <!--{/if}-->
  17.        </cite>


OK,后台更新缓存即可!


收藏 邀请

相关阅读

关于我们|联系我们|商务合作|发展历程|手机浏览|返回首页

GMT+8, 2023-9-29 05:25 , Processed in 0.042707 second(s), 18 queries .

返回顶部