违法网站请勿向我司工作人员发起任何形式的人工服务请求,严禁利用鸿茂传媒技术支持服务与产品从事任何非法活动,如有发现不再提供任何技术支持。 ×

DISCUZ论坛默认模板列表页面添加用户发布头像代码

DISCUZ默认模板列表页是没有头像的,很多想要增加头像显示,但是插件是收费的,喜欢动手的小伙伴可以尝试改代码,修改前建议先备份代码,以免修改不兼容,导致无法恢复正常。

DISCUZ论坛默认模板列表页面添加用户发布头像代码

默认的列表页显示

代码如下,共两处地方,通用任何模板,大同小异,具体根据自己模板调整。

DISCUZ论坛默认模板列表页面添加用户发布头像代码

<td class="num">

<!--{if $thread['authorid'] && $thread['author']}-->

<a href="home.php?mod=space&uid=$thread[authorid]" c="1"{if $groupcolor[$thread[authorid]]} style="color: $groupcolor[$thread[authorid]];"{/if}> <img src="/uc_server/avatar.php?uid=$thread[authorid]&size=small" style="width: 40px;"><!--$thread[author]--> </a><!--{if !empty($verify[$thread['authorid']])}--> $verify[$thread[authorid]]<!--{/if}-->

<!--{else}-->

$_G[setting][anonymoustext]

<!--{/if}-->

</td>

DISCUZ论坛默认模板列表页面添加用户发布头像代码

<td>

<!--{if $thread['authorid'] && $thread['author']}-->

<a href="home.php?mod=space&uid=$thread[authorid]" c="1"{if $groupcolor[$thread[authorid]]} style="color: $groupcolor[$thread[authorid]];"{/if}> <img src="/uc_server/avatar.php?uid=$thread[authorid]&size=small" style="width: 40px;"><!--$thread[author]--> </a><!--{if !empty($verify[$thread['authorid']])}--> $verify[$thread[authorid]]<!--{/if}-->

<!--{else}-->

$_G[setting][anonymoustext]

<!--{/if}-->

</td>

添加头像后显示如下:

DISCUZ论坛默认模板列表页面添加用户发布头像代码

© 网站版权与免责声明

1、【鸿茂传媒】独立拥有本网站相关网页内所有资料的版权;

2、未经【鸿茂传媒】的明确书面许可,任何人不得对其进行复制;

3、本网站未注明【鸿茂传媒】的文章,均来源于网络,仅供大家学习与参考;

4、如有侵权/违规/不妥请联系客服QQ或邮箱删除,敬请谅解;

5、【鸿茂传媒】保留随时更正、修改、更新本声明的权利。法律申明

服务需求留言板
*紧急问题联系客服
提交
提交需求
工作日: 8:30 - 22:00  在线客服咨询

扫码咨询微信客服

鸿茂传媒企业介绍
顶部