SeaCMS后台采集自定义下载来源名称

打开/include/collection.class.php第62行,找到

if($video->dl->dd[$i]['flag']=='down')
              {$v_data['v_downdata'] .= "下载地址一$$".$video->dl->dd[$i]."$$$";} 

修改为

if($video->dl->dd[$i]['flag']=='down'||$video->dl->dd[$i]['flag']=='http')||$video->dl->dd[$i]['flag']=='xunlei')
              {$v_data['v_downdata'] .= "迅雷下载$$".$video->dl->dd[$i]."$$$";} 

如果需要替换下载地址一为其他,将其修改为自己想要的名称,然后将后台下载来源管理处设置为相同名称即可。

监测linux负载过高时重启php脚本

#!/bin/sh
TOP_SYS_LOAD_NUM=5
SYS_LOAD_NUM=`uptime | awk '{print $(NF-2)}' | sed 's/,//'`

echo $(date +"%y-%m-%d") `uptime`
if [ `echo "$TOP_SYS_LOAD_NUM < $SYS_LOAD_NUM"|bc` -eq 1 ]
then
echo "#0#" $(date +"%y-%m-%d %H:%M:%S") "pkill php-fpm" `ps -ef | grep php-fpm | wc -l`
/etc/init.d/php-fpm stop
sleep 8
pkill php-fpm
sleep 8
for i in 1 2 3
do
if [ `pgrep php-fpm | wc -l` -le 0 ]
then
/etc/init.d/php-fpm start
sleep 30
echo "#1#" $(date +"%y-%m-%d %H:%M:%S") "start php-fpm" `ps -ef | grep php-fpm | wc -l`
fi
done
else
if [ `pgrep php-fpm | wc -l` -le 0 ]
then
/etc/init.d/php-fpm start
sleep 30
echo "#2#" $(date +"%y-%m-%d %H:%M:%S") "start php-fpm" `ps -ef | grep php-fpm | wc -l`
fi
fi

定时执行

*/5 * * * * /root/check-php.sh >>/var/log/check-php.log

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');"/>