Mark topics as not safe for work and keep their content covered until a reader chooses to see it.
What it does
- The topic author, moderators and administrators get a Mark NSFW button in the topic action bar. Pressing it again removes the mark. The route is a POST with the normal CSRF protection and redirects back to the topic.
- Lists show a solid red NSFW pill after the title. The flags of all rows are loaded in one batch query (
topic_list.rows), never one query per row. - On the topic page a warning banner appears below the title with a Show content button. Until it is pressed, every
.post-contenton the page is blurred (default) or hidden, according to the setting. The CSS also covers the page before JavaScript runs, and a small bundled script adds the fallback classes and handles the click. - The flag is stored in
plugin_tabre_nsfw_flags, one row per topic, with the member who set it and the time.
Settings
Admin → Plugins → NSFW
- Cover style —
Blur the content(default) orHide the content. Both show the same banner and reveal button.
Notes
- The action is visible only to the topic author and the staff, and the route checks the same rule again.
- No query runs inside a loop region; the topic page uses one query in
topic.view, and lists use one batch query. - Only the plugin's own table is created. Uninstalling the plugin drops it.
- The NSFW pill uses
var(--radius-pill)and the solidvar(--danger)colour, so it stays a filled rounded pill in every theme.