Skip to content

Commit 7b9e994

Browse files
authored
Merge pull request #28 from CMU-313/feat/anonymous-posting
feat: add admin setting to enable/disable anonymous posting (#9)
2 parents a23ae34 + 7119c2d commit 7b9e994

4 files changed

Lines changed: 13 additions & 2 deletions

File tree

install/data/defaults.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@
154154
"hideEmail": 0,
155155
"showFullnameAsDisplayName": 0,
156156
"allowGuestHandles": 0,
157+
"allowAnonymousPosts": 0,
157158
"guestsIncrementTopicViews": 1,
158159
"allowGuestReplyNotifications": 1,
159160
"incrementTopicViewsInterval": 60,

public/language/en-GB/admin/settings/post.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,5 +60,7 @@
6060
"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.",
6161
"ip-tracking": "IP Tracking",
6262
"ip-tracking.each-post": "Track IP Address for each post",
63-
"enable-post-history": "Enable Post History"
63+
"enable-post-history": "Enable Post History",
64+
"allow-anonymous-posts": "Allow anonymous posting",
65+
"allow-anonymous-posts-help": "When enabled, users will see a \"Post anonymously\" checkbox in the composer. Anonymous posts hide the author's identity."
6466
}

public/language/en-US/admin/settings/post.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,5 +60,7 @@
6060
"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.",
6161
"ip-tracking": "IP Tracking",
6262
"ip-tracking.each-post": "Track IP Address for each post",
63-
"enable-post-history": "Enable Post History"
63+
"enable-post-history": "Enable Post History",
64+
"allow-anonymous-posts": "Allow anonymous posting",
65+
"allow-anonymous-posts-help": "When enabled, users will see a \"Post anonymously\" checkbox in the composer. Anonymous posts hide the author's identity."
6466
}

src/views/admin/settings/post.tpl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,12 @@
118118
[[admin/settings/post:restrictions.stale-help]]
119119
</p>
120120
</div>
121+
122+
<div class="form-check form-switch mb-3">
123+
<input class="form-check-input" type="checkbox" id="allowAnonymousPosts" data-field="allowAnonymousPosts">
124+
<label for="allowAnonymousPosts" class="form-check-label">[[admin/settings/post:allow-anonymous-posts]]</label>
125+
<p class="form-text">[[admin/settings/post:allow-anonymous-posts-help]]</p>
126+
</div>
121127
</div>
122128

123129
<hr/>

0 commit comments

Comments
 (0)