# 快速提问：能否编写一个插件来修改“最新”页面的请求？

**URL:** <https://meta.discourse.org/t/quick-question-is-it-possible-to-make-a-plugin-altering-the-latest-page-request/92573>\
**Category:** Development\
**Created:** [2018年七月17日 20:59 UTC](https://meta.discourse.org/t/quick-question-is-it-possible-to-make-a-plugin-altering-the-latest-page-request/92573 "2018-07-17T20:59:57Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)\
**Post date:** [2018年七月17日 20:59 UTC](https://meta.discourse.org/t/quick-question-is-it-possible-to-make-a-plugin-altering-the-latest-page-request/92573/1 "2018-07-17T20:59:57Z")

</div>

Hi. I would like to filter the topics displayed on the “latest” page. Like changing the SQL or something like that. Is it possible?

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [2018年七月18日 04:06 UTC](https://meta.discourse.org/t/quick-question-is-it-possible-to-make-a-plugin-altering-the-latest-page-request/92573/2 "2018-07-18T04:06:35Z")

</div>

You can already do this, mark categories as muted in your user preferences.

---

<div class="post-metadata">

**Author:** ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)\
**Post date:** [2018年七月18日 07:10 UTC](https://meta.discourse.org/t/quick-question-is-it-possible-to-make-a-plugin-altering-the-latest-page-request/92573/3 "2018-07-18T07:10:49Z")

</div>

Hi 🙂 I am aware of this, but my question is more general. Is it possible to modify this request ? I was asked about this by one of my customers.

---

<div class="post-metadata">

**Author:** ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)\
**Post date:** [2018年七月18日 08:20 UTC](https://meta.discourse.org/t/quick-question-is-it-possible-to-make-a-plugin-altering-the-latest-page-request/92573/4 "2018-07-18T08:20:12Z")

</div>

Anything is possible using a plugin, but that doesn’t make it a good idea. Changing things that aren’t designed to be changed will probably cause issues in future.

If you really want to pursue this, the query for latest topics is handled in `topic_query.rb`: [discourse/lib/topic\_query.rb at main · discourse/discourse · GitHub](https://github.com/discourse/discourse/blob/master/lib/topic_query.rb)

---

<div class="post-metadata">

**Author:** ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)\
**Post date:** [2018年七月18日 10:07 UTC](https://meta.discourse.org/t/quick-question-is-it-possible-to-make-a-plugin-altering-the-latest-page-request/92573/5 "2018-07-18T10:07:45Z")

</div>

I believe the original problem is: for a specific category if there is a way to show only the active topics on the ‘latest’ page. Active means with comments.

It looks like you have no choice than doing a plugin, right?

---

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [2018年七月23日 01:24 UTC](https://meta.discourse.org/t/quick-question-is-it-possible-to-make-a-plugin-altering-the-latest-page-request/92573/6 "2018-07-23T01:24:21Z")

</div>

> [@Arkshine](#):
>
> It looks like you have no choice than doing a plugin, right?

Yes this would require a theme component or a plugin.
