1.动态页模板引用(如控制面板模板)
<? require_once(ECMS_PATH.'e/class/t_functions.php'); ?>
2.修改e/class/functions.php的函数ReplaceTempvar,修改后为如下内容:
//替换全局模板变量--让动态页支持标签-知行 function ReplaceTempvar($temp){ global $empire; if(empty($temp)) {return $temp;} $sql=$empire->query("select myvar,varvalue from ".GetTemptb("enewstempvar")." where isclose=0 order by myorder desc,varid"); while($r=$empire->fetch($sql)) { $tempvar=$r[varvalue]; $tempvar=RepBq($tempvar); $tempvar=DoRepEcmsLoopBq($tempvar); $temp=str_replace('[!--temp.'.$r[myvar].'--]',$tempvar,$temp); } return $temp; }
|