How can i set badges on most likes and most replies
-
Hi
I am looking for a plugin where i can set badges to user depends upon like numbers and most replies . Could you please suggest me any plugin for this or the way how can i do this ?
-
@vijay-kumavat Try
@nodebb/nodebb-plugin-user-level
-
@phenomlab , Thank you sir
I will check this one.
-
@phenomlab , Sir, So using this plugin i can set user levels depends on their reputations. This is fine. Now I am looking something like any user post on specific topic then increase in Topic author Reputation.
Ex:
Topic having replies >= 10 => Add Reputation points in Topics Author Account.
Topic having Votes >= 10 => Add Reputation points in Topics Author Account.
Topic having Views >= 10 => Add Reputation points in Topics Author Account.any hint for this ?
-
@vijay-kumavat I've not tested this, but there is
nodebb-rewards-essentials
- you may need to install from the CLI usingnpm install nodebb-rewards-essentials
or perhaps even fromgit
usingnpm install git+https://github.com/NodeBB/nodebb-rewards-essentials
I do not know if this will work on v3, but if not, then perhaps @baris or @julian can help?
-
nodebb-rewards-essentials
This Plugin is not compatible with my version of NodeBB 3.1.3 -
@vijay-kumavat It's been upgraded to support v3.2.0, so you'll need to use the CLI and install as below
npm install [email protected]
-
I am trying to add this code in custom plugin file =>
library.js
fileFor every reply should add reputation point in Topic author.
'use strict'; var Topics = require.main.require('./src/topics'); var User = require.main.require('./src/user'); var meta = require.main.require('./src/meta'); var reputationPoints = 1; // Number of reputation points to award per reply var plugin = {}; plugin.postReply = async function (payload) { var tid = payload.topic.tid; var topic = await Topics.getTopicFields(tid, ['uid']); await User.incrementUserReputationBy(topic.uid, reputationPoints); // Increase reputation points by the specified amount }; module.exports = plugin;
But no luck..