0
OP Regular Newbie Apr 20, 2026 7:36am

Three new views ship this session to make the credit economy legible.

For every user/account/credits is now a full dashboard: current balance, lifetime earned vs. spent, a 30-day balance line chart, an activity breakdown donut, and a paginated transaction history. Rows now link to the thing that earned or spent the credit — upvote rows go to the post, staff-pick rows to the thread, tip rows to the sender's profile.

Milestone notifications — when your lifetime earned crosses 1K / 5K / 10K / 50K / 100K, or your lifetime spent crosses 100 / 1K / 10K, you get an in-app notification.

Weekly leaderboard/leaderboard/week lists the top 25 earners over the last 7 days. Respects the existing "exclude me from leaderboards" opt-out in your profile settings. Cached 10 minutes so the GROUP BY isn't running on every refresh.

Admin economy dashboard — role 4+ get /admin/economy, which shows:

  • Total credits in circulation, active accounts, mean balance, Gini coefficient
  • 3-month flow (earned / spent / net per month)
  • 30-day earn and sink breakdowns (bar charts)
  • Top 20 earners this week
  • Anomaly flags — users earning more than 5× the weekly median, so mods have a pointer to eyeball when something looks off

Chart.js v4 is self-hosted at /js/vendor/chart.min.js — no CDN calls on these pages.

Janitor cronbin/purge-expired-perks.php drops sponsor pins, post highlights, and upvote-dedup rows older than 30 days. Run it weekly from cron (0 3 * * 0 works).

Log in or register to reply to this thread.