Skip to content

Plugin Development

Have a question about building a plugin? Ask here
426 Topics 1.9k Posts
  • action:categories.loaded only on infite scroll

    1
    0 Votes
    1 Posts
    1k Views
    R

    Hi!

    I want to alter the category listings, namely the links to each topic.
    There I noticed that action:categories.loaded|loading both trigger on scrolling, only. Neither on the initial visit (when loading the first X topics) nor when pagination is used.

    I am about to use an ajaxify hook and check for the url; just want to make sure that there's no other, maybe better way to do this, is there?
    I wouldn't need any data, just to know the fact, that the user is in a category/topic listing.

    edit:
    Uhm; noones signature is showing in posts. Did I miss that before?

    Thanks šŸ™‚
    ršŸŗ

  • 0 Votes
    1 Posts
    1k Views
    FidelixF

    First of all, I'm new to NodeJS development. I'm liking it so far (except for a few annoyances here and there).

    I am extending development of nodebb-plugin-import-ipboard (forked and will send a PR once it's done) to support a bunch of stuff the current plugin does not currently support, for instance:

    IPB replies which are in a special blockquote format. Spoiler blocks Mentions A few more things...

    On my nodebb-plugin-import-ipboard/index.js file, which I'm requiring from a manual test.js file (so it's not running inside NodeBB!), I placed a:
    var db = require('nodebb-plugin-import/server/db');

    But when I try to use it like this:
    var imported_post = db.getObject("_imported_post:1566");
    I just get "undefined".
    I can see on the debugger variables Redis is loaded (but I don't know if it was loaded correctly.)

    I also tried loading data instead of db:
    var data = require('nodebb-plugin-import/server/data');
    and
    var imported_post = data.getImportedPost("1566");

    And I just get undefined.
    Can someone tell me what I'm doing wrong?

  • Hosted Plugins

    9
    0 Votes
    9 Posts
    3k Views
    snodejokeS

    @julian Sorry, hadn't seen that you hadn't got a private npm account to play around with!

    @psychobunny That's a really good idea, it's actually how I've been testing separate projects that use my privately hosted modules currently, before publishing the updates to the npm account.

    It would be great if support came out the box at some point though šŸ™‚

  • Strange encoding issue

    8
    0 Votes
    8 Posts
    3k Views
    hekH

    Yepp.. I convert it back after parsing manipulating the url.

  • Client actions for posts

    5
    0 Votes
    5 Posts
    3k Views
    R

    @pitaj
    Boy, that was quick! Thanks šŸ™‚

  • API: Groups

    Solved
    6
    0 Votes
    6 Posts
    4k Views
    N

    Created a small plugin, to have access to all groups - https://community.nodebb.org/topic/4591/nodebb-plugin-ns-api-ns-api-extended

  • External Login to NodeBB

    2
    0 Votes
    2 Posts
    3k Views
    N

    Ok, question is closed šŸ˜‰
    I have created plugin for my needs

  • Changing outbound urls

    8
    0 Votes
    8 Posts
    3k Views
    JenklerJ

    Now it works! @psychobunny plz check it out and do a code review if you have the time šŸ˜‰

  • Extending routes into the write api plugin

    3
    0 Votes
    3 Posts
    2k Views
    snodejokeS

    Thanks a lot. This should save me loads of time! šŸ™‚

  • Navigation Header

    6
    0 Votes
    6 Posts
    3k Views
    P

    Hmm. That might make sense, maybe on plugin activate it appends to end and on deactivate it removes it

  • Trying to use the "action:connected" hook

    17
    0 Votes
    17 Posts
    6k Views
    P

    That's in my area, PM me details maybe I'll come swing by

  • Can't find constants in meta.config

    4
    0 Votes
    4 Posts
    3k Views
    julianJ

    meta.config contains settings from NodeBB itself. Plugins retrieve their own settings via the settings module on the client side.

    In the case of quickstart, you can retrieve the settings the same way the settings are retrieved in the plugin's ACP page, with Settings.load

  • ACP: JavaScript

    21
    0 Votes
    21 Posts
    10k Views
    julianJ

    @pichalite try this šŸ˜„

    Link Preview Image Dropbox error - 'echo 100000 | sudo tee / proc/sys/fs/inotify/max_user_watches'

    Dropbox gives me an error that mentions echo tee 100000 but then it disappears. How to fix or remove msg?

    favicon

    Ask Ubuntu (askubuntu.com)

  • Load clientside script depending on route

    4
    0 Votes
    4 Posts
    2k Views
    ExclE

    See: https://github.com/kurt-stolle/nodebb-plugin-exclserver/blob/master/templates/exclserver/servers.tpl

    Why does the <script> tag sometimes not load after rendering the page?

  • Overriding local login

    1
    1 Votes
    1 Posts
    1k Views
    R

    Hello,

    How to use action:auth.overrideLogin hook? what arguments are needed (or at least where to find such information)?
    Assume we have function magic() which performs authentication. How would the rest of code look like? How to obtain credentials?

    Any help highly appreciated šŸ™‚

  • Upload API

    1
    0 Votes
    1 Posts
    1k Views
    N

    I will need upload functional in future plugin.
    Is there any Upload API already in NodeBB ready for plugins use?
    I would like to use ready to use solution, if any, before I will do it myself šŸ˜‰

  • 0 Votes
    5 Posts
    3k Views
    N

    My case is to provide text-area for the user in ACP, so user for example can "change template" of rendering list item.

    For example one possible solution:

    Store template markup in settings, and ask user to reload NodeBB. In static:load use file system instruments to rewrite template.

    But I'm not happy with such solution šŸ˜‰

  • Alter Profile with a Plugin

    2
    0 Votes
    2 Posts
    2k Views
    N

    Good news, that we don't need to add filter, there is filter for user profile: filter:user.account
    But what is about static template?

  • JS Minification

    2
    0 Votes
    2 Posts
    2k Views
    N

    Same problem again...

    Actions that I have made to 'fix' this problem:

    Disable single plugin ./nodebb reset plugin="nodebb-widget-essentials" - No Success Disable all plugins - No Success Drop all collections in Mongo, and ./nodebb setup - No Success Delete nodebb.min.js from public directory - No Success Delete all public subdirectories that could be found in .gitignore - No Success Delete public directory and checkout latest from current branch - Success

    Maybe it will give you some insights šŸ˜‰

  • Get UID

    3
    0 Votes
    3 Posts
    2k Views
    Moritz FriedrichM

    Inside of the client script... Anyway, I just restarted NodeBB and tried it again, it works fine now šŸ™‚ Thank you!