时间:2016-02-16 19:55 来源: 我爱IT技术网 作者:佚名
欢迎您访问我爱IT技术网,今天小编为你分享的电脑教程之dedeCMS系列教程:【dedecms专题模板应用分析及解决方案】,请阅读以下详细内容!
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(); </p> <p></p> <p>$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;</p> <p>if($isauto==1){
$idlist="";
$keywords=trim($ctag->GetAtt("keywords"));
$stypeid=$ctag->GetAtt("typeid");
}</p> <p>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);</p> <p>$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;
}
关于dedecms专题模板应用分析及解决方案的用户互动如下:
相关问题:
答: >>详细
相关问题:
答: >>详细
相关问题:
答: >>详细
- 评论列表(网友评论仅供网友表达个人看法,并不表明本站同意其观点或证实其描述)
-
