Quick question: is it possible to make a plugin altering the "latest" page request?


(Coin-coin le Canapin) #1

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


(Jeff Atwood) #2

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


(Coin-coin le Canapin) #3

Hi :slight_smile: 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.


(David Taylor) #4

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/topic_query.rb at master · discourse/discourse · GitHub


#5

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?


(Sam Saffron) #6

Yes this would require a theme component or a plugin.