discuz 帖子封面缩略图,封面原图的调用方法
下面是原图的调用方法,直接上代码:
<!--{eval echo $pic=DB::result_first("select attachment from ".DB::table("forum_threadimage")." where tid='$var[tid]'");$coverpath = ($value['cover'] < 0 ? $_G['setting']['ftp']['attachurl'] : $_G['setting']['attachurl']).'forum/'.$pic;}-->
<img width="280px" height="210px" src="{$coverpath}">$var[subject]</a>
直接谢在一起的代码,需要改了自己的网址(http://xxxx.com):
<!-- <img width="280px" height="210px" src="http://xxxx.com/forum/{eval echo $pic=DB::result_first("select attachment from ".DB::table("forum_threadimage")." where tid='$var[tid]'");}" title="$var[subject]">$var[subject]</a></li>-->
下面是封面缩略图的调用方法,直接上代码:
<!--{eval $covername = 'threadcover/'.substr(md5($var[tid]), 0, 2).'/'.substr(md5($var[tid]), 2, 2).'/'.$var[tid].'.jpg';$coverpath = ($value['cover'] < 0 ? $_G['setting']['ftp']['attachurl'] : $_G['setting']['attachurl']).'forum/'.$covername;}-->
<img width="280px" height="210px" src="{$coverpath}">$var[subject]</a>