欢迎来到站长天空!

DedeCMS

当前位置: 主页 > CMS教程 > DedeCMS

织梦dedecms后台栏目怎么显示没有审核的文档数量

时间:2020-11-04 00:00:00|栏目:DedeCMS|点击:

">

在织梦的后台当中如果是没有审核的文章有很多,每次审核都要打开待审核文档,如果内容有很多,就很麻烦。

修改的方法:

打开/include/typeunit.class.admin.php文件

找到:

function ListAllType

在上面加上下面的代码:

//获取所有栏目的未审核文档ID数 
    function UpdateCatalogNumw() 
    { 
        $this->dsql->SetQuery("SELECT typeid,count(typeid) as dd FROM `dede_arctiny` where arcrank =-1 group by typeid"); 
        $this->dsql->Execute(); 
        while($row = $this->dsql->GetArray()) 
        { 
            $this->CatalogNumsw[$row['typeid']] = $row['dd']; 
        } 
    } 
    function GetTotalArcw($tid) 
    { 
        if(!is_array($this->CatalogNumsw)) 
        { 
            $this->UpdateCatalogNumw(); 
        } 
        if(!isset($this->CatalogNumsw[$tid])) 
        { 
            return ""; 
        } 
        else 
        { 
            $totalnum = 0; 
            $ids = explode(',',GetSonIds($tid)); 
            foreach($ids as $tid) 
            { 
                if(isset($this->CatalogNumsw[$tid])) 
                { 
                    $totalnum += $this->CatalogNumsw[$tid]; 
                } 
            } 
            return " | ".$totalnum." |  |
            "; 
        } 
    }

将:

$this->GetTotalArc($id).

替换为:

$this->GetTotalArc($id).$this->GetTotalArcw($id).

这里需要注意一下:有多个地方需要替换。这样就会在列表页显示出文档的数量,没有审核的文档数量就会在后面显示出来。

上一篇:DedeCMS调用栏目名称限制字数的方法

栏    目:DedeCMS

下一篇:织梦DedeCMS在{dede:channel}标签前加序列号的方法

本文标题:织梦dedecms后台栏目怎么显示没有审核的文档数量

本文地址:https://zz.feitang.co/CMSjiaocheng/27682.html

广告投放 | 联系我们 | 版权申明

申明:本站所有的文章、图片、评论等,均由网友发表或上传并维护或收集自网络,属个人行为,与本站立场无关。

如果侵犯了您的权利,请与我们联系,我们将在24小时内进行处理、任何非本站因素导致的法律后果,本站均不负任何责任。

联系QQ:257218569 | 邮箱:257218569@qq.com

Copyright © 2018-2025 站长天空 版权所有 Powered by EyouCms冀ICP备14023439号