dede搜索结果页支持article、sql、channelartlist 等标签

dede搜索结果页支持article、sql、channelartlist 等标签
打开文件:include/arc.searchview.class.php
找到:
  1. <span style=“font-family:tahoma,geneva,sans-serif;”>1
  2. require_once(DEDEINC.”/taglib/hotwords.lib.php”);
  3. </span>
在下面添加:
  1. <span style=“font-family:tahoma,geneva,sans-serif;”>1
  2. require_once(DEDEINC.”/taglib/channel.lib.php”);
  3. require_once(DEDEINC.”/taglib/arclist.lib.php”);
  4. require_once(DEDEINC.”/taglib/channelartlist.lib.php”);
  5. require_once(DEDEINC.”/taglib/myad.lib.php”);
  6. require_once(DEDEINC.”/taglib/php.lib.php”);
  7. require_once(DEDEINC.”/taglib/sql.lib.php”);
  8. </span>
然后找到:
  1. <span style=“font-family:tahoma,geneva,sans-serif;”>1
  2. else if($tagname==”hotwords”)
  3.            {
  4.                $this->dtp->Assign($tagid,lib_hotwords($ctag,$this));
  5.            }
  6. </span>
在下面添加:
  1. <span style=“font-family:tahoma,geneva,sans-serif;”>01
  2. else if($tagname==”arclist”)
  3. {
  4. $this->dtp->Assign($tagid,lib_arclist($ctag,$this));
  5. }
  6. else if($tagname==”channelartlist”)
  7. {
  8. $this->dtp->Assign($tagid,lib_channelartlist($ctag,$this));
  9. }
  10. else if($tagname==”myad”)
  11. {
  12. $this->dtp->Assign($tagid,lib_myad($ctag,$this));
  13. }
  14. else if($tagname==”php”)
  15. {
  16. $this->dtp->Assign($tagid,lib_php($ctag,$this));
  17. }
  18. else if($tagname==”sql”)
  19. {
  20. $this->dtp->Assign($tagid,lib_sql($ctag,$this));
  21. }
  22. </span>
这样,搜索页面就支持多种标签了。
包括{dede:arclist} {/dede:arclist}、{dede: channelartlist } {/dede: channelartlist}、{dede: myad } {/dede: myad }、{dede: php } {/dede: php }、{dede: sql } {/dede: sql }
仅供大家学习参考。以上内容希望对你有帮助。