// 提取图集第一张大图,为arclist用 function get_firstbigimg($arcid){ //获取图片附加表imgurls字段内容进行处理 global $dsql; $row = $dsql->GetOne("Select imgurls From dede_addonimages where aid='$arcid'"); preg_match_all("|{dede:img ddimg='(.*)' text=(.*)|Uis",$row['imgurls'],$imgurls); //获取所有图片地址 $get_firestimg = $imgurls[1][0]; // return $get_firestimg; } |
$row['first_imgurl'] = get_firstbigimg($row['id']); |
{dede:arclist row=3 orderby=pubdate typeid='17' type='image.' titlelen='60'}<div class="pic"> <a href="[field:arcurl/]" target="_blank"><img src=[field:first_imgurl/] /><br />[field:title/]</a></div>{/dede:arclist} |