/**
* 时间函数
*
*/
function timeZone($from){
$now = new Typecho_Date(Typecho_Date::gmtTime());
return $now->timeStamp - $from < 246060 ? true : false;
}先定义一个时间函数,放到我们主题的函数页面中。
<?php if(timeZone($this->date->timeStamp)) echo ' new'; ?>然后在我们需要调用的首页列表页面,在需要的位置添加上代码,当然我们可以修改NEW标签的样式。