一个资源分享、信息整合的综合性站点。

标题: 织梦后台栏目怎么显示没有审核的文档数量 [打印本页]

作者: 树苗收集系    时间: 2020-9-16 11:55
标题: 织梦后台栏目怎么显示没有审核的文档数量
在织梦的后台当中如果是没有审核的文章有很多,每次审核都要打开待审核文档,如果内容有很多,就很麻烦。

修改的方法:

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

找到:
  1. function ListAllType
复制代码

在上面加上下面的代码:


  1. <span style="background-color: rgb(255, 255, 255);">/</span>/获取所有栏目的未审核文档ID数
  2.     function UpdateCatalogNumw()
  3.     {
  4.         $this->dsql->SetQuery("SELECT typeid,count(typeid) as dd FROM `dede_arctiny` where arcrank =-1 group by typeid");
  5.         $this->dsql->Execute();
  6.         while($row = $this->dsql->GetArray())
  7.         {
  8.             $this->CatalogNumsw[$row['typeid']] = $row['dd'];
  9.         }
  10.     }
  11.     function GetTotalArcw($tid)
  12.     {
  13.         if(!is_array($this->CatalogNumsw))
  14.         {
  15.             $this->UpdateCatalogNumw();
  16.         }
  17.         if(!isset($this->CatalogNumsw[$tid]))
  18.         {
  19.             return "";
  20.         }
  21.         else
  22.         {
  23.             $totalnum = 0;
  24.             $ids = explode(',',GetSonIds($tid));
  25.             foreach($ids as $tid)
  26.             {
  27.                 if(isset($this->CatalogNumsw[$tid]))
  28.                 {
  29.                     $totalnum += $this->CatalogNumsw[$tid];
  30.                 }
  31.             }
  32.             return " | <font color=red>".$totalnum."</font> | <a href='content_i_list.php?arcrank=-1&cid=".$tid."'>图</a> |
  33.             <a href='content_list.php?arcrank=-1&cid=".$tid."'>文</a>";
  34.         }
  35.     }
复制代码

将:
  1. $this->GetTotalArc($id).
复制代码

替换为:
  1. $this->GetTotalArc($id).$this->GetTotalArcw($id).
复制代码

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


作者: 青栀琉璃裙    时间: 2020-9-24 10:12
感觉不错
作者: 没有糖吃的孩子    时间: 2020-10-8 20:37
谢谢楼主,,,收藏ing




欢迎光临 一个资源分享、信息整合的综合性站点。 (http://www.sorv.cn/) Powered by Discuz! X3.4