[nodebb-plugin-reputation-rules] Reputation Rules Plugin for NodeBB
-
@zandertrek Yes, I'd use it also. Wonder if @TheBronx is still active here ? Since he hasn't posted since 2016 (in this thread), perhaps not. Maybe, we could ask @baris or @julian if they are perhaps willing to update it ?
-
I haven't updated the plugin in a while. It's been a year since I spent some time on it, maybe this branch is more "compatible" but I found a bug while developing that feature and ran out of time so it was never merged: https://github.com/exo-do/nodebb-plugin-reputation-rules/pull/6
Handling the logs, so that each vote is registered with the amount of reputation added/substracted to both the voter and the autor of the post, was quite complex. And then undoing votes. And then handling opposite votes (undo current vote and then handle the opposite vote). And testing it hehe.
I can try again and see how it goes, hopefully plugins haven't changed too much since v1.13
-
@thebronx Awesome - thanks ! If it helps, the current version throws this in the log
2021-09-09T15:50:00.663Z [4567/164128] - error: Error: Cannot find module './database' Require stack: - /home/sudonix/nodebb/src/plugins/index.js - /home/sudonix/nodebb/src/meta/configs.js - /home/sudonix/nodebb/src/meta/index.js - /home/sudonix/nodebb/src/start.js - /home/sudonix/nodebb/require-main.js - /home/sudonix/nodebb/app.js at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15) at Function.Module._load (node:internal/modules/cjs/loader:778:27) at Module.require (node:internal/modules/cjs/loader:1005:19) at Object.<anonymous> (/home/sudonix/nodebb/node_modules/nodebb-plugin-reputation-rules/library.js:4:24) at Module._compile (node:internal/modules/cjs/loader:1101:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Module.require (node:internal/modules/cjs/loader:1005:19) at require (node:internal/modules/cjs/helpers:94:18)
-
@phenomlab said in [nodebb-plugin-reputation-rules] Reputation Rules Plugin for NodeBB:
@thebronx Awesome - thanks ! If it helps, the current version throws this in the log
2021-09-09T15:50:00.663Z [4567/164128] - error: Error: Cannot find module './database' Require stack: - /home/sudonix/nodebb/src/plugins/index.js - /home/sudonix/nodebb/src/meta/configs.js - /home/sudonix/nodebb/src/meta/index.js - /home/sudonix/nodebb/src/start.js - /home/sudonix/nodebb/require-main.js - /home/sudonix/nodebb/app.js at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15) at Function.Module._load (node:internal/modules/cjs/loader:778:27) at Module.require (node:internal/modules/cjs/loader:1005:19) at Object.<anonymous> (/home/sudonix/nodebb/node_modules/nodebb-plugin-reputation-rules/library.js:4:24) at Module._compile (node:internal/modules/cjs/loader:1101:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Module.require (node:internal/modules/cjs/loader:1005:19) at require (node:internal/modules/cjs/helpers:94:18)
Yep, that was solved in that old PR.
I have the plugin running in the latest version of NodeBB locally, not much has changed since last time.Gonna try and debug the thing with reversing votes cause I am not sure why it didn't work last time. If it works I can release a new version today.
-
v1.2.0 has been published
Not much has changed:- Added compatibility with NodeBB v1.18.2
- Fixed a bug where "Max upvote weight" and "Max downvote weight" were actually being used as a min, instead of a max
- I've removed the "Reload" button from the settings panel as that is no longer required for the changes to apply
I should probably remove the setting "Max downvotes per day" as that is now supported by NodeBB out of the box, or maybe try and change the main setting from the plugin instead of having two different values doing the same.
But for now it will stay. You can just set it to zero in one place and the configure the other, not that big of a deal.Let me know if everything works.
-
I am excited to try this out. At the moment I don't know how to install it. I see only the old version still. Please advise. Here is a screenshot of what I'm seeing.
-
@zandertrek let me try changing compatibility to 1.18.0 instead of 1.18.2, cause you are not using the latest NodeBB one.
I have published v1.2.1 with that and a couple more changes to the admin panel.
If you cannot see the new version you can also install the plugin manually with:
npm install [email protected]
And then activate it on your admin panel, rebuild and restart.Not sure if there is a way to refresh the list of plugins when you search cause I think those are cached and that is why new versions don't appear immediately.
-
@thebronx I get an error after enabling this plugin then posting
Internal Error. Oops! Looks like something went wrong! /api/topic/22/reputation-system-update/1 Cannot read properties of undefined (reading 'pid')
Not sure if this is related to the plugin or not, but I'm going to disable and see if that makes any difference
-
@phenomlab said in [nodebb-plugin-reputation-rules] Reputation Rules Plugin for NodeBB:
@thebronx I get an error after enabling this plugin then posting
Internal Error. Oops! Looks like something went wrong! /api/topic/22/reputation-system-update/1 Cannot read properties of undefined (reading 'pid')
Not sure if this is related to the plugin or not, but I'm going to disable and see if that makes any difference
Well, it's not this plugin, but it seems the case of this issue is
nodebb-plugin-question-and-answer
! Disabled that, and everything works as expected. -
Where do I enter commands such as
$ npm install random-plugin
? Is there a terminal window somewhere like in Linux? -
@zandertrek said in [nodebb-plugin-reputation-rules] Reputation Rules Plugin for NodeBB:
Where do I enter commands such as
$ npm install random-plugin
? Is there a terminal window somewhere like in Linux?If you don't know where, that is a good reason not to try hehe. If you installed NodeBB yourself, you have a server you can SSH in and thus go to the folder where NodeBB was installed to run the command.
If you did not install it yourself, and thus are using a managed instance, then you probably cannot run commands.
The thing is, I don't know why you cannot see the v1.2.1 that was released yesterday. And I don't see a "refresh" button somewhere to refresh the list of available plugins.
Maybe @baris or @julian know this: why does he see v1.1.3 instead of v1.2.1 of nodebb-plugin-reputation-rules?
Is there a cache that we have to refresh? Is there something wrong with my package.json?Edit:
He is running nodebb 1.18.1
I uploaded v1.2.0 yesterday with compatibility^1.18.2
Then uploaded v1.2.1 with compatibility^1.18.0
Not sure if that has anything to do with the issue.Thank you
-
@thebronx v1.2.1 appeared in the plug-ins list. I "installed" it. But it did not show up in my INSTALLED plug-ins list. I went back to the FIND PLUG-INS list and, behold, v1.2.2 was there but v1.2.1 was gone. So I installed v1.2.2 which does show up in my INSTALLED list. However, it seems to be incompatible with my NodeBB v1.18.1 which is understandable (I see no settings for the plug-in, but the standard REPUTATION AND FLAGS settings are completely grayed out and don't accept changes).
Am I correct in thinking that is not compatible, or are the settings located somewhere I am not looking?
-
@zandertrek have you activated the plugin after installing it?
v1.2.2 is compatible, should work fine, I have been doing some refactoring in the code to make it easier to maintain, no additional functionality compared to v1.2.1Settings should be under Plugins -> Reputation Rules
-
@zandertrek This occurs more often than one may imagine among newer users so don't feel bad if you missed it.
@thebronx said in [nodebb-plugin-reputation-rules] Reputation Rules Plugin for NodeBB:
have you activated the plugin after installing it?
-
@zandertrek said in [nodebb-plugin-reputation-rules] Reputation Rules Plugin for NodeBB:
After a considerable learning process, I have v1.2.2 up and running well. Thanks to @TheBronx for reviving this great plug-in. I feel it adds another dimension to the forum experience.
I am glad you find it useful! Feel free to report any issues you may find.
Thank you!
-
@thebronx said in [nodebb-plugin-reputation-rules] Reputation Rules Plugin for NodeBB:
I should probably remove the setting "Max downvotes per day" as that is now supported by NodeBB out of the box, or maybe try and change the main setting from the plugin instead of having two different values doing the same.
But for now it will stay. You can just set it to zero in one place and the configure the other, not that big of a deal.I see that the plugin overlaps with standard settings in two places:
- Minimum reputation to downvote posts
- Max downvotes per user per day
-
@zandertrek said in [nodebb-plugin-reputation-rules] Reputation Rules Plugin for NodeBB:
I see that the plugin overlaps with standard settings in two places:
- Minimum reputation to downvote posts
- Max downvotes per user per day
yep, I still don't know how to approach this problem
On one side, I like to have all the reputation settings on the same screen
On the other hand, it makes no sense to have two settings controlling the same thing, potentially conflictingShould I remove the duplicated settings from the plugin?
Should I try and leave them but mirroring the configured values of the original ones? Not sure I can do this.For now you can just use the setting you like the most, and leave the other one to zero (I think) to disable it.