In that case you would want to run a one time script to ignore those categories for all users.
First make a backup of your database, then place the below script in your nodebb root folder. After that modify the cidsToIgnore
array and add the category ids you want ignored. Once you run it those categories will be ignored for all users. Keep in mind you still need a plugin that watches for new users and ignore those categories if you don't want them to do it manually.
/*globals require, console, process */
'use strict';
var nconf = require('nconf');
var async = require('async');
nconf.file({
file: 'config.json'
});
nconf.defaults({
base_dir: __dirname,
views_dir: './build/public/templates',
});
var db = require('./src/database');
db.init(function(err) {
if (err) {
console.log("NodeBB could not connect to your database. Error: " + err.message);
process.exit();
}
ignoreCategories(function (err) {
if (err) {
console.error(err);
process.exit();
}
console.log('done');
process.exit();
});
});
function ignoreCategories(callback) {
var batch = require('./src/batch');
batch.processSortedSet('users:joindate', function (uids, next) {
ignoreCategory(uids, next);
}, function (err) {
callback(err);
});
}
function ignoreCategory(uids, callback) {
const now = Date.now();
const cidsToIgnore = []; // add the cids that will be ignore to this array
const sets = uids.map(uid => 'uid:' + uid + ':ignored:cids');
async.eachSeries(cidsToIgnore, function (cid, next) {
db.sortedSetsAdd(sets, now, cid, next);
}, callback);
}
For some more info about the database take a look at https://github.com/NodeBB/NodeBB/wiki/Database-Structure