Problem with widget plugin
-
Just verifying that you activated the plugin and then restarted NodeBB?
-
@psychobunny Yup, activated plugin in admin panel and hit the Restart NodeBB button. (also tried forever restart)
-
I see a couple of syntax errors in your code, can you try this please?
Widget Fix for @thesbros
Widget Fix for @thesbros. GitHub Gist: instantly share code, notes, and snippets.
Gist (gist.github.com)
- you're missing an opening bracket before function right at the top (although maybe you copy paste error)
- you forgot to define async, fs, and path but you use that to pull the templates
-
@psychobunny Still isn't working http://puu.sh/7bll8.png
-
You should be getting error messages when you run it with node app.js, at least I was getting these errors at first when I tried running your code
My guess is maybe your template files aren't uploaded or you're pointing to the wrong path?
-
@psychobunny I was running the version without the opening bracket with node app.js and didn't get any errors, so I guess it's not printing errors or something.
-
Maybe you're running on production? or maybe the error only happens when you attempt to activate the plugin. I got this just from running
node app
and trying to activate the plugin -
@psychobunny Ah, did ./nodebb dev, and look what popped up:
warn: [plugins] Plugin 'mcpartyzone' not found
How would I fix that?
(plugin is called mcpartyzone btw) -
@psychobunny Ah, figured it out, in the plugin.json I called the plugin "mcpartyzone" where it was actually called "nodebb-plugin-mcpartyzone". Now it works, thanks for the help!
-
ahaha okay looking forward to seeing what this mcpartyzone plugin is all about
-
@psychobunny It's a plugin for a Minecraft server website I am developing. (switching over from Enjin)