1、==========红色的日期======== [field:pubdate runphp='yes'] $a="<font color=red>".strftime('%m-%d',@me)."</font>"; $b=strftime('%m-%d',@me); $ntime = time(); $day3 = 3600 * 24 * 3; if(($ntime - @me) < $day3) @me = $a; else @me =$b; [/field:pubdate] 2、==========红色的(new)======== [field:pubdate runphp='yes'] $aa=strftime('%m-%d',@me); $ntime = time(); $tagtime = @me; $day3 = 3600 * 24 * 3; if($tagtime > $ntime-$day3) @me = "<font color='red'>(new)</font>"; else @me = $aa; [/field:pubdate] 3、==========加new.gif小图片======== [field:pubdate runphp='yes'] $aa=strftime('%m-%d',@me); $ntime = time(); $tagtime = @me; $day3 = 3600 * 24 * 3; if($tagtime > $ntime-$day3) @me = "<img src='new.gif' />".$aa; else @me = $aa; [/field:pubdate] if((time()-@me)<(60*60*24)){@me=' <font color="#ff6600">'.strftime("%H:%M",@me).'</FONT>';} else {@me=strftime("%m-%d",@me);} [/field:pubdate]
或者
if(!empty(@me)){ $kws = explode(' ',@me); @me = ""; foreach($kws as $k){ @me .= "<a href='/tag.php?/$k/'>$k</a> "; } @me= str_replace('+', ' ',trim(@me)); } {/dede:field} |