最近武林網第五版正式上線了,后臺未審核的文檔很多,每次審核內容的時候都是打開 等審核的檔案 來查看未審核的內容的.
但是列表是根據發布時間進行排序的,如果想每個欄目審核幾篇文檔,就要去欄目管理處挨個打開欄目文檔列表,看看是否有未審核的內容.
感覺甚是麻煩,就自己動手修改了一下默認的 網站欄目管理 頁面,修改以后效果如下圖所示:
修改說明:
紅色部分為未審核的文檔數,后面的 圖 和 文 點擊后會在新窗口打開 該欄目的未審核文檔列表.
圖就是帶縮略圖的未審核文檔列表,文是不帶縮略圖的列表.
如果該欄目沒有未審核的文檔則是默認效果.
怎么樣?如果你也需要,那么就動手修改吧,修改方法如下:
首先打開/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).
注意有多個地方需要替換.
- $this->GetTotalArc($id).$this->GetTotalArcw($id).
新聞熱點
疑難解答