Skip to content

NodeBB Plugins

Discussion regarding NodeBB Plugin development.

1.8k Topics 15.0k Posts
Most Voted Plugins

Subcategories


  • Have a question about building a plugin? Ask here
    424 Topics
    2k Posts
    barisB

    https://community.nodebb.org/post/88242 I think this answers your question. Let me know if it doesn't work.

  • Need a plugin developed? Ask here!
    222 Topics
    1k Posts
    barisB

    Plugin doesn't show usernames if they set their status to offline AFAIK

  • Activate plugins through CLI and use of proxy

    3
    1 Votes
    3 Posts
    3k Views
    P

    @Ron looks like it is not working. reported here

    https://github.com/NodeBB/NodeBB/issues/4252

  • 0 Votes
    4 Posts
    4k Views
    julianJ

    Is this for a hook of some sort? Please paste the entire function, and which hook you're subscribing to...

  • 0 Votes
    2 Posts
    2k Views
    yariplusY

    for is synchronous, so you will need to require the async library. That library has an async.each() function which is an asynchronous version of forEach.

    You will want to read up on it here.
    https://github.com/caolan/async#each

    var async = require.main.require('async'); function doLast(){ console.log(" STRING "); } var array = [a, b, c]; async.each(array, function(value, next){ // The value is sent here, not the index, if you really need the index, you can use forEachOf() or do array.indexOf(value). db.getObject(------,function(err,returnData){ //in this method modify string in some way console.log("METHOD"); // Call next() to let the the app know that the async operation is complete. next(); }); // When all async operations are complete, run doLast. }, doLast);
  • 0 Votes
    1 Posts
    1k Views
    D

    I obtain this error when I try to access to category but the google console don't give me some details but only that the error is:
    "Cannot read property 'locked' of null"

    nodebb.min.js:25243 Uncaught TypeError: Cannot read property

    at this line:
    helpers.generateTopicClass = function(topic) {
    var style = [];
    //at this line
    if (topic.locked) {
    style.push('locked');
    }

    if (topic.pinned) { style.push('pinned'); } if (topic.deleted) { style.push('deleted'); } if (topic.unread) { style.push('unread'); } return style.join(' '); };

    I think is for the async.waterfall call because
    function(data,callback){
    async.waterfall([
    function(next){
    //someOperation
    next(null,topic);

    }],function(err,topic){
    data.category.topics = topic.concat(data.category.topics);
    });

    Anyone can help me?

  • 0 Votes
    8 Posts
    2k Views
    P

    @Jenkler there is a guide to add languages to plugins

    404 Not Found

    favicon

    (docs.nodebb.org)

  • 0 Votes
    6 Posts
    3k Views
    julianJ

    Thanks for providing much needed assistance @frissdiegurke 😄

    Welcome to the land of plugin creation @Doppy !!

  • 4 Votes
    8 Posts
    4k Views
    julianJ

    @Jenkler said:

    when to use ./ and when not to?

    To answer your earlier inquiry... in general it should be safe to use both. When paths are passed in plugin configs, we run them through path.join to remove relative relations and double slashes, etc. In all cases (exceptions are bugs), the path should be relative from the plugin directory itself.

  • Error installing nodebb-widget-ns-stats

    7
    0 Votes
    7 Posts
    2k Views
    N

    @rspk should be resolved 😉

    Link Preview Image Users restore: null object · Issue #2 · NicolasSiver/nodebb-widget-ns-stats

    NodeBB's module User.getUserData can produce null objects. Plugin should filter them. Issue is related to user deletion.

    favicon

    GitHub (github.com)

  • 1 Votes
    15 Posts
    8k Views
    jareyJ

    @psychobunny said:

    I think the most recent one this would be good for is 0.8.x, we since revamped our menu system to lazy load instead so that made this one incompatible. Ping me again if I haven't looked at this by end of next week

    ping @psychobunny :bowtie:

  • 0 Votes
    2 Posts
    2k Views
    yariplusY

    in the client, those values are stored in ajaxify.data

    For your jQuery, you don't append a closing tag, it does that automatically. When you want to insert the element into the div, you need to use appendTo(). Also, unless your label has additional data, I recommend using html() instead of text().

    Here's a fiddle. I also added an ID to the new label so it isn't added more than once.
    https://jsfiddle.net/bdLgsj7p/

  • 0 Votes
    11 Posts
    3k Views
    P

    Yup, that's how we built it. Although it might be an idea to add a hook so you can just do it programmatically rather than via templating

  • 0 Votes
    1 Posts
    922 Views
    M

    Dear Nodearati

    Bulk registration
    Can anyone recommend a plugin that allows me to bulk load bb members and optionally register them into a group?

    Alternatively if I was to write a specification is there anyone who would be interested in developing such an plugin using Write-API as the basis.

    Thanks in advance
    DM

  • Groups as Subdomains via plugin?

    7
    0 Votes
    7 Posts
    3k Views
    faddatF

    @PitaJ

    You could do that, it's true. That said I'd like to kinda shunt people away from NginX. To hell with it and its antiquated ways. (okay okay, that is harsh-- it's very good at what it does and most likely it will continue doing that even a decade from now.)

    Anyway, try out Caddy. I use Caddy in front of my web applications, which I run in the wonderful isolation of Docker containers, and caddy slaps an automatically generated SSL/TLS cert on them, yay! If you're running without encryption, you no longer have any excuse. Both Caddy and Let's Encrypt have made trivial work out of the previously quite harsh process of getting your site secured.

  • 2 Votes
    8 Posts
    4k Views
    pennyfxP

    I just installed it with 0.9.3 and it doesn't appear to work. It never created an es index, but search results were still coming back.

  • 0 Votes
    3 Posts
    1k Views
    R

    I may commission the Nodebb team for this work. I have been in contact with @julian regarding it.

  • how to delete data when plugin is disabled

    4
    0 Votes
    4 Posts
    2k Views
    yariplusY

    Make sure you have a good reason for doing this. Someone may remove a plugin and reinstall it at a later date, and still want their old settings. Right now this is how it works by default.

  • Create custom route in plugin

    2
    0 Votes
    2 Posts
    3k Views
    yariplusY

    You define routes in your load hook. So your library.js might look like this:

    var Plugin = module.exports = {}; Plugin.load = function (params, callback) { var router = params.router; var middleware = params.middleware; // Define the function that renders the custom route. function render(req, res, next) { // Get whatever data you want to send to the template here. var data = {whatever: 33}; // This is the path to your template without the .tpl, relative to the templates directory in plugin.json var template = 'templatename' // Send the page to the user. res.render(template, data); } // This actually creates the routes, you need two routes for every page. // The first parameter is the actual path to your page. router.get('/yourpage', middleware.buildHeader, render); router.get('/api/yourpage', render); callback(); };

    And your plugin.json would look something like this:

    { "library": "library.js", "hooks": [ { "hook": "static:app.load", "method": "load" } ], "templates": "./public/templates", "staticDirs": { "public": "public" } }

    and you would have a template here:
    /nodebb-plugin-yourplugin/public/templates/templatename.tpl

    <h2>My Awesome Custom Page</h2> The Magic Number is: {whatever}

    I'm pretty sure I posted about this before, with more details even. Have to start using those canned responses. 🌹

  • 1 Votes
    3 Posts
    2k Views
    S

    Has anyone looked at this plugin recently? Is it still working or being supported? Would love to be using it.

  • Plugin for jsbin embed or jsfiddle embed ?

    7
    0 Votes
    7 Posts
    3k Views
    agusputraA

    I have update the repo and add support for jsBin : https://github.com/agusputra/nodebb-plugin-jsfiddle

    Screenshot:
    0_1453628768590_screencapture-yukoding-xyz-topic-19-test-jsfiddle-jsbin-embed-1453626915797.png

  • 0 Votes
    2 Posts
    1k Views
    A

    I believe there are widgets for each of those!

    However, I'd implore you to consider information density- Most users are scared off by even too many categories- putting all that on the landing page will bounce a lot of users!