Skip to content

Node.js based forum software built for the modern web

up themes

barisusakli9e44bd3d2198
diff --git a/package.json b/package.json
index e0e8bf8b71..7eb551e233 100644
--- a/package.json
+++ b/package.json
@@ -53,8 +53,8 @@
"nodebb-plugin-spam-be-gone": "0.4.5",
"nodebb-rewards-essentials": "0.0.8",
"nodebb-theme-lavender": "3.0.9",
- "nodebb-theme-persona": "4.0.98",
- "nodebb-theme-vanilla": "5.0.55",
+ "nodebb-theme-persona": "4.0.99",
+ "nodebb-theme-vanilla": "5.0.56",
"nodebb-widget-essentials": "2.0.8",
"nodemailer": "2.0.0",
"nodemailer-sendmail-transport": "1.0.0",
diff --git a/public/src/client/topic/posts.js b/public/src/client/topic/posts.js
index 3eff5a03b5..f534aefad5 100644
--- a/public/src/client/topic/posts.js
+++ b/public/src/client/topic/posts.js
@@ -33,12 +33,12 @@ define('forum/topic/posts', [
ajaxify.data.postcount ++;
postTools.updatePostCount(ajaxify.data.postcount);
- if (config.scrollToMyPost) {
- if (config.usePagination) {
- onNewPostPagination(data);
- } else {
- onNewPostInfiniteScroll(data);
- }
+ if (ajaxify.data.scrollToMyPost) {
+ if (config.usePagination) {
+ onNewPostPagination(data);
+ } else {
+ onNewPostInfiniteScroll(data);
+ }
}
};
@@ -142,7 +142,7 @@ define('forum/topic/posts', [
}
data.slug = ajaxify.data.slug;
-
+
$(window).trigger('action:posts.loading', {posts: data.posts, after: after, before: before});
app.parseAndTranslate('topic', 'posts', data, function(html) {
diff --git a/src/controllers/topics.js b/src/controllers/topics.js
index 68a3b18415..27c0ed5b81 100644
--- a/src/controllers/topics.js
+++ b/src/controllers/topics.js
@@ -4,7 +4,6 @@
var async = require('async');
var S = require('string');
var nconf = require('nconf');
-var validator = require('validator');
var user = require('../user');
var meta = require('../meta');
@@ -24,6 +23,7 @@ topicsController.get = function(req, res, callback) {
var currentPage = parseInt(req.query.page, 10) || 1;
var pageCount = 1;
var userPrivileges;
+ var settings;
if ((req.params.post_index && !utils.isNumber(req.params.post_index)) || !utils.isNumber(tid)) {
return callback();
@@ -62,7 +62,7 @@ topicsController.get = function(req, res, callback) {
return helpers.redirect(res, url);
}
- var settings = results.settings;
+ settings = results.settings;
var postCount = parseInt(results.topic.postcount, 10);
pageCount = Math.max(1, Math.ceil((postCount - 1) / settings.postsPerPage));
@@ -261,6 +261,7 @@ topicsController.get = function(req, res, callback) {
data['reputation:disabled'] = parseInt(meta.config['reputation:disabled'], 10) === 1;
data['downvote:disabled'] = parseInt(meta.config['downvote:disabled'], 10) === 1;
data['feeds:disableRSS'] = parseInt(meta.config['feeds:disableRSS'], 10) === 1;
+ data.scrollToMyPost = settings.scrollToMyPost;
data.rssFeedUrl = nconf.get('relative_path') + '/topic/' + data.tid + '.rss';
data.pagination = pagination.create(currentPage, pageCount);
data.pagination.rel.forEach(function(rel) {