mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
feat: #4456
This commit is contained in:
@@ -116,6 +116,7 @@
|
||||
"hideEmail": 0,
|
||||
"allowGuestHandles": 0,
|
||||
"guestsIncrementTopicViews": 1,
|
||||
"allowGuestReplyNotifications": 1,
|
||||
"incrementTopicViewsInterval": 60,
|
||||
"recentMaxTopics": 200,
|
||||
"disableRecentCategoryFilter": 0,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"handles": "Guest Handles",
|
||||
"settings": "Settings",
|
||||
"handles.enabled": "Allow guest handles",
|
||||
"handles.enabled-help": "This option exposes a new field that allows guests to pick a name to associate with each post they make. If disabled, they will simply be called \"Guest\"",
|
||||
"topic-views": "Topic views",
|
||||
"topic-views.enabled": "Allow guests to increase topic view counts"
|
||||
"topic-views.enabled": "Allow guests to increase topic view counts",
|
||||
"reply-notifications.enabled": "Allow guests to generate reply notifications"
|
||||
}
|
||||
@@ -187,12 +187,14 @@ module.exports = function (Topics) {
|
||||
user.setUserField(uid, 'lastonline', Date.now());
|
||||
}
|
||||
|
||||
if (parseInt(uid, 10) || meta.config.allowGuestReplyNotifications) {
|
||||
Topics.notifyFollowers(postData, uid, {
|
||||
type: 'new-reply',
|
||||
bodyShort: translator.compile('notifications:user_posted_to', postData.user.username, postData.topic.title),
|
||||
nid: 'new_post:tid:' + postData.topic.tid + ':pid:' + postData.pid + ':uid:' + uid,
|
||||
mergeId: 'notifications:user_posted_to|' + postData.topic.tid,
|
||||
});
|
||||
}
|
||||
|
||||
analytics.increment(['posts', 'posts:byCid:' + data.cid]);
|
||||
plugins.fireHook('action:topic.reply', { post: _.clone(postData), data: data });
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<!-- IMPORT admin/partials/settings/header.tpl -->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-2 col-xs-12 settings-header">[[admin/settings/guest:handles]]</div>
|
||||
<div class="col-sm-2 col-xs-12 settings-header">[[admin/settings/guest:settings]]</div>
|
||||
<div class="col-sm-10 col-xs-12">
|
||||
<form role="form">
|
||||
<div class="checkbox">
|
||||
@@ -14,9 +14,6 @@
|
||||
[[admin/settings/guest:handles.enabled-help]]
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-sm-2 col-xs-12 settings-header">[[admin/settings/guest:topic-views]]</div>
|
||||
<div class="col-sm-10 col-xs-12">
|
||||
<form role="form">
|
||||
<div class="checkbox">
|
||||
<label class="mdl-switch mdl-js-switch mdl-js-ripple-effect">
|
||||
@@ -25,6 +22,14 @@
|
||||
</label>
|
||||
</div>
|
||||
</form>
|
||||
<form role="form">
|
||||
<div class="checkbox">
|
||||
<label class="mdl-switch mdl-js-switch mdl-js-ripple-effect">
|
||||
<input class="mdl-switch__input" type="checkbox" data-field="allowGuestReplyNotifications">
|
||||
<span class="mdl-switch__label"><strong>[[admin/settings/guest:reply-notifications.enabled]]</strong></span>
|
||||
</label>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user