source\function\function_forum.php 中
function getthreadcover($tid, $cover = 0, $getfilename = 0) {
global $_G;
if(empty($tid)) {
return '';
}
$coverpath = '';
$covername = 'threadcover/'.substr(md5($tid), 0, 2).'/'.substr(md5($tid), 2, 2).'/'.$tid.'.jpg';
if($getfilename) {
return $covername;
}
if($cover) {
$coverpath = ($cover < 0 ? $_G['setting']['ftp']['attachurl'] : $_G['setting']['attachurl']).'forum/'.$covername;
}
return $coverpath;
}
復(fù)制代碼
生成主題封面的函數(shù)在這里