标签 生成 下的文章

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();
    }
}

- 阅读剩余部分 -

MacCMS后台一键当天不生成顶级分类的解决方法

编辑/application/admin/view/make/opt.html文件第26行,找到

<input type="button" value="{:lang('admin/make/one_today')}" class="layui-btn layui-btn-primary" onclick="post('ac=info&tab=vod&vodtype={$vod_type_ids_today}&ac2=day&jump=1');"/>

修改为

<input type="button" value="{:lang('admin/make/one_today')}" class="layui-btn layui-btn-primary" onclick="post('ac=info&tab=vod&vodtype={$vod_type_ids}&ac2=day&jump=1');"/>

SeaCMS使用定时任务软件实现自动生成

使用定时任务软件访问以下网址即可:

生成首页链接:
你的网址/后台目录/admin_makehtml2.php?action=index&by=video&password=cookie加密码

生成列表页链接:
你的网址/后台目录/admin_makehtml2.php?action=allchannel&password=cookie加密码

生成当天更新内容页链接:
你的网址/后台目录/admin_makehtml2.php?action=daysview&password=cookie加密码

cookie加密码位置:
后台 系统 - 网站资料设置 - cookie加密码

SeaCMS自定义地图页模板文件和生成静态文件名

编辑 /include/mkhtml.func.php 文件第43行,找到:

function makeAllmovie($by='video')
{
    global $mainClassObj;
    switch ($by){
        case 'video':
            $templatePath="/templets/".$GLOBALS['cfg_df_style']."/".$GLOBALS['cfg_df_html']."/map.html";
        break;

修改为

function makeAllmovie($by='video')
{
    global $mainClassObj;
    switch ($by){
        case 'video':
            $templatePath="/templets/".$GLOBALS['cfg_df_style']."/".$GLOBALS['cfg_df_html']."/self_all.html";
        break;

编辑 /include/mkhtml.func.php 文件第71行,找到:

case 'video':
    $allmoviename=sea_ROOT."/allmovie".getfileSuffix();
    createTextFile($content,$allmoviename);
    return "地图页生成完毕 <a target='_blank' href='../allmovie".getfileSuffix()."'><font color=red>浏览地图页</font></a><br>";
break;

修改为:
编辑 /include/mkhtml.func.php 文件第71行,找到:

case 'video':
    $allmoviename=sea_ROOT."/all".getfileSuffix();
    createTextFile($content,$allmoviename);
    return "地图页生成完毕 <a target='_blank' href='../all".getfileSuffix()."'><font color=red>浏览地图页</font></a><br>";
break;

更新缓存并重新生成即可