I have installed nodebb-plugin-question-and-answer v0.7.7 on nodebb v1.13.3. but when I post a topic as question, "mark this post as correct answer" is not available. "unsolved" tag is not appearing for topic which is posted as question. Please help me with this.
How is plugin object named
-
In the docs their is an example
var MyPlugin = { myMethod: function(postData, callback) { var req = cls.get('http').req; // current http request object. var res = cls.get('http').res; // current http response object. var uid = req.user.uid; // current user id // ... }, ...
but it never says how to determine what
MyPlugin
should be for your plugin? can you use anything? or is it declared somewhere im missing? -
It should symbolize what your plugins entry-point needs to export for NodeBB.
So you could just add
module.exports = MyPlugin
at the end of the file named within plugin.json.
I admin the docs could've been better explained in this regards. Feel free to change -
Ah that makes sense thanks
Suggested Topics
-
Unsolved nodebb-plugin-question-and-answer
Plugin Development • • srujan