# Wanted: Hot sorting criteria for front-page

**URL:** <https://meta.discourse.org/t/wanted-hot-sorting-criteria-for-front-page/47136>\
**Category:** Marketplace\
**Created:** [Julho 12, 2016, 1:31am UTC](https://meta.discourse.org/t/wanted-hot-sorting-criteria-for-front-page/47136 "2016-07-12T01:31:30Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![commonpawn](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/commonpawn/32/50792_2.png) [@commonpawn](https://meta.discourse.org/u/commonpawn)\
**Post date:** [Julho 12, 2016, 1:31am UTC](https://meta.discourse.org/t/wanted-hot-sorting-criteria-for-front-page/47136/1 "2016-07-12T01:31:30Z")

</div>

_Following up on [this thread](https://meta.discourse.org/t/improving-the-top-criteria/26064/17) from last year._

[We would like](https://meta.discourse.org/t/dansk-dynamit-website-running-on-discourse/43430) to use a sorting criteria as [Hacker News](https://news.ycombinator.com/) to make sure we’re always serving the most popular content to our users. We’re imagining using a similar algorithm to the one used on Hacker News.

 ![](https://global.discourse-cdn.com/meta/original/3X/2/1/21e172d3b80214dc4e660ef5d3f734bab6919024.png)

 ![](https://global.discourse-cdn.com/meta/original/3X/e/2/e227604c17f09cd97122895d1cc79ccd108b2189.png)

Basically it should sort _all_ topics on our forum on the front-page after this criteria - so you can keep scrolling forever. (Unlike top topics in Discourse today, which is limited to a pre-set number of topics within a time range)

We would like to use this simple algorithm:

```
Variables
L: Total number of likes on posts in topic
T: Hours since topic was created
G: Gravity (rate at which topics loose their position on the front-page)

G = 1.5

Score = L / (T + 2)^G

```

The gravity rate should be able to be changed from the settings page for admins of the forum.

**Why not just use the default Top view**  
While we would like to use it, a number of things are different

- The top view only shows popular topics _created_ within the specific timeframe, e.g. a week. We want to show what was popular the last week - no matter the creation date of the topic.
- The settings for the “Top view” [is bizarre](https://meta.discourse.org/t/improved-top-page-settings/47173) and requires the admin to specific a precise amount of posts to be shown for the desired timeframe, e.g. weekly. If there are not enough posts from this period, it switches the timeframe to monthly top posts.

_More background [here](https://meta.discourse.org/t/hot-topics-this-quarter-month-week-today/42520), [here](https://meta.discourse.org/t/hot-topics-this-quarter-month-week-today/42520) and [here](https://meta.discourse.org/t/wanted-discourse-hacker-news-plugin/37620)_

**Requirements**

- New filter in top menu on discourse installation
- Has to be able to set as default filter of front-page, e.g. the landing page of a discourse installation
- Has to filter based on above algorithm with the variable G - gravity - being able to be tweaked from the admin page
- The filtering should filter all topics on the Discourse installation, e.g. so the user can continue to scroll forever and should not be limited to a fixed number of posts

**We’re looking for developers from the community to help build this plugin, please get in touch if you’re interested.**  
Potentially a paid project.

---

_[View the full topic](https://meta.discourse.org/t/wanted-hot-sorting-criteria-for-front-page/47136)._
