mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-10 16:05:49 +01:00
Merge branch 'master' of https://github.com/designcreateplay/NodeBB
This commit is contained in:
@@ -510,7 +510,6 @@ var socket,
|
||||
|
||||
var userLabel = loggedInMenu.find('#user_label');
|
||||
|
||||
if (userLabel.length) {
|
||||
if (data.userslug) {
|
||||
userLabel.find('#user-profile-link').attr('href', RELATIVE_PATH + '/user/' + data.userslug);
|
||||
}
|
||||
@@ -522,7 +521,6 @@ var socket,
|
||||
}
|
||||
|
||||
$('#logout-link').on('click', app.logout);
|
||||
}
|
||||
|
||||
updateOnlineStatus(data.uid);
|
||||
|
||||
|
||||
@@ -1217,15 +1217,26 @@ define(['composer', 'forum/pagination'], function(composer, pagination) {
|
||||
.hide()
|
||||
.fadeIn('slow');
|
||||
|
||||
// Remove the extra post-bar and "follow" button that gets added
|
||||
var postsEl = $('.posts');
|
||||
postsEl.find('.post-bar').each(function(idx, el) {
|
||||
if (idx !== 0) {
|
||||
el.parentNode.removeChild(el);
|
||||
}
|
||||
});
|
||||
postsEl.find('li.post-row[data-index]').each(function(idx, el) {
|
||||
followEl = el.querySelector('.follow');
|
||||
if (idx !== 0 && followEl) {
|
||||
followEl.parentNode.removeChild(followEl);
|
||||
}
|
||||
});
|
||||
|
||||
onNewPostsLoaded(data.posts);
|
||||
});
|
||||
}
|
||||
|
||||
function parseAndTranslatePosts(data, callback) {
|
||||
var html = templates.prepare(templates['topic'].blocks['posts']).parse(data);
|
||||
var regexp = new RegExp("<!--[\\s]*IF @first[\\s]*-->([\\s\\S]*?)<!--[\\s]*ENDIF @first[\\s]*-->", 'g');
|
||||
html = html.replace(regexp, '');
|
||||
|
||||
translator.translate(html, callback);
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +51,8 @@ var db = require('./database'),
|
||||
'tid': tid,
|
||||
'content': newContent,
|
||||
'timestamp': timestamp,
|
||||
'reputation': 0,
|
||||
'reputation': '0',
|
||||
'votes': '0',
|
||||
'editor': '',
|
||||
'edited': 0,
|
||||
'deleted': 0
|
||||
|
||||
Reference in New Issue
Block a user