dz版块列表今日发帖的主题、标题、日期显红色
1、修改forumdisplay.php(请备份)
找到:
- <span style="color: rgb(102, 102, 102); font-family: Tahoma; background-color: rgb(255, 255, 255);">$thread['dateline'] = gmdate($dateformat, $thread['dateline'] + $timeoffset * 3600);</span>
复制代码
上面添加:
- if($thread['dateline']>=($timestamp-86400)){
- $thread['today']=1;
- }
复制代码
2、修改templates/default/forumdisplay.htm(请备份)
===若是修改标题为红色的====
请找到:
- <a href="viewthread.php?tid=$thread[tid]&extra=$extra"$thread[highlight]>$thread[subject]</a>
复制代码
替换为:
- <!--{if $thread['today']}-->
- <a href="viewthread.php?tid=$thread[tid]&extra=$extra"$thread[highlight]><font color=red>$thread[subject]</font></a>
- <!--{else}-->
- <a href="viewthread.php?tid=$thread[tid]&extra=$extra"$thread[highlight]>$thread[subject]</a>
- <!--{/if}-->
复制代码
===若是要使发帖日期为红色的====
请找到:
- <br><span class="smalltxt lighttxt">$thread[dateline]</span></td>
复制代码
替换为:
- <!--{if $thread['today']}-->
- <br><span class="smalltxt lighttxt"><font color=red>$thread[dateline]</font></span></td>
- <!--{else}-->
- <br><span class="smalltxt lighttxt">$thread[dateline]</span></td>
- <!--{/if}-->
复制代码
OK,后台更新缓存!
|
|