//在 /include/extend.func.php次文件中添加如下函数
function Getimgnum($aid) {
global $dsql;
$imgurls = "";
$row =$dsql->getone("Select imgurls From `dede_addonimages` where aid='$aid' ");
function Getimgnum($aid) {
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);
preg_match_all("/{dede:img (.*){\/dede:img/isU",$imgurls,$wordcount);
$count=count($wordcount[1]);
return $count;
}
return $count;
}
<!--然后在模板中使用如下即可-->
<div class="num"><i>[field:id function="Getimgnum(@me)"/]</i><b>张</b></div>
本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!