dz版块列表今日发帖的主题、标题、日期显红色

[复制链接]
查看7115 | 回复1 | 2018-11-20 15:15 | 显示全部楼层 |阅读模式
dz版块列表今日发帖的主题、标题、日期显红色

1、修改forumdisplay.php(请备份
找到:
  1. <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>
复制代码

上面添加:

  1.         if($thread['dateline']>=($timestamp-86400)){
  2.                $thread['today']=1;
  3.     }
复制代码


2、修改templates/default/forumdisplay.htm(请备份

===若是修改标题为红色的====
请找到:
  1. <a href="viewthread.php?tid=$thread[tid]&extra=$extra"$thread[highlight]>$thread[subject]</a>
复制代码

替换为:


  1. <!--{if $thread['today']}-->
  2.                 <a href="viewthread.php?tid=$thread[tid]&extra=$extra"$thread[highlight]><font color=red>$thread[subject]</font></a>
  3. <!--{else}-->
  4. <a href="viewthread.php?tid=$thread[tid]&extra=$extra"$thread[highlight]>$thread[subject]</a>
  5. <!--{/if}-->
复制代码

===若是要使发帖日期为红色的====

请找到:


  1. <br><span class="smalltxt lighttxt">$thread[dateline]</span></td>
复制代码

替换为:

  1. <!--{if $thread['today']}-->
  2.                 <br><span class="smalltxt lighttxt"><font color=red>$thread[dateline]</font></span></td>
  3. <!--{else}-->
  4.                 <br><span class="smalltxt lighttxt">$thread[dateline]</span></td>
  5. <!--{/if}-->
复制代码

OK,后台更新缓存!


自丢网 | 2019-8-20 01:01 | 显示全部楼层
学习了,感谢自丢教程网
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

UID
1
贡献
387
丢币
38902
主题
4607
回帖
116
注册时间
2018-9-25
最后登录
2024-4-16