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

相关案例演示
}

}
//初始化列表模板,并统计页面总数

$tempfile = $GLOBALS[‘cfg_basedir’].$GLOBALS[‘cfg_templets_dir’].”/”.$this->TypeLink->TypeInfos[‘templist’];

$tempfile = str_replace(“{tid}”, $this->TypeID, $tempfile);

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

if(!file_exists($tempfile))

{

$tempfile = $GLOBALS[‘cfg_basedir’].$GLOBALS[‘cfg_templets_dir’].”/”.$GLOBALS[‘cfg_df_style’].”/list_default.htm”;

}

if(!file_exists($tempfile)||!is_file($tempfile))

{

echo “模板文件不存在,无法解析文档!”;

exit();

}

$this->dtp->LoadTemplate($tempfile);

$ctag = $this->dtp->GetTag(“page”);

if(!is_object($ctag))

{

$ctag = $this->dtp->GetTag(“list”);

}

if(!is_object($ctag))

{

$this->PageSize = 20;

}

else

{

if($ctag->GetAtt(“pagesize”)!=””)

{

$this->PageSize = $ctag->GetAtt(“pagesize”);

}

else

{

$this->PageSize = 20;

}

}

$this->TotalPage = ceil($this->TotalResult/$this->PageSize);

}

function MakeHtml($startpage=1, $makepagesize=0, $isremote=0)

{

global $cfg_remote_site;

if(empty($startpage))

{

$startpage = 1;

}
//创建封面模板文件

if($this->TypeLink->TypeInfos[‘isdefault’]==-1)

{

echo ‘这个类目是动态类目!’;

return ‘../plus/list.php?tid=’.$this->TypeLink->TypeInfos[‘id’];

}
//单独页面

else if($this->TypeLink->TypeInfos[‘ispart’]>0)

{

$reurl = $this->MakePartTemplets();

return $reurl;

}
$this->CountRecord();

//初步给固定值的标记赋值

$this->ParseTempletsFirst();

$totalpage = ceil($this->TotalResult/$this->PageSize);

if($totalpage==0)

{

$totalpage = 1;

}

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

$murl = ”;

if($makepagesize > 0)

{

$endpage = $startpage+$makepagesize;

}

else

{

$endpage = ($totalpage+1);

}

if( $endpage >= $totalpage+1 )

{

$endpage = $totalpage+1;

}

if($endpage==1)

{

$endpage = 2;

}

for($this->PageNo=$startpage; $this->PageNo < $endpage; $this->PageNo++)

{

$this->ParseDMFields($this->PageNo,1);

$makeFile = $this->GetMakeFileRule($this->Fields[‘id’],’list’,$this->Fields[‘typedir’],”,$this->Fields[‘namerule2’]);

$makeFile = str_replace(“{page}”, $this->PageNo, $makeFile);

$murl = $makeFile;

if(!preg_match(“/^\//”, $makeFile))

{

$makeFile = “/”.$makeFile;

}

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


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