在织梦标签dede:list中增加noflag属性的方法支持5.7版本(5)

相关案例演示

return $this->Fields[‘typedir’];

}

CreateDir(MfTypedir($this->Fields[‘typedir’]));

$makeUrl = $this->GetMakeFileRule($this->Fields[‘id’],”index”,MfTypedir($this->Fields[‘typedir’]),$this->Fields[‘defaultname’],$this->Fields[‘namerule2’]);

$makeUrl = preg_replace(“/\/{1,}/”, “/”, $makeUrl);

$makeFile = $this->GetTruePath().$makeUrl;

if($nmfa==0)

{

$this->PartView->SaveToHtml($makeFile);

//如果启用远程发布则需要进行判断

if($GLOBALS[‘cfg_remote_site’]==’Y’&& $isremote == 1)

{

//分析远程文件路径

$remotefile = str_replace(DEDEROOT, ”,$makeFile);

$localfile = ‘..’.$remotefile;

$remotedir = preg_replace(‘/[^\/]*\.html/’, ”,$remotefile);

//不相等则说明已经切换目录则可以创建镜像

$this->ftp->rmkdir($remotedir);

$this->ftp->upload($localfile, $remotefile, ‘acii’);

}

}

else

{

if(!file_exists($makeFile))

{

$this->PartView->SaveToHtml($makeFile);

//如果启用远程发布则需要进行判断

if($cfg_remote_site==’Y’&& $isremote == 1)

{

//分析远程文件路径

$remotefile = str_replace(DEDEROOT, ”,$makeFile);

$localfile = ‘..’.$remotefile;

$remotedir = preg_replace(‘/[^\/]*\.html/’, ”,$remotefile);

//不相等则说明已经切换目录则可以创建镜像

$this->ftp->rmkdir($remotedir);

$this->ftp->upload($localfile, $remotefile, ‘acii’);

}

}

}

return $this->GetTrueUrl($makeUrl);

}
 

function DisplayPartTemplets()

{

$this->PartView = new PartView($this->TypeID,false);

$this->PartView->SetTypeLink($this->TypeLink);

$nmfa = 0;

$tmpdir = $GLOBALS[‘cfg_basedir’].$GLOBALS[‘cfg_templets_dir’];

if($this->Fields[‘ispart’]==1)

{

//封面模板

$tempfile = str_replace(“{tid}”,$this->TypeID,$this->Fields[‘tempindex’]);

$tempfile = str_replace(“{cid}”,$this->ChannelUnit->ChannelInfos[‘nid’],$tempfile);

$tempfile = $tmpdir.”/”.$tempfile;

if(!file_exists($tempfile))

{

$tempfile = $tmpdir.”/”.$GLOBALS[‘cfg_df_style’].”/index_default.htm”;

}

$this->PartView->SetTemplet($tempfile);

}

else if($this->Fields[‘ispart’]==2)

{

//跳转网址

$gotourl = $this->Fields[‘typedir’];

header(“Location:$gotourl”);

exit();

}

CreateDir(MfTypedir($this->Fields[‘typedir’]));

$makeUrl = $this->GetMakeFileRule($this->Fields[‘id’],”index”,MfTypedir($this->Fields[‘typedir’]),$this->Fields[‘defaultname’],$this->Fields[‘namerule2’]);

$makeFile = $this->GetTruePath().$makeUrl;

if($nmfa==0)

{

$this->PartView->Display();

}

else

{

if(!file_exists($makeFile))

{

$this->PartView->Display();

}

else

{

include($makeFile);

}

}

}

function GetTruePath()

{

免责声明:本站所有文章和图片均来自用户分享和网络收集,文章和图片版权归原作者及原出处所有,仅供学习与参考,请勿用于商业用途,如果损害了您的权利,请联系网站客服处理。


来源:网友投稿 关注: 时间:2020-06-28 08:36
首先声明,只要是我们的vip会员所有源码均可以免费下载,不做任何限制(了解更多)
☉本站的源码不会像其它下载站一样植入大量的广告。为了更好的用户体验以后坚持不打水印
☉本站只提供精品织梦源码,源码在于可用,不在多!!希望在这里找到你合适的。
☉本站提供的整站织梦程序,均带数据及演示地址。可以在任一源码详情页查看演示地址
☉本站所有资源(包括源码、模板、素材、特效等)仅供学习与参考,请勿用于商业用途。
☉如有其他问题,请加网站客服QQ进行交流。
相关织梦教程
QQ在线咨询