背景未稽核的文檔很多,每次稽核内容的時候都是打開 等稽核的檔案 來檢視未稽核的内容的.
但是清單是根據釋出時間進行排序的,如果想每個欄目稽核幾篇文檔,就要去欄目管理處挨個打開欄目文檔清單,看看是否有未稽核的内容.
Dede教程-598080707.NET
感覺甚是麻煩,就自己動手修改了一下預設的 網站欄目管理 頁面,修改以後效果如下圖所示:
修改說明:
紅色部分為未稽核的文檔數,後面的 圖 和 文 點選後會在新視窗打開 該欄目的未稽核文檔清單.
圖就是帶縮略圖的未稽核文檔清單,文是不帶縮略圖的清單.
如果該欄目沒有未稽核的文檔則是預設效果.
dede部落格怎麼樣?如果你也需要,那麼就動手修改吧,修改方法如下:
首先打開/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 " | <font color=red>".$totalnum."</font> | <a href='content_i_list.php?arcrank=-1&cid=".$tid."'>圖</a> | <a href='content_list.php?arcrank=-1&cid=".$tid."'>文</a>"; } |
然後找到以下代碼:
$this->GetTotalArc($id). |
替換為以下代碼:
Dede$this->GetTotalArc($id).$this->GetTotalArcw($id). |
注意:需要替換的地方不止一處,請批量替換.
好了,現在重新打開或者重新整理 網站欄目管理 頁面即可.
原文轉自:http://www.mb5u.com/cmsjiaocheng/93438.html
文章資訊:
DEDE技術吧| 分類:
| 本文位址:
http://598080707.net/1/243.html