在文章标题的后面增加“(new)”最新发布的标志:
{dede:arclist row='5'titlelen='60' typeid='1'}
<li><a href="[field:arcurl/]">[field:title/]</a>
<span>
[field:senddate runphp='yes']
$ntime = time();
$oneday = 3600 * 24;
if(($ntime – @me)<$oneday) @me = "<font color='#c00'>(new)</font>";
else @me = "";
[/field:senddate]
</span>
</li>
{/dede:arclist}
|
另一种php形式代码:
{dede:arclist titlelen='60'row='5'}
<li><a href="[field:arcurl/]">[field:title/]</a>
<span>
[field:pubdate runphp='yes']
$a="<font color='#ccc'>";
$d="<font color='#c00'>";
$b="</font>";
$c=strftime("%m-%d","@me");
$ntime = time();
$oneday = 3600 * 24;
if(($ntime – @me)<$oneday) @me = $a.$c.$b;
else @me = $d.$c.$b;
[/field:pubdate]
</span>
</li>
{/dede:arclist}
|
关键词:织梦,dedecms,当天,文章,标题,加,红色,最新,在, 标签:
更多资讯请收藏关注
网站模板(www.1yc.cn)