dedecms专题模板应用分析及解决方案
//获得专题文章的列表
//——————————–
function GetSpecList($fname,$noteinfo,$noteid=””)
{
if(!isset($GLOBALS[‘__SpGetArcList’])) require_once(dirname(__FILE__).”/inc/inc_fun_SpGetArcList.php”);
if($noteinfo==””) return “”;
$rvalue = “”;
$tempStr = GetSysTemplets(“channel/channel_spec_note.htm”);
$dtp = new DedeTagParse();
$dtp->LoadSource($noteinfo);
if(is_array($dtp->CTags))
{
foreach($dtp->CTags as $k=>$ctag){
$notename = $ctag->GetAtt(“name”);
if($noteid!=”” && $ctag->GetAtt(“noteid”)!=$noteid){ continue; } //指定名称的专题节点
if($noteid!=”” && $ctag->GetAtt(“noteid”)===$noteid) {
$isauto = $ctag->GetAtt(“isauto”);
$idlist = trim($ctag->GetAtt(“idlist”));
$rownum = trim($ctag->GetAtt(“rownum”));
if(empty($rownum)) $rownum = 40;
$keywords = “”;
$stypeid = 0;
if($isauto==1){
$idlist = “”;
$keywords = trim($ctag->GetAtt(“keywords”));
$stypeid = $ctag->GetAtt(“typeid”);
}
if(trim($ctag->GetInnerText())!=””) $listTemplet = $ctag->GetInnerText();
else $listTemplet = GetSysTemplets(“spec_arclist.htm”);
$idvalue = SpGetArcList($this->dsql,
$stypeid,$rownum,$ctag->GetAtt(“col”),
$ctag->GetAtt(“titlelen”),$ctag->GetAtt(“infolen”),
$ctag->GetAtt(“imgwidth”),$ctag->GetAtt(“imgheight”),
”all”,”default”,$keywords,$listTemplet,100,0,$idlist);
$notestr = str_replace(“~notename~”,$notename,$tempStr);
$notestr = str_replace(“~spec_arclist~”,$idvalue,$notestr);
$rvalue .= $notestr;
if($noteid!=”” && $ctag->GetAtt(“noteid”)==$noteid){ break; }
}
}
}
$dtp->Clear();
return $rvalue;
☉本站提供的源码、模板、软件工具等其他资源,都不包含技术服务,请大家谅解!
pbootcms模板网 » dedecms专题模板应用分析及解决方案