Discuz! x3.2 手机版调用封面图片代码
手机版列表界面调用封面
模板名称\touch\forum\forumdisplay.htm
在
<!--{loop $_G['forum_threadlist'] $key $thread}-->
.....
<!--{/loop}-->中间
需要显示的地方加入代码:
<!--{if $thread['cover']}-->
{eval $covername = 'threadcover/'.substr(md5($thread), 0, 2).'/'.substr(md5($thread), 2, 2).'/'.$thread.'.jpg';
$coverpath = ($cover < 0 ? $_G['setting']['ftp']['attachurl'] : $_G['setting']['attachurl']).'forum/'.$covername;
}
<img src="{eval echo $coverpath;}" alt="$thread" width="90px" />
<!--{/if}-->
页:
[1]