DZX帖子列表今日发帖红色显示,24小时蓝色显示 discuz教程
Discuz模板帖子列表今日发帖红色显示,24小时蓝色显示
修改方法都一样!
第一步、修改forumdisplay.php
找到:
$thread["dateline"] = gmdate($dateformat, $thread["dateline"] + $timeoffset * 3600);
上面添加:
$thread["today"] = $thread[dateline];
第二步、修改templates/default/forumdisplay.htm
找到:
<em>$thread[dateline]</em>
替换为:
<!--{if (($times**p-$thread["today"])<43200)}-->
<font color=red>$thread[dateline]</font>
<!--{elseif (($times**p-$thread["today"])>43200) && (($times**p-$thread["today"])<86400)}-->
<font color=blue>$thread[dateline]</font>
<!--{else}-->$thread[dateline]<!--{/if}-->
|
|