discuz怎么在帖子列表页获取到帖子内容中的所有图片的路径地址(不光是只要封面图哟)
if( $thread['attachment'] ) {
if(preg_match_all("/\[attach\](\d+)\[\/attach\]/i", $thread['message'], $matchaids)) {
$attachpids = $matchaids[1];
}
$thread['imagelist'] = C::t('forum_attachment_n')->fetch_all_by_id('tid:'$thread['tid'], 'tid', $thread['tid'], '', true);
}
加在forumdisplayphp 812行后
编辑 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>
0条评论