<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">

观点

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

DEDE 获取图集里面图片的数量

时间:2020-12-15

1.首先在目录如下图找到archive.helper.php

2.添加如下代码

/**

 *  获取图集里面图片的数量

 *

 * @param     int  $aid  图集id

 * @return    array

 */

if(! function_exists('Getimgnum')) {

function Getimgnum($aid)

 {

  global $dsql;

  $imgurls = '';

  $row =$dsql->getone( "Select imgurls From `dede_addonimages` where aid='$aid' ");  

  if($row) {

   $imgurls= $row['imgurls'];

  } else {

   return 0;

  }

  preg_match_all("/{dede:img (.*){\/dede:img/isU",$imgurls,$wordcount); 

  $count=count($wordcount[1]);

  return $count;

 }

}

3.调用时代码:

{dede:field.id function="Getimgnum(@me)"/}

0
首页
案例
关于
联系