The task center of a classic forum, after Discuz's 任务中心: staff define small goals, members see their progress on
/tasks, and the points arrive by themselves when a goal is reached.

What it does

  • Two periods. Daily tasks start over every day at midnight (site time); one-time tasks can be completed once per
    member. One row per task, member and period, so a double click cannot count twice.
  • Four events. A task can count new topics, replies, likes given and sign-ins. A topic that waits in the review
    queue counts on approval, when it becomes public.
  • Automatic rewards. When the target is reached the task is marked done and its points go to the ledger
    (points_add(), reason tabre_tasks). The done flag is claimed with an atomic update, so two racing requests pay once.
  • A page for members. /tasks shows the daily and one-time lists with progress bars, the rewards and a small
    summary (today, one-time, task points this month).
  • A tile and a link. The task center appears as a tile on /points and a flag in the Community sidebar group; both
    can be switched off in the plugin settings.
  • Nothing to claim by hand. A finished task shows a "Done" badge; a flash message names the task and its reward.

For staff

Admin → Plugins → Task center lists every task with its event, target, reward and an on/off switch. The drawer
edits a task:

FieldMeaning
Title, DescriptionWhat the member sees on /tasks
EventPost a new topic, write a reply, like a post, sign in
TargetHow many times the event has to happen
RewardPoints paid once when the task is done (0 = no points)
PeriodDaily (resets at midnight) or once (per member)
OrderLower numbers come first
EnabledHidden from members when off

Data and safety

  • Tables: plugin_tabre_tasks_task (definitions) and plugin_tabre_tasks_progress (progress), with a unique index on
    (task_id, user_id, period_key).
  • Deleting a task deletes its progress rows; the points already paid stay in the ledger.
  • Progress hooks run inside the core's save request, so they use the request cache and a handful of indexed queries.
  • No core files are changed; the page is a plugin route, the tile and the link come from the documented regions.