<var id="xvh3p"><noframes id="xvh3p"><var id="xvh3p"></var><listing id="xvh3p"><strike id="xvh3p"><listing id="xvh3p"></listing></strike></listing>
<var id="xvh3p"><strike id="xvh3p"><var id="xvh3p"></var></strike></var><th id="xvh3p"><strike id="xvh3p"><th id="xvh3p"></th></strike></th>
<span id="xvh3p"><noframes id="xvh3p"><dl id="xvh3p"></dl>
<span id="xvh3p"><noframes id="xvh3p">
<dl id="xvh3p"><noframes id="xvh3p">
<listing id="xvh3p"><noframes id="xvh3p"><listing id="xvh3p"><strike id="xvh3p"><listing id="xvh3p"></listing></strike></listing><th id="xvh3p"><strike id="xvh3p"><th id="xvh3p"></th></strike></th>
<th id="xvh3p"><strike id="xvh3p"></strike></th>
<dl id="xvh3p"><noframes id="xvh3p">
<th id="xvh3p"><noframes id="xvh3p">

观点

互联网+时代,说建站,谈运营与网络营销

织梦DedeCMS问答模块实现调用全部问题的方法

时间:2020-12-10

织梦DedeCMS问答模块实现调用全部问题的方法,在使用DedeCMS问答功能时,通常需要在首页等地方调用全部问题,一般只能调用待解决问题、新解决问题、推荐问题、高悬赏问题的调用,却没有全部问题的调用,这里我就讲到如何教大家来实现调用全部问题的方法。

问答模块实现调用全部问题的方法:

一、打开 /include/tpllib/plus_ask.php 找到大约在32行或用工具查找 else if($sort=='ok')  在查找代码之前插入以下代码:
    //自定义函数
    //实现调用全部问题
    else if($sort=='all')
    {
        $wheresql .= ' And status in (1,2) ';
        $orderby = ' ORDER BY dateline DESC';
    }
    //自定义函数结束

预览代码:
    else if($sort=='commend')
    {
        $wheresql .= ' And digest=1';
        $orderby = ' ORDER BY dateline DESC';
    }
    //自定义函数
    //实现调用全部问题
    else if($sort=='all')
    {
        $wheresql .= ' And status in (1,2) ';
        $orderby = ' ORDER BY dateline DESC';
    }
    //自定义函数结束
    else if($sort=='ok')
    {
        $wheresql .= ' And status=1 ';
        $orderby = ' ORDER BY solvetime DESC';
    }

二、前台调用方法:{dede:ask row='22' titlelen='80' sort='all'}...{/dede:ask}

这样就决绝了织梦DedeCMS问答模块实现调用全部问题的方法。

0
首页
案例
关于
联系