<var id="xvh3p"><noframes id="xvh3p"><var id="xvh3p"></var><listing id="xvh3p"><strike id="xvh3p"><listing id="xvh3p"></listing></strike></listing>
<var id="xvh3p"><strike id="xvh3p"><var id="xvh3p"></var></strike></var><th id="xvh3p"><strike id="xvh3p"><th id="xvh3p"></th></strike></th>
<span id="xvh3p"><noframes id="xvh3p"><dl id="xvh3p"></dl>
<span id="xvh3p"><noframes id="xvh3p">
<dl id="xvh3p"><noframes id="xvh3p">
<listing id="xvh3p"><noframes id="xvh3p"><listing id="xvh3p"><strike id="xvh3p"><listing id="xvh3p"></listing></strike></listing><th id="xvh3p"><strike id="xvh3p"><th id="xvh3p"></th></strike></th>
<th id="xvh3p"><strike id="xvh3p"></strike></th>
<dl id="xvh3p"><noframes id="xvh3p">
<th id="xvh3p"><noframes id="xvh3p">

观点

互联网+时代,说建站,谈运营与网络营销

织梦DedeCMS图集模型调用图集中图片总数量的方法

时间:2020-12-15

织梦的图集模型默认没有调用图集里面含有的图片总数量的标签,但是我们在建站过程中可能又需要这个功能,所以就需要再二次开发一下,增加一个调用图片数量的标签。

具体方法如下:

找到并打开include/extend.func.php文件,在最后的位置加入如下代码:

 

01 function Getimgnum($aid)
02 {
03     global $dsql;
04     $imgurls '';
05     $row =$dsql->getone( "Select imgurls From `#【分隔符】@__addonimages` where aid='$aid' ");
06     $imgurls$row['imgurls'];
07     preg_match_all("/{dede:img (.*){\/dede:img/isU",$imgurls,$wordcount);
08     $count=count($wordcount[1]);
09     return $count;
0