Download the PHP package nwnuyhs/flarum-for-you without Composer
On this page you can find all versions of the php package nwnuyhs/flarum-for-you. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nwnuyhs/flarum-for-you
More information about nwnuyhs/flarum-for-you
Files in nwnuyhs/flarum-for-you
Package flarum-for-you
Short Description A "For you" list for Flarum 2, after X's open-source recommendation algorithm: ranked by replies, likes, bookmarks, views and the author replying, freshness, followed members and tags, the reader's own tag history and what they have already read or been shown. Each refresh brings a new set.
License MIT
Homepage https://github.com/nwnuyhs/flarum-for-you
Informations about the package flarum-for-you
For You for Flarum
English | 简体中文
A For you discussion list for Flarum 2, modelled on X's open-source "For You" algorithm (xai-org/x-algorithm). Each refresh brings up a different set of discussions, so readers see more of the forum than the latest few threads.
Made by X Theme, an X-style theme for Flarum. It also works without the theme, on any Flarum 2 forum. Live demo: https://x.it6.cc.
| Desktop | Phone |
|---|---|
How discussions are ranked
- Candidates: the list can draw from the 600 most recently active discussions the page allows (same tag, same visibility), plus the 100 discussions with the most replies.
- Filters: the list leaves out the reader's own discussions, discussions they ignore, and tags they hide or ignore. One exception, as on X: a discussion the reader started in the last hour goes to the top of their list, so they see it right after posting.
-
Value: each discussion gets a weighted sum of how people engaged with it. The weights come from x-algorithm (
home-mixer/params/param.rs):Signal Weight reply 5.0 like 0.708 bookmark 2.118 view 0.274 author replied back 15.0 (up to 3) The sum is then log-scaled.
- Multipliers:
- Freshness: the score halves every 36 hours and never drops below 0.05, so good older discussions still come up.
- New discussions: fewer than 30 views and under 4 days old ×1.5, so they get a chance.
- Recent reply: a reply in the last day ×1.25.
- Following: a followed author ×1.6 (ianm/follow-users) and a followed tag ×1.3 (fof/follow-tags).
- Tag interest: up to ×1.8 for the tags the reader reads, replies and likes in most (last 180 days).
- Reading state: read to the end ×0.3, new replies since the last read ×1.1.
- Already shown in an earlier batch: within 3 hours ×0.05, within 24 hours ×0.3, within 3 days ×0.7.
- Randomness: ×0.8–1.25, so no two refreshes are the same.
- Author diversity: each further discussion by the same author in the list is scaled by
(1 − 0.25) × 0.5^k + 0.25, x-algorithm's diversity multiplier.
The first page builds a new batch of 300 discussions. Scrolling further reads from the same batch (cached for 30 minutes), so nothing repeats or goes missing while scrolling. Guests are told apart by their browser session.
Use
- The list adds a For you sort to the discussion list.
- The admin setting Open "For you" first is on by default. It makes For you the first sort and the home page default; turn it off to keep it as one more sort.
- API:
GET /api/discussions?sort=forYou, with any filter (for examplefilter[tag]=…). - With X Theme, For you is the first feed tab. Pull down or tap the tab again for a new set.
It uses these extensions when they are installed, and works without them: flarum/likes, fof/bookmarks, ianm/follow-users, fof/follow-tags, and X Theme's view counts.
Install
Then enable For You in the admin panel.
Update
Links
MIT licensed.