Harmony disabled chat modals on purpose but they will be back in 3.2.0 as a theme option. You can enable them on this forum at theme settings to test it out.
<baris>
Posts
-
Chat window in harmony -
Topic form set show preview by defaultI changed the default behavior so the preview will be visible on first open, unless it was hidden by the user or it was hidden by the admin in the acp page. [email protected]
-
SOLVED: Canonical tags hurting SEO?Please try with https://github.com/NodeBB/NodeBB/commit/4045681aa70653890db07fcd039fbab6dbc03af5 and let me know if it makes a difference, I fixed the issue where each different page used the same canonical url.
-
New theme nodebb-theme-slickThis theme is now bundled with core
-
[nodebb-plugin-webrtc] WebRTC in Chats (Video Calling)Haha awesome, time to drop google hangouts and use NodeBBCHAT :wink2:
-
Mongodb supportHey everyone,
Just letting everyone know that we merged a big branch into NodeBB on friday. This new codebase allows you to use MongoDB as the database for NodeBB.
Some people had concerns about Redis as it is an in-memory database which means you need to have enough memory to fit all your data. Now you can pick which database to use during installation(node app --setup). The installation will ask you which database to use, the options are "redis"(default) and "mongo".
For people already running on Redis this doesn't change anything but if you are just installing NodeBB you have the option to pick MongoDB.
Further down the road we might write export/import tools between Redis and MongoDB so you can switch between the two without losing data.
Now some technical details about the change for developers :
We used to have code in NodeBB that used the redis object directly as follows :
var RDB = require('./redis'); RDB.hmset('user:' + uid, userData);
Now the same functionality looks like this after the merge :
var db = require('./database'); db.setObject('user:' + uid, userData);
NodeBB's code no longer deals directly with Redis or MongoDB. We just make a call to the database object to save an object and depending on which database you picked during installation the object will be saved in Redis or MongoDB.
If you check out the contents of database.js it is very simple :
var nconf = require('nconf'), databaseType = nconf.get('database'), winston = require('winston'); if(!databaseType) { winston.info('Database type not set! Run node app --setup'); process.exit(); } var db = require('./database/' + databaseType); module.exports = db;
It reads the database type from nconf and then requires the correct database file from the database folder which can be either datatase/redis.js or database/mongo.js.
Both redis.js and mongo.js expose the same set of functions for example there is a
setObject
function in both redis.js and mongo.js :// from redis.js module.setObject = function(key, data, callback) { redisClient.hmset(key, data, function(err, res) { if(callback) { callback(err, res); } }); } // from mongo.js module.setObject = function(key, data, callback) { data['_key'] = key; db.collection('objects').update({_key:key}, {$set:data}, {upsert:true, w: 1}, function(err, result) { if(callback) { callback(err, result); } }); }
All NodeBB sees is the
setObject(key, data, callback)
method which takes a key and data and saves it in the respective database.Since we started out with Redis we make use of the special Redis data structures namely hash, set, sorted set and list. All the functions exposed from the database files implement these data structures.
You can check out redis.js here and mongo.js here.
So hopefully this will be useful for people who want to use another database than Redis. Another cool thing is if we decide to add another database let's say CouchDB, all we have to do is add couch.js into the database folder and implement the same interface. Add it as an option in the install steps and there is no need to change any code in NodeBB itself.
Let us know what you think.
-
mongodb single collection?When we first started out we only used redis, mongodb support was added later on. Redis does not have a collection system like mongodb everything is stored as key/value pairs. So the mongodb code mimics that.
For example when you delete a key from the database you do
db.delete('keyname');
if we were to use multiple collections we would have to check each collection to search for that key name. This also applies to stuff like renaming keys as well. The database system doesn't know anything about users/posts/categories, all of these are stored as objects.If you look through the mongodb code here https://github.com/NodeBB/NodeBB/tree/master/src/database/mongo you will see it just provides a redis like interface for stuff like hashes, sets, sorted sets and so on.
Performance wise, on mongodb 2.6 and lower updates do block reads on the same collection so on a write heavy forum mongodb performance isn't great but this is being addressed in mongodb 2.8 which will bring document level locking so updating a document will not lock the entire collection.
-
[nodebb-theme-lavender] Lavender Theme for NodeBBUpdating this theme to bootstrap5 for nodebb 3.x as well.
-
[nodebb-widget-essentials] Essential WidgetsUpdated this plugin to include a search widget. Latest version 5.0.5.
-
0.7.0 Breaking ChangesHook changes
Filter
filter:topic.get
see this commitfilter:topic.thread_tools
see this commitfilter:post.save
changed tofilter:post.edit
when editing a post. see this commitfilter:templates.get_config
andfilter:templates.get_virtual
removed.filter:search.query
parameters changed, see this commit
Other changes
- app.uid and friends are removed see this commit. Please use app.user.uid from now on.
- All templates in widget-essentials has been moved to a subfolder called
widgets
. see this commit - Home.tpl has been renamed to categories.tpl see this commit
settings.language
has been renamed tosettings.userLang
to match the config see this commit- Updates to search system, upgrading to 0.7.0 requires clearing and reindexing content from the appropriate search plugin.
- the _key, value index changed to a unique/sparse index. Only affects mongodb.
posts.getPostsByTid
renamed toposts.getPostsFromSet
, first param removed.
TBD
-
How to add header bookmarks link?If you want a link to the current users bookmarks you can put this in the url.
/user/_self_/bookmarks
the_self_
part gets replaced by the logged in user's userslug. -
How to create a "New Topic" button in headerThis will be available in 3.2.0.
app.newTopic({ cid: 2, // optional title: 'fooo', // optional tags: ['foo1', 'foo2'], // optional body: 'some content here', // optional }); app.newReply({ tid: 2, //required pid: 10, //optional body: 'some content here', // optional });
The old versions will still work for backwards compatibility.
feat: allow more params to app.newTopic/newReply 路 NodeBB/NodeBB@325c195
Node.js based forum software built for the modern web - feat: allow more params to app.newTopic/newReply 路 NodeBB/NodeBB@325c195
GitHub (github.com)
-
[nodebb-plugin-reactions] Reactions plugin for NodeBBI forked the plugin to https://github.com/NodeBB-Community/nodebb-plugin-reactions, @Antosik can send the PR there then I will merge and publish as
@nodebb/nodebb-plugin-reactions
-
Who is browsing? -
dropdown in navigation?This is on master now, should be able to put in much larger dropdowns in nav items. Will be available with 1.19.0.
-
[nodebb-plugin-user-level] Bug: badge dissapearThis plugin is forked to https://github.com/NodeBB-Community/nodebb-plugin-user-level
Latest version is 1.0.0 and its scoped to @nodebb now.Install with
npm i @nodebb/nodebb-plugin-user-level
. Let me know if you encounter any issues. -
1.18.0 Breaking ChangesNodeBB no longer supports NodeJS 10 and below!
NodeBB no longer supports Internet Explorer!Please see the following issues for breaking changes to plugins and themes.
If you have plugins that are affected, please update your plugin and add the below to your package.json
"nbbpm": { "compatibility": "^1.18.0" }
-
In nodeBB how to display last five participants avatar in topic list pageYou can use the sorted set
tid:<tid>:posters
for this. It stores the user ids who have made posts in the topic and the score is how many posts they have. Use thefilter:topics.get
hook and add the users with most posts in the topic to each topic object like below.myPlugin.filterTopicsGet = async (hookData) => { // get the posters of the topics const keys = hookData.topics.map(t => `tid:${t.tid}:posters`); const posters = await db.getSortedSetsMembers(keys); // get the uniq uids const uniqUids = _.uniq(_.flatten(posters)); // load the data for the uniq uids const userData = await users.getUsersFields(uniqUids, ['username', 'userslug', 'picture']); const uidToUserData = _.zipObject(uniqUids, userData); // set the 'posters' field on each topic hookData.topics.forEach((t, index) => { const posterUids = posters[index].reverse().slice(0, 4); t.posters = posterUids.map(uid => uidToUserData[uid]); }); return hookData; };
This will create a
posters
field on each topic object and you can use it in yourtopics_list.tpl
template. -
[nodebb-plugin-dev-tracker] Dev Tracker PluginThis is a "Dev Tracker" plugin, usually found on gaming forums where you can see posts & topics from certain groups.
Once installed and activated you can configure which groups to display in the ACP page of the plugin. The plugin creates a new route at
/dev-tracker
and displays a feed of posts from the users who are members of those groups.To make the page accessible don't forget to add a navigation item that goes to
/dev-tracker
Source & Issues: https://github.com/NodeBB/nodebb-plugin-dev-tracker
-
January 2023 Developer Update@phenomlab said in January 2023 Developer Update:
@baris @julian Is there any way to disable the skin switcher in Harmony (I know you can prevent the user from setting their own skin in settings, but it seems this has no effect on the switcher itself as it can still be used, and skins selected). My code will place a dropdown on the panel in the same location, and will effectively replace the functionality.
disableCustomUserSkins option ignored by harmony skin switcher 路 Issue #11167 路 NodeBB/NodeBB
Node.js based forum software built for the modern web - disableCustomUserSkins option ignored by harmony skin switcher 路 Issue #11167 路 NodeBB/NodeBB
GitHub (github.com)