A magazine-style front page for a FlatBB forum (门户), built from the forum's own content:
- Hero with the site name, tagline, an optional introduction, the main calls to action and a
statistics strip (topics, replies, members, online). - Latest discussions — the newest visible topics, with author, category, replies, views and
the last reply, using the core topic row design. - Trending this week — topics created in the last seven days ordered like the Top page
(likes, replies, views). - Categories — the directory of top-level categories with description and topic count.
- Newest members and popular tags.
- A Portal link in the sidebar.
Taking over the home page
Let the portal answer the home address in the plugin settings. Visitors landing on / see the
portal; the plain list stays at /latest, and /portal keeps working as a direct address.
The takeover is a documented router.routes filter (no core files are edited). Another plugin
that also claims / will win or lose depending on hook order, so enable only one home takeover
at a time — Admin → Plugins lists active takeovers.
Settings
| Setting | Default | Notes |
|---|---|---|
| Serve the portal at the home address | off | / renders the portal |
| Portal introduction | empty | Shown in the hero and in the meta description |
| Latest topics on the portal | 8 | 4–12 |
| Show the statistics strip | on | Topics, replies, members, online |
| Show the category directory | on | Top-level categories only |
| Show trending topics | on | Topics created in the last 7 days |
| Show newest members | on | Latest eight accounts |
| Show popular tags | on | Most used tags |
| Show the portal in the sidebar | on | Main sidebar link |
Notes
- Hidden categories and the
topic_list.queryfilter are respected: the loader is the coretopic_list_fetch(), so a portal never reveals a topic its reader could not open. - Users, categories and tags are attached in batches — no queries inside loops.
- Site statistics reuse the core five-minute
site_stats()cache; newest members come from the
same cache, so the portal adds no separate member query. - The plugin stores nothing and has no tables; disabling it removes the page and the takeover.
- Text is translatable (English source strings) and escaped with
h().