SeaCMS一键生成当天增加同时生成自定义页面

编辑/admin/admin_makehtml.php文件第273行,找到

elseif($action=="allchannel")
{
    checkRunMode();
    $curTypeIndex=$index;
    $typeIdArray = getTypeIdArrayBySort(0);
    $typeIdArrayLen = count($typeIdArray);
    if (empty($curTypeIndex)){
        $curTypeIndex=0;
    }else{
        if(intval($curTypeIndex)>intval($typeIdArrayLen-1)){
            if (empty($action3)){
                alertMsg ("生成所有栏目全部搞定","");
                exit();
            }elseif($action3=="site"){
                echoHead();
                echo makeIndex();
                //echo makeAllmovie();
                echoFoot();
                alertMsg ("一键生成全部搞定","");
                exit();
            }
        }
    }
    $typeId = $typeIdArray[$curTypeIndex];
    if(empty($typeId)){
        exit("分类丢失");
    }else{
        echoHead();
        makeChannelById($typeId);
        echoFoot();
    }
}

修改为

elseif($action=="allchannel")
{
    checkRunMode();
    $curTypeIndex=$index;
    $typeIdArray = getTypeIdArrayBySort(0);
    $typeIdArrayLen = count($typeIdArray);
    if (empty($curTypeIndex)){
        $curTypeIndex=0;
    }else{
        if(intval($curTypeIndex)>intval($typeIdArrayLen-1)){
            if (empty($action3)){
                alertMsg ("生成所有栏目全部搞定","");
                exit();
            }elseif($action3=="site"){
                echoHead();
                echo makeIndex();
                //echo makeAllmovie();
                $templetdird = $cfg_basedir."templets/".$cfg_df_style."/".$cfg_df_html."/";
                $dh = dir($templetdird);
                while($filename=$dh->read())
                {
                if(strpos($filename,"elf_")>0) makeCustomInfo($filename);
                }
                echoFoot();
                alertMsg ("一键生成全部搞定","");
                exit();
            }
        }
    }
    $typeId = $typeIdArray[$curTypeIndex];
    if(empty($typeId)){
        exit("分类丢失");
    }else{
        echoHead();
        makeChannelById($typeId);
        echoFoot();
    }
}

标签:seacms, 生成, 页面, 自定义, 一键

添加新评论