帝国cms最新文章显示红色日期的教程


首先,要在模板中选中“使用程序代码”。
然后,在列表内容模板(list.var)框中,添加如下代码: 

$newimg='[!--newstime--]';
if(time()-$r[newstime]<=1*24*3600)
{
        $newimg='[!--newstime--]';
}  

$listtemp='
  • '.$newimg.' [!--title--]
  • ';

    或者使用灵动标签