dedecms隱藏進階搜尋中的隱藏欄目的方法

來源:互聯網
上載者:User

標籤:

今天發現,禁止搜尋隱藏欄目內容後,發現,進階搜尋裡仍有隱藏欄目版塊,經測試,找到解決辦法如下:
一、找到並開啟heightsearch.htm模板(templates\plus\下),在第34行,找到$typeOptions = $tl->GetOptionArray(0,0,0);將其改為$typeOptions = $tl->GetOptionArray(0,0,1);
解釋如下:第三個參數表示欄目類型(即文章集),改為1表示文章集類欄目,0表示所有頻道
二、找到並開啟include\typelink.class.php,在第223行 $row = $this->dsql->GetOne("SELECT id,typename,ispart,channeltype FROM dede_arctype WHERE id=‘$hid‘ ");改為:
$row = $this->dsql->GetOne("SELECT id,typename,ispart,channeltype FROM dede_arctype WHERE id=‘$hid‘ and ishidden=‘0‘ ");
第234行else $ctsql=" AND channeltype=‘$channeltype‘  ";改為
else $ctsql=" AND channeltype=‘$channeltype‘ and ishidden=‘0‘ ";
即兩行增加and ishidden=‘0‘
ishidden=‘0‘表示非欄目。
完成以上兩步,進階搜尋中欄目,便不會出現隱藏欄目,
關於如何禁止列表導覽列目調用隱藏欄目的方法及禁用搜尋隱藏欄目內容的方法,以後再談吧。
測試版本為5.7。

原文地址:http://www.genban.org/news/dedecms-6951.html


dedecms隱藏進階搜尋中的隱藏欄目的方法

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.