@julian Thanks for getting back to me quickly. Other priorities pulled me away from this, but after looking at your response, it seems like what I'm actually after are "unread" counts, not just notifications. The simple GET solution returned notifications, but not every "unread". Our app is using the session sharing plugin, and we are associating NodeBB accounts with our app accounts. Would I be able to leverage some of the session sharing functionality to get an unread count for users on our app based on their NodeBB account? Thanks
[nodebb-plugin-quickstart] Plugin starter kit
-
A starter kit for quickly creating NodeBB plugins. Comes with a pre-setup LESS file, server side JS script with an
action:app.load
hook, and a client-side script. Most plugins need at least one of the above, so this ought to save you some time. For a full list of hooks have a look at the documentation.Fork this or copy it, and using your favourite text editor find and replace all instances of
nodebb-plugin-quickstart
withnodebb-plugin-your-plugins-name
. Change the author's name in the LICENSE and package.json files.Once you're done don't forget to publish it on NPM, and make a thread about it here.
Hello World
Really simple, just edit
static/lib/main.js
and paste inconsole.log('hello world');
, and that's it!Installation
npm install nodebb-plugin-quickstart
Screenshots
Don't forget to add screenshots!
-
-
Notice that client-side script added in plugin.json, and have not a scripts.get hook. I actived the plugin and found the client-side log "nodebb-plugin-quickstart: loaded" not print untill refreash the page.
-
@niro said:
Notice that client-side script added in plugin.json, and have not a scripts.get hook. I actived the plugin and found the client-side log "nodebb-plugin-quickstart: loaded" not print untill refreash the page.
Take back the post, it's ok, some wrong with my code.
-
@niro That's right... I encourage plugin writers to use the
scripts
property inplugin.json
over thescripts.get
hook if at all possible, as the script is then minified on production.