Yeah I think having a folder under public/uploads/profile for each user would make deleting easier. We can get rid of the glob and delete that folder on user deletion. But we would have to write an upgrade script to move all files and update the path in the user object since they are stored as "/assets/uploads/profile/1-profileavatar-1709738685611.jpeg"
<baris>
Posts
-
Performance insights of NodeBB -
Performance insights of NodeBB@Tomáš-Nesrovnal Yeah that makes sense with a ton of files in that folder that could slow things down, we would have to track the cover and profile upload filenames for each user.
-
Performance insights of NodeBBI guess it depends on the user being deleted. A lot of the code in user deletion is async db calls though so there isn't alot of code there that blocks the nodejs event loop. You should take a look at your db utiliization while user delete is happening and see if that's the problem.
-
Last group owner able to rescind ownership leaving group ownerless, but code was intended to disallow such action -
Themeing... Started with Quickstart got some bad results@Chad-Augur for local development, you can use
npm link
to link your theme into your node_modules and usegrunt
to automatically rebuild when you make changes to tpl or scss files. Once you are done with dev you can npm publish it. -
Total vote count on topic listYeah it should display in vote order on /top, it doesn't affect /popular, I have a fix for it in https://github.com/oplik0/nodebb-plugin-total-vote-count/pull/24 but it will require 3.7.2 which will come tomorrow.
-
Total vote count on topic list@phenomlab what is the url on the page it doesn't work? Is it just
/top
or does it have any query params? -
NodeBB 3.7.1You can probably use this
ul.topics-list li.deleted .meta { display: grid!important; }
-
Upgrade from v1.19.x to v2.0.x failedMight be better to try going to the last stable version of 2.x which is 2.8.17, also you don't need the
./nodebb build
before./nodebb upgrade
../nodebb upgrade
needs to runnpm install
to upgrade all the dependencies first so the build will probably fail if it runs before that. -
Registration email domain blacklistingPlugin updated to work on 3.2.0 and up, latest version is 3.0.0.
-
nodebb-widget-board-stats UpdatePlugin doesn't show usernames if they set their status to offline AFAIK
-
hiding "moved" badge from topic listI added a selector to it like pinned and the others https://github.com/NodeBB/nodebb-theme-harmony/commit/34d7545ab2d58c28f47f088569076c485d97d84d.
You can target that and hide if you want with your css.
-
NodeBB 3.7.1Yeah use a specific date in unixtimestamp for Last logged in time and join date. For days registered you can use 365.
-
Performance insights of NodeBBYou need monitor cpu/ram usage and network traffic. What version of nodebb are you running? 3.7.0 had a memory leak that was fixed in 3.7.1. Make sure you are on that version. If you have lots of traffic you will have to run multiple nodebb processes and load balance with a proxy.
-
codes for the skinsThe css for these are coming from https://bootswatch.com/, you can find them in
nodebb/node_modules/bootswatch/dist
-
NodeBB 3.7.1Days registered unit is days
Last logged in time and join date are unix timestamps in milliseconds -
Total vote count on topic list@phenomlab maybe try with below
/* eslint-disable no-await-in-loop */ /* globals require, console, process */ 'use strict'; const nconf = require('nconf'); nconf.file({ file: 'config.json', }); nconf.defaults({ base_dir: __dirname, views_dir: './build/public/templates', upload_path: 'public/uploads', }); const db = require('./src/database'); db.init(async (err) => { if (err) { console.log(`NodeBB could not connect to your database. Error: ${err.message}`); process.exit(); } await fixVotes(); console.log('done'); process.exit(); }); async function fixVotes() { const batch = require('./src/batch'); await batch.processSortedSet('topics:tid', async (tids) => { let topicData = await db.getObjectsFields( tids.map(tid => `topic:${tid}`), ['tid', 'cid', 'timestamp', 'upvotes', 'downvotes'] ); topicData = topicData.filter(t => t && t.cid); topicData.forEach((t) => { t.votes = parseInt(t.upvotes || 0, 10) - parseInt(t.downvotes || 0, 10); }); await db.sortedSetAddBulk( topicData.map(t => ([`cid:${t.cid}:tids:votes`, t.votes, t.tid])) ); await db.sortedSetAddBulk( topicData.map(t => ([`topic:votes`, t.votes, t.tid])) ); }, { batch: 500, }); }
-
Total vote count on topic list@phenomlab I fixed the script in the above post, also made some changes to the plugin so it doesn't run the calculation on every page load. https://github.com/oplik0/nodebb-plugin-total-vote-count/pull/21
It will only calculate the total vote count if it is missing so any loads after that will use the cached value. Hopefully that improves performance.
-
Total vote count on topic list@phenomlab you can run below script in your nodebb folder to reset to the old scores.
/* eslint-disable no-await-in-loop */ /* globals require, console, process */ 'use strict'; const nconf = require('nconf'); nconf.file({ file: 'config.json', }); nconf.defaults({ base_dir: __dirname, views_dir: './build/public/templates', upload_path: 'public/uploads', }); const db = require('./src/database'); db.init(async (err) => { if (err) { console.log(`NodeBB could not connect to your database. Error: ${err.message}`); process.exit(); } await fixVotes(); console.log('done'); process.exit(); }); async function fixVotes() { const batch = require('./src/batch'); await batch.processSortedSet('topics:tid', async (tids) => { let topicData = await db.getObjectsFields( tids.map(tid => `topic:${tid}`), ['tid', 'cid', 'timestamp', 'upvotes', 'downvotes'] ); topicData = topicData.filter(t => t && t.cid); topicData.forEach((t) => { t.votes = parseInt(t.upvotes, 10) - parseInt(t.downvotes, 10); }); await db.sortedSetAddBulk( topicData.map(t => ([`cid:${t.cid}:tids:votes`, t.votes, t.tid])) ); await db.sortedSetAddBulk( topicData.map(t => ([`topic:votes`, t.votes, t.tid])) ); }, { batch: 500, }); }
-
Total vote count on topic listNo the code in the plugin runs whenever you load a list of topics to calculate the votes count displayed. Instead of displaying the normal value it is calculating total votes from each post in the topic. So yeah topics with 30k posts might slow things down but I haven't tested it.