From 7119c2d1bf71dff5253320c6c7aaf0210592e04d Mon Sep 17 00:00:00 2001
From: JoshuaNam
Date: Tue, 3 Feb 2026 04:18:51 +0000
Subject: [PATCH] feat: add admin setting to enable/disable anonymous posting
(#9)
---
install/data/defaults.json | 1 +
public/language/en-GB/admin/settings/post.json | 4 +++-
public/language/en-US/admin/settings/post.json | 4 +++-
src/views/admin/settings/post.tpl | 6 ++++++
4 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/install/data/defaults.json b/install/data/defaults.json
index 2f733961ea..e26bbe856d 100644
--- a/install/data/defaults.json
+++ b/install/data/defaults.json
@@ -154,6 +154,7 @@
"hideEmail": 0,
"showFullnameAsDisplayName": 0,
"allowGuestHandles": 0,
+ "allowAnonymousPosts": 0,
"guestsIncrementTopicViews": 1,
"allowGuestReplyNotifications": 1,
"incrementTopicViewsInterval": 60,
diff --git a/public/language/en-GB/admin/settings/post.json b/public/language/en-GB/admin/settings/post.json
index e000f6b10b..bd0c71eafc 100644
--- a/public/language/en-GB/admin/settings/post.json
+++ b/public/language/en-GB/admin/settings/post.json
@@ -60,5 +60,7 @@
"backlinks.help": "If a post references another topic, a link back to the post will be inserted into the referenced topic at that point in time.",
"ip-tracking": "IP Tracking",
"ip-tracking.each-post": "Track IP Address for each post",
- "enable-post-history": "Enable Post History"
+ "enable-post-history": "Enable Post History",
+ "allow-anonymous-posts": "Allow anonymous posting",
+ "allow-anonymous-posts-help": "When enabled, users will see a \"Post anonymously\" checkbox in the composer. Anonymous posts hide the author's identity."
}
\ No newline at end of file
diff --git a/public/language/en-US/admin/settings/post.json b/public/language/en-US/admin/settings/post.json
index b6324c68bf..39286d95b0 100644
--- a/public/language/en-US/admin/settings/post.json
+++ b/public/language/en-US/admin/settings/post.json
@@ -60,5 +60,7 @@
"backlinks.help": "If a post references another topic, a link back to the post will be inserted into the referenced topic at that point in time.",
"ip-tracking": "IP Tracking",
"ip-tracking.each-post": "Track IP Address for each post",
- "enable-post-history": "Enable Post History"
+ "enable-post-history": "Enable Post History",
+ "allow-anonymous-posts": "Allow anonymous posting",
+ "allow-anonymous-posts-help": "When enabled, users will see a \"Post anonymously\" checkbox in the composer. Anonymous posts hide the author's identity."
}
\ No newline at end of file
diff --git a/src/views/admin/settings/post.tpl b/src/views/admin/settings/post.tpl
index d361597946..5167e9707d 100644
--- a/src/views/admin/settings/post.tpl
+++ b/src/views/admin/settings/post.tpl
@@ -118,6 +118,12 @@
[[admin/settings/post:restrictions.stale-help]]
+
+