标签 页面 下的文章

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

- 阅读剩余部分 -

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

- 阅读剩余部分 -