i told @big_steve, that this community was always very helpful to us while migrating our basketball related online discussion site (32,098 registered users, 2,717,824 posts in 135,032 threads, voluntary driven) from custom made to nodeBB some years ago. he joined our admin-team because of some really annoying performance issues. it would be great if some of you @nodebb-development could help him getting a basic understanding of how to optimize our setup for better performance. thanks.
murcs
Posts
-
Slow Queries in MongoDB -
nodebb-widget-board-stats Update@crazycells said in nodebb-widget-board-stats Update:
@murcs you have a nice light/dark switch for v3. would you mind sharing the codes for this?
sorry for the delay. i was a bit out of order =;^) the dark mode switch for harmony was original posted by @brazzerstop – i just tweaked it to fit our needs.
-
3.0.0 Bug Report Threadnext thing: if a
user
becomes flaged for the second (or more?) time, thenotification
shows the first and not the lastuser
who reported. ... and while we are at this topic: we would love to see thetarget
pointing to thepost
it came from with the last report and not to the flaggeduser
or both. [v3.2.3] -
[harmony] topic title in sticky-tools bar@Teemberland said in [harmony] sticky topic:
we are currently using this in v2. Love this! I read the title of this post and thought this was the main thread for Harmony questions because it shows 'sticky'. I just misunderstood it. I'll create a separate thread for my question.
oooh. you are absolutely right. my fault. i’ll change the topic title.
-
[harmony] topic title in sticky-tools bari share your doubts. i’m afraid adding/removing skins and all the following has nothing to do with showing the
topic title
on thesticky-tools
bar on top of the screen. -
[harmony] clickable teaser in topic-listslooks good. impatiently waiting for v3.3.0 now =;^) thank you.
-
3.0.0 Bug Report Threadoooh. stupid me! confused by localisation. sorry. ... and thank you for your patience.
-
3.0.0 Bug Report Threadhm. as one of the admins of our site i’m not aware, where to grant the permission
admin:users
to theglobal moderators
group in the UI. -
[harmony] topic title in sticky-tools bar@baris said in [harmony] sticky topic:
Do you mean showing the current topic title in the sticky-tools on mobile? Maybe something like below can work when you scroll down the topic title appears instead of the buttons. And if you scroll up the buttons show up.
brilliant. this would be much more than expected. maybe one can touch the sticky-tools and the buttons appear too? =;^)
-
[harmony] clickable teaser in topic-listshej.
another feature request (and the last for today): it would be great to have the have the full
lastpost background-link-container
in topic-lists clickable. at the moment each interactive object inside the teaser area is clickable but leads to the respective linked URL. especially on mobile users expect to get to the last post of a topic when clicking the teaser area. at the moment they have to click on the smalldate
andtime
area which is linked to the last post of the topic. if they miss this sweat spot, they get the user profile of the poster or whatever link is shown in the teaser.needless to say, we have really a lot of fun with nodeBB v3 and harmony. thanx a lot!
ober!schöne grüße,
m. -
[harmony] topic title in sticky-tools barhej.
when scrolling down, the users loose their topic. especially on mobile. especially on long threads with hundreds or thousands of posts (and pagination switched
off
on top). is there any chance to add some small hint on thesticky-tools
bar on top of the screen? it would take some space but it would help a lot on the other hand.ober!schöne grüße,
m. -
3.0.0 Bug Report Threadunless i’ve missed some privilege setting,
global moderators
can not be assigned to aflagged user
whileadministrators
can.flagged posts
are fine. [nodeBB v3.2.3][harmony 1.0.65] -
[nodebb-widget-board-stats] discrepancy to dashboard count@DownPW said in [nodebb-widget-board-stats] discrepancy to dashboard count:
any news @murcs ?
i just digged a little deeper for you: „our“
/var/www/nodebb/node_modules/nodebb-widget-board-stats/library.js
looks like this'use strict'; const async = require('async'); const nconf = module.parent.require('nconf'); const db = require.main.require('./src/database'); const user = require.main.require('./src/user'); const utils = require.main.require('./src/utils'); const socketPlugins = require.main.require('./src/socket.io/plugins'); const socketRooms = require.main.require('./src/socket.io/admin/rooms'); let app; const Widget = module.exports; Widget.init = function (params, callback) { app = params.app; callback(); }; socketPlugins.boardStats = {}; socketPlugins.boardStats.get = function (socket, tid, callback) { getWidgetData(callback); }; function addDots(text) { return String(text).replace(/(\d)(?=(\d\d\d)+(?!\d))/g, '$1.'); }; function getWidgetData(callback) { async.parallel({ global: function (next) { db.getObjectFields('global', ['topicCount', 'postCount', 'userCount'], next); }, latestUser: getLatestUser, activeUsers: getActiveUsers, onlineUsers: Widget.updateAndGetOnlineUsers, activeWithin24h: function (next) { var now = Date.now(); db.sortedSetCount('users:online', now - 86400000, '+inf', next); }, }, function (err, results) { if (err) { return callback(err); } var data = { within24h: results.activeWithin24h, count: addDots(results.onlineUsers.onlineCount + results.onlineUsers.guestCount), members: addDots(results.onlineUsers.onlineCount), guests: addDots(results.onlineUsers.guestCount), list: joinUsers(results.activeUsers), posts: addDots(results.global.postCount ? results.global.postCount : 0), topics: addDots(results.global.topicCount ? results.global.topicCount : 0), registered: addDots(results.global.userCount ? results.global.userCount : 0), latest: joinUsers(results.latestUser), relative_path: nconf.get('relative_path'), mostUsers: { date: (new Date(parseInt(results.onlineUsers.timestamp, 10))).toDateString(), total: results.onlineUsers.total, }, }; callback(null, data); }); } function getActiveUsers(callback) { async.waterfall([ function (next) { user.getUidsFromSet('users:online', 0, 19, next); }, function (uids, next) { user.getUsersFields(uids, ['username', 'userslug', 'status'], next); }, ], function (err, data) { if (err) { return callback(err); } data = data.filter(function (a) { return a.status === 'online'; }); callback(err, data); }); } function getLatestUser(callback) { async.waterfall([ function (next) { user.getUidsFromSet('users:joindate', 0, 0, next); }, function (uids, next) { user.getUsersWithFields(uids, ['username', 'userslug'], 0, next); }, ], callback); } function joinUsers(usersData) { var str = []; for (var i = 0, ii = usersData.length; i < ii; i++) { str.push('<a href="' + nconf.get('relative_path') + '/user/' + usersData[i].userslug + '">' + usersData[i].username + '</a>'); } return str.join(', '); } Widget.updateAndGetOnlineUsers = function (callback) { callback = typeof callback === 'function' ? callback : function () {}; async.waterfall([ function (next) { next(null, socketRooms.getLocalStats().onlineRegisteredCount); }, function (onlineCount, next) { socketRooms.getTotalGuestCount(function (err, guestCount) { if (err) { return next(err); } next(null, { onlineCount: parseInt(onlineCount, 10), guestCount: parseInt(guestCount, 10), }); }); }, function (users, next) { db.getObjectFields('plugin:widget-board-stats', ['total', 'timestamp'], function (err, data) { if (err) { return next(err); } var totalUsers = users.onlineCount + users.guestCount; data.timestamp = data.timestamp || Date.now(); if (parseInt(data.total || 0, 10) <= totalUsers) { data.timestamp = Date.now(); data.total = totalUsers; db.setObject('plugin:widget-board-stats', data); } data.onlineCount = users.onlineCount; data.guestCount = users.guestCount; return next(null, data); }); }, ], callback); }; Widget.renderWidget = function (widget, callback) { getWidgetData(function (err, data) { if (err) { return callback(err); } app.render('widgets/board-stats', data, function (err, html) { if (err) { return callback(err); } widget.html = html; callback(null, widget); }); }); }; Widget.defineWidgets = function (widgets, callback) { var widget = { widget: 'board-stats', name: 'Board Stats', description: 'Classical board stats widget in real-time.', content: 'admin/board-stats', }; app.render(widget.content, {}, function (err, html) { widget.content = html; widgets.push(widget); callback(err, widgets); }); };
which corresponds with our localized version of
/var/www/nodebb/node_modules/nodebb-widget-board-stats/public/templates/widgets/board-stats.tpl
<div component="widget/board-stats" class="widget-board-stats" style="border: 1px solid #999"> <h3 style="background: #666; font-size: 15px; font-weight: 500">Folgende Nutzende sind gerade online: <a href="{config.relative_path}/users?section=online">[komplette Liste]</a></h3> <p> Davon sind aktuell <strong component="widget/board-stats/count">{count}</strong> Nutzende aktiv (<strong component="widget/board-stats/members">{members}</strong> Registrierte + <strong component="widget/board-stats/guests">{guests}</strong>Gäste).<br /> <span style="display: block; line-height: 0.5em" > </span> <span component="widget/board-stats/list">{list}</span> <span style="display: block; line-height: 0.5em" > </span> In den letzten 24 Stunden waren <strong component="widget/board-stats/within24h">{within24h}</strong> verschiedene Nutzende eingeloggt. </p> <h3 style="background: #666; font-size: 15px; font-weight: 500">Forum-Statistik</h3> <p> Unsere aktiven registrierten Mitglieder haben <strong component="widget/board-stats/posts">{posts}</strong> Beiträge zu <strong component="widget/board-stats/topics">{topics}</strong> Themen verfasst –<strong component="widget/board-stats/registered">{registered}</strong> Mitglieder sind bei <em>schoenen-dunk.de</em> registriert.<br /> <span style="display: block; line-height: 0.5em" > </span> <span component="widget/board-stats/latest">{latest}</span> ist unser neuestes Mitglied. Herzlich Willkommen!<br /> <span style="display: block; line-height: 0.5em" > </span> Am {mostUsers.date} waren <strong>{mostUsers.total}</strong> Nutzende gleichzeitig online. </p> </div>
well. i hope this helps a bit.
ober!schöne grüße,
m. -
nodebb-widget-board-stats Updateas far as i know, it’s not necessary. it’s still up and running at our site. it was a caching-problem after updating our tester. (sorry for not reporting.)
-
[nodebb-widget-board-stats] discrepancy to dashboard countit’s fixed. but after two and 1/2 years i do not remember how. unfortunately.
-
Chat Room NodeBB3.2.2unfortunately we have. but i’m afraid it’s something on our side.
we have a second system which should be on the same level of configuration but is not at the moment – after upgrading from v2.something to v3.2 last week. on the test system – also upgraded to v3.2.3 with harmony v1.0.65 now – the chat on desktop looks fine. next week i will copy the config from our main to the tester and check the chat from time to time while configuring. maybe i find the part which seems to disturb the loading of the chat.
-
Chat Room NodeBB3.2.2thanx for your instant reply.
-
Chat Room NodeBB3.2.2hej.
in nodeBB v3.2.2 with harmony v1.0.66 on desktop (macos chrome + firefox) a reload is needed to scroll through all conversations.
ober!schöne grüße,
m. -
[harmony] menu expand/collapse on both sidesthanx again for the quick fix.
-
[harmony] menu expand/collapse on both sidesme again. i’m sorry. it looked like fine. clicking the sidebars expanded and closed both as expected. but the navigation links on the left side are disabled. hovering works. the referenced URLs are shown fine BUT not followed after clicking. no problems found with the navigation sidebar on the right.