Discuz主题帖子列表页怎么在帖子前面调取发帖用户头像美化
编辑 template\default\forum\forumdisplay_listhtm文件 查找:
<cite><!--{if $thread['authorid'] && $thread['author']}--><a href="homephpmod=space&uid=$thread[authorid]" c="1">$thread[author]</a>
<!--{if $verify[$thread['authorid']]}-->$verify[$thread[authorid]]<!--{/if}-->
<!--{else}--><!--{if $_G['forum']['ismoderator']}--><a href="homephpmod=space&uid=$thread[authorid]" c="1">{lang anonymous}</a><!--{else}-->{lang anonymous}<!--{/if}--><!--{/if}--></cite>
<em>$thread[dateline]</em>
修改为:
<style>tl by { width: 140px; text-align: left; }</style>
<div style="float:left;width:28px;padding-top:4px;">
<img src="http://你的网站域名/uc_server/avatarphpuid=$thread[authorid]&size=small" width="25px" height="25px" style="border:1px solid #ccc; padding:2px; margin:0px; background-color:#fff;" /></div><div style="float:left;padding:2px 0px 0px 6px;">
<cite><!--{if $thread['authorid'] && $thread['author']}-->
<a href="homephpmod=space&uid=$thread[authorid]" c="1">$thread[author]</a>
<!--{if $verify[$thread['authorid']]}-->$verify[$thread[authorid]]<!--{/if}--><!--{else}-->
<!--{if $_G['forum']['ismoderator']}--><a href="homephpmod=space&uid=$thread[authorid]" c="1">{lang anonymous}</a>
<!--{else}-->{lang anonymous}<!--{/if}--><!--{/if}--></cite>
<em>$thread[dateline]</em>
这个dz本身无法实现,必须需要二开,在模板中进行数据库查询,调用数据,三言两语是说不清的,建议去找个熟悉dz的进行二次开发
可参考dz的资料库 discuz 资料库
0条评论