---
title: 修改 Typecho 的评论回复样式
date: 2016-11-09T10:02:00+08:00
tags:
  - Typecho
  - 技术

---

博客一直在用 Typecho 自带的评论，但常常会遇到这种让本博主十分蛋疼的情况：

![2615556942.png](https://cdn.zgq.me/assets/posts/2016/change-comment-style/2615556942.png)

于是我在评论设置把回复层数改成了2层

![3160334842.png](https://cdn.zgq.me/assets/posts/2016/change-comment-style/3160334842.png)

这样看起来舒服多了，但第二层的评论却没有回复按钮，当我与访客回复多几句的时候访客没注意到上一层的回复按钮，然后就重新开楼回复了。

![951682295.png](https://cdn.zgq.me/assets/posts/2016/change-comment-style/951682295.png)

经过一番观察发现，把负责评论渲染的类 `/var/Widget/Comments/Archive.php` 的 reply 方法(大概在472行)的 if 判断中的 `!$this->isTopLevel` 条件去掉，评论右下角的回复的链接就显示出来了

![4127349816.png](https://cdn.zgq.me/assets/posts/2016/change-comment-style/4127349816.png)
