打开/include/extend.func.php

把下面代码放在 extend.func.php 最后

// 获取图集图片[新增的功能]
function Getimgs($aid, $imgwith = 240, $imgheight = 285, $num = 0){ 
    global $cfg_basedir;
    global $dsql; 
    $imgurls = ''; 
$row = $dsql -> getone("Select imgurls From`dede_addonimages` where aid='$aid'"); // 
$imgurls = $row['imgurls']; 
preg_match_all("/{dede:img (.*)}(.*){\/dede:img/isU", $imgurls, $wordcount); 
$count = count($wordcount[2]); 
if ($num > $count || $num == 0){ 
    $num = $count; 
} 
for($i = 0;$i < $num;$i++){ 
    $imglist .= "" . trim($wordcount[2][$i]) . ""; 
} 
if($num>0){return $imglist;}
else{
    $row = $dsql -> getone("Select litpic From`dede_archives` where id='$aid'");
    if($row['litpic']=='')
    {
        $row['litpic'] = '/images/defaultpic.gif';
    }
    return  $row['litpic'];
} 
}

在内容页输出

//240为宽度,285为高度,1为图片数量
{dede:field.aid function='Getimgs(@me,240,285,1)'/}