标签 seacms 下的文章

SeaCMS剧情分类按ID排序

1、前台

编辑/include/common.file.func.php文件第1876行,将

$sql="select tid,upid,tname,ishidden,-1 as tcount from sea_jqtype order by upid asc";

修改为

$sql="select tid,tname,ishidden,-1 as tcount from sea_jqtype";

编辑/include/common.redis.func.php文件第1883行,将

$sql="select tid,upid,tname,ishidden,-1 as tcount from sea_jqtype order by upid asc";

修改为

$sql="select tid,tname,ishidden,-1 as tcount from sea_jqtype";

SeaCMS修改图片保存样式

默认按天保存修改为按月保存(每月一个文件夹)
编辑/include/image.class.php文件,第48行,将

$picpath = '../'.$cfg_upload_dir.'/allimg/'.MyDate("ymd",time())."/";

修改为

$picpath = '../'.$cfg_upload_dir.'/allimg/'.MyDate("Ym",time())."/";

SeaCMS后台自定义采集增加图片判断以决定新增或更新原数据

编辑 /include/collection.class.php 文件 找到:

//else 不勾选[只更新影片地址]
elseif(strpos($cfg_gatherset,'4')!==false)
{
        return $autocol_str.$this->update_movie_info_pic($rs,$v_data);
}

在下方插入:

elseif($v_data['v_pic']!==$rs['v_pic'])
{
        return $autocol_str.$this->_insert_database($v_data);
}

注:后台 智能采集设置 中仅勾选 按地址判断是否更新

SeaCMS后台自定义采集增加别名采集

编辑 /include/collection.class.php 文件,找到:

$v_data['v_name']=getAreaValue($loopstr,"name",$html,$listconf["removecode"]);
$v_data['v_name']=$this->filterWord($v_data['v_name'],0);
$v_data['v_enname']=Pinyin($v_data['v_name']);
$v_data['v_name'] =  htmlspecialchars($v_data['v_name']);
$v_data['v_name'] = str_replace(array('\\','()','\''),'/',$v_data['v_name']);

在下方插入:

$v_data['v_nickname']=getAreaValue($loopstr,"nickname",$html,$listconf["removecode"]);
$v_data['v_nickname'] =  htmlspecialchars($v_data['v_nickname']);

编辑 /include/collection.func.php 文件,找到:

getTestAreaValue($loopstr,"name","影片名称",$html,$removecode);

在下方插入:

getTestAreaValue($loopstr,"nickname","影片别名",$html,$removecode);

- 阅读剩余部分 -

SeaCMS获取当前页面URL以使用Meta标签移动适配

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

function makePlayByData($vType,$vId,$playArr,$content,$sdate,$enname,$stringecho)
{
    if($GLOBALS['cfg_ismakeplay']==1){
        for($i=0;$i<$playArr[0];$i++)
        {
            $tmp =$content;
            $tmp = str_replace("{playpage:from}",$playArr[1][$i],$tmp);
            foreach ($playArr[2][$i] as $n=>$play){
                $tmp1 =$tmp;
                $playLink = str_replace($GLOBALS['cfg_cmspath'],"",getPlayLink2($vType,$vId,$sdate,$enname,$i,$n));
                $tmp1 = str_replace("{playpage:part}",$play,$tmp1);

在下方插入:

$tmp1 = str_replace("{currentpageurl}",'http://'.$_SERVER['HTTP_HOST'].$playLink,$tmp1);

找到:

if($TotalResult == 0||strpos($content,'{/seacms:channellist}')===false){
        $channelLink=str_replace($GLOBALS['cfg_cmspath'],"",getChannelPagesLink($currentTypeId,1));
        $tempStr = str_replace("{channelpage:page}",1,$tempStr);
        $content=$tempStr;
        $content=$mainClassObj->ParsePageList($content,$typeIds,1,$pCount,$TotalResult,"channel",$currentTypeId);
        $content=$mainClassObj->parseIf($content);

在下方插入:

$content=str_replace("{currentpageurl}",'http://'.$_SERVER['HTTP_HOST'].$channelLink,$content);

- 阅读剩余部分 -