TabRe Items (props centre)
Buy items with the forum's points and use them on a topic — the idea Discuz! calls 道具中心. It turns the points
balance into actions: a sink against inflation, and a new way for members to interact with their own topics.
The items
| Effect | What it does |
|---|---|
highlight | Paints the topic title a colour for N hours (stored in the topic's meta, so a list pays no extra query). |
sticky | Pins the topic to the top for N hours; the scheduled job unpins it. |
bump | Raises the topic to the top of the list right now (a one-off). |
close | Locks the topic for N hours. |
reopen | Unlocks a locked topic right now. |
The catalogue is a setting, so the admin adds, removes or reprices items without touching code:
key|Name|price|effect|hours|icon|#colour|description
highlight|Highlight|50|highlight|72|palette|#e11d48|Paints the topic title for 3 dayshours 0 makes the item a one-off.
Icons
The icon field takes three things:
- a built-in icon name —
pin,lock,palette,star,flame,rocket,coin,crown,gift,medal,clock,heart,bolt… (seeicon_paths()); - a picture in this plugin's
assets/icons/— write the file name (crown.png); - an emoji (
emoji:🔥).
Shipping with the plugin: highlight.png, sticky.png, bump.png, close.png, reopen.png (used by the default
catalogue) plus crown.png, potion.png, gift.png, rocket.png, medal.png ready for new items. Drop your own PNG
into plugins/tabre_props/assets/icons/ and name it in the catalogue — no upload, no settings change.
Icons: Free Icon Pack by gvesster — used under its licence (commercial use
allowed; credit appreciated). Its licence text is kept at assets/icons/LICENSE-icons.txt.
Where it shows up
- /props — the shop and your bag (also a tile on /points and a link in the left menu);
- Items button on the topic bar, listing what you hold (a topic you started, or any topic for a moderator);
- Admin → Plugins → Items: hand items to a member (with a member picker), or end a running effect.
How it is put together
| Piece | Where |
|---|---|
| Catalogue | plugin setting items |
| Bag | plugin_tabre_props_stock (unique on user + item) |
| Running effects | plugin_tabre_props_effects (with an end time) |
| Highlight colour | topic meta key tabre_props_highlight |
Buying spends points through points_add() under the reason tabre_props, so it appears in the member's history with a
readable label and its own icon. The scheduled job (expire, every 5 minutes) ends whatever is due and clears empty bag
rows. Other plugins can listen to tabre_props.used (topic, item, effect, user).
Uninstall
Disable leaves the shop dark and the effects in place (the highlight stays until it expires). Uninstall drops the
bag and the effects table.