A member puts points aside on a topic and everyone else grabs a random share (Discuz's 红包).
How it works
- On a topic without a packet, the author (or a moderator) gets an Open a red packet form under the replies:
a total and a number of shares. The points leave the author's balance at once. - Every other member who opens the topic sees the packet card in the topic header and a Grab a share button; one
share per member. The split is random but always leaves at least one point for every share still open. - When the shares run out the card says so. A packet nobody finishes is refunded to its author by a scheduled job
afterexpire_days.
Every movement goes through the ledger: tabre_redpacket_out, tabre_redpacket_in, tabre_redpacket_back.
| Piece | Where |
|---|---|
| Packets | plugin_tabre_redpacket_packets |
| Claims | plugin_tabre_redpacket_claims (unique on packet + member) |
| Routes | POST /t/{id}/redpacket, POST /t/{id}/redpacket/claim |
Settings
Enabled, Smallest total, Largest total, Most shares, Refund after (days).
Notes
- One packet per topic; the author cannot grab their own.
- The claiming happens inside a transaction and re-reads the packet row, so two people clicking at once can never take
the same share.
Uninstall
Disable stops new packets and hiding the card. Uninstall drops both tables.