mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-16 13:30:23 +01:00
This commit is contained in:
@@ -139,5 +139,6 @@
|
||||
"showAverageApprovalTime": true,
|
||||
"autoApproveTime": 0,
|
||||
"maxUserSessions": 10,
|
||||
"useCompression": 0
|
||||
"useCompression": 0,
|
||||
"updateUrlWithPostIndex": 1
|
||||
}
|
||||
@@ -65,6 +65,7 @@
|
||||
"restrict-chat": "Only allow chat messages from users I follow",
|
||||
"outgoing-new-tab": "Open outgoing links in new tab",
|
||||
"topic-search": "Enable In-Topic Searching",
|
||||
"update-url-with-post-index": "Update url with post index while browsing topics",
|
||||
"digest-freq": "Subscribe to Digest",
|
||||
"digest-freq.off": "Off",
|
||||
"digest-freq.daily": "Daily",
|
||||
|
||||
@@ -133,7 +133,7 @@
|
||||
|
||||
"enable_topic_searching": "Enable In-Topic Searching",
|
||||
"topic_search_help": "If enabled, in-topic searching will override the browser's default page search behaviour and allow you to search through the entire topic, instead of what is only shown on screen",
|
||||
|
||||
"update_url_with_post_index": "Update url with post index while browsing topics",
|
||||
"scroll_to_my_post": "After posting a reply, show the new post",
|
||||
|
||||
"follow_topics_you_reply_to": "Watch topics that you reply to",
|
||||
|
||||
@@ -37,6 +37,9 @@ Settings:
|
||||
topicSearchEnabled:
|
||||
type: boolean
|
||||
description: Enable keyword searching within topics
|
||||
updateUrlWithPostIndex:
|
||||
type: boolean
|
||||
description: Update url with post index while browsing topics
|
||||
categoryTopicSort:
|
||||
type: string
|
||||
description: Default sorting strategy of the topics in a category
|
||||
|
||||
@@ -388,6 +388,8 @@ get:
|
||||
type: number
|
||||
scrollToMyPost:
|
||||
type: boolean
|
||||
updateUrlWithPostIndex:
|
||||
type: boolean
|
||||
allowMultipleBadges:
|
||||
type: boolean
|
||||
privateUploads:
|
||||
|
||||
@@ -227,7 +227,7 @@ define('forum/topic', [
|
||||
updateUserBookmark(index);
|
||||
|
||||
Topic.replaceURLTimeout = 0;
|
||||
if (history.replaceState) {
|
||||
if (ajaxify.data.updateUrlWithPostIndex && history.replaceState) {
|
||||
var search = window.location.search || '';
|
||||
if (!config.usePagination) {
|
||||
search = (search && !/^\?page=\d+$/.test(search) ? search : '');
|
||||
|
||||
@@ -81,6 +81,7 @@ topicsController.get = async function getTopic(req, res, callback) {
|
||||
topicData.postEditDuration = meta.config.postEditDuration;
|
||||
topicData.postDeleteDuration = meta.config.postDeleteDuration;
|
||||
topicData.scrollToMyPost = settings.scrollToMyPost;
|
||||
topicData.updateUrlWithPostIndex = settings.updateUrlWithPostIndex;
|
||||
topicData.allowMultipleBadges = meta.config.allowMultipleBadges === 1;
|
||||
topicData.privateUploads = meta.config.privateUploads === 1;
|
||||
topicData.rssFeedUrl = relative_path + '/topic/' + topicData.tid + '.rss';
|
||||
|
||||
@@ -58,6 +58,7 @@ module.exports = function (User) {
|
||||
settings.upvoteNotifFreq = getSetting(settings, 'upvoteNotifFreq', 'all');
|
||||
settings.restrictChat = parseInt(getSetting(settings, 'restrictChat', 0), 10) === 1;
|
||||
settings.topicSearchEnabled = parseInt(getSetting(settings, 'topicSearchEnabled', 0), 10) === 1;
|
||||
settings.updateUrlWithPostIndex = parseInt(getSetting(settings, 'updateUrlWithPostIndex', 1), 10) === 1;
|
||||
settings.bootswatchSkin = validator.escape(String(settings.bootswatchSkin || ''));
|
||||
settings.homePageRoute = validator.escape(String(settings.homePageRoute || '')).replace(///g, '/');
|
||||
settings.scrollToMyPost = parseInt(getSetting(settings, 'scrollToMyPost', 1), 10) === 1;
|
||||
@@ -116,6 +117,7 @@ module.exports = function (User) {
|
||||
followTopicsOnReply: data.followTopicsOnReply,
|
||||
restrictChat: data.restrictChat,
|
||||
topicSearchEnabled: data.topicSearchEnabled,
|
||||
updateUrlWithPostIndex: data.updateUrlWithPostIndex,
|
||||
homePageRoute: ((data.homePageRoute === 'custom' ? data.homePageCustom : data.homePageRoute) || '').replace(/^\//, ''),
|
||||
scrollToMyPost: data.scrollToMyPost,
|
||||
upvoteNotifFreq: data.upvoteNotifFreq,
|
||||
|
||||
@@ -299,6 +299,13 @@
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="checkbox">
|
||||
<label class="mdl-switch mdl-js-switch mdl-js-ripple-effect">
|
||||
<input class="mdl-switch__input" type="checkbox" data-field="updateUrlWithPostIndex">
|
||||
<span class="mdl-switch__label"><strong>[[admin/settings/user:update-url-with-post-index]]</strong></span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>[[admin/settings/user:digest-freq]]</label>
|
||||
<select class="form-control" data-field="dailyDigestFreq">
|
||||
|
||||
Reference in New Issue
Block a user