打开/include/arc.searchview.class.php 文件,

在下面代码后添加代码

 else if($tagname=="pagelist") 
 { 
 $list_len = trim($ctag->GetAtt("listsize")); 
 if($list_len=="") 
 { 
 $list_len = 3; 
 } 
 $this->dtp->Assign($tagid,$this->GetPageListDM($list_len)); 
}

新增代码:

else if($tagname=="itemcount") 
{    
$list_len = trim($ctag->GetAtt("listsize"));    
if($list_len=="")    
{ 
$list_len = 3;    
}    
$this->dtp->Assign($tagid,$this->GetItemsCountDM($list_len)); 
}

在下方代码前

/** 
 *  获得当前的页面文件的url 
 * 
 * @access    public 
 * @return    string 
 */

添加:

//————   
 //搜索输出总量   
 //————   
 function GetItemsCountDM($list_len)   
 {     
 global $oldkeyword;     
 $pagenow = ($this->PageNo-1) * 10 + 1;     
 $pagenows = $this->PageNo*10;   //当结果超过限制时,重设结果页数     
 if($this->TotalResult > $this->SearchMaxRc)    
 {  
 $totalpage = ceil($this->SearchMaxRc/$this->PageSize);     
 }    
 $plist .= $this->TotalResult;     
 return $plist;   
 }

在需要调用显示搜索结果总数的地方调用如下代码

{dede:itemcount listsize=’4′/}
历史上的今天
02月
29
    抱歉,历史上的今天作者很懒,什么都没写!
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。