+ -
当前位置:首页 → 问答吧 → 麻烦懂 Discuz 的朋友进来下 , 问题 ...

麻烦懂 Discuz 的朋友进来下 , 问题 ...

时间:2011-11-27

来源:互联网

我只是粗粗用过 DZ 没有仔细用过它各个方面的功能 ,但现在研究它的代码了 . 有些地方因为没用过 , 光看代码有无法看出其意思来 , 请懂的朋友解答下 .
PHP code
if(!empty($_G['forum']['threadsorts']['types'])) {
    require_once libfile('function/threadsort');

    $showpic = intval($_G['gp_showpic']);
    $templatearray = $sortoptionarray = array();
    foreach($_G['forum']['threadsorts']['types'] as $stid => $sortname) {
        loadcache(array('threadsort_option_'.$stid, 'threadsort_template_'.$stid));
        sortthreadsortselectoption($stid);
        $templatearray[$stid] = $_G['cache']['threadsort_template_'.$stid]['subject'];
        $sortoptionarray[$stid] = $_G['cache']['threadsort_option_'.$stid];
    }

    if(!empty($_G['forum']['threadsorts']['defaultshow']) && empty($_G['gp_sortid']) && empty($_G['gp_sortall'])) {
        $_G['gp_sortid'] = $_G['forum']['threadsorts']['defaultshow'];
        $_G['gp_filter'] = 'sortid';
        $_SERVER['QUERY_STRING'] = $_SERVER['QUERY_STRING'] ? $_SERVER['QUERY_STRING'].'&sortid='.$_G['gp_sortid'] : 'sortid='.$_G['gp_sortid'];
        $filterurladd = '&filter=sort';
    }

    $_G['gp_sortid'] = $_G['gp_sortid'] ? $_G['gp_sortid'] : $_G['gp_searchsortid'];
    if(isset($_G['gp_sortid']) && $_G['forum']['threadsorts']['types'][$_G['gp_sortid']]) {
        $searchsortoption = $sortoptionarray[$_G['gp_sortid']];
        $quicksearchlist = quicksearch($searchsortoption);
        $_G['forum_optionlist'] = $_G['cache']['threadsort_option_'.$_G['gp_sortid']];
        $forum_optionlist = getsortedoptionlist();
    }
}

简单的来说 , 就这段 , 不知能否详细解释一下 ?

作者: fasdlkfjd   发布时间: 2011-11-27

调试着才能说清楚

作者: seared2008   发布时间: 2011-11-28

具体一点,没有人没事给你读代码玩。

作者: andyxl   发布时间: 2011-11-28

相关阅读 更多