Skip to content

Plugin Development

Have a question about building a plugin? Ask here
424 Topics 1.9k Posts
  • Shoutbox for latest nodebb

    11
    0 Votes
    11 Posts
    1k Views
    NikolaiPatrushevN

    @DownPW Yeap, but there a lot more then simply to put an IRC, i spent like whole day to figure everything out, neither i recommend to go my route, because you basically need to setup servers and this means a lot of maintenance work in future.

  • Display Group Badge On Topic List?

    13
    1 Votes
    13 Posts
    960 Views
    patsanchP

    Thanks baris! We'll keep this for reference 🙂

  • override Helper method in Harmony child theme

    6
    0 Votes
    6 Posts
    348 Views
    S

    I couldnt figure it out…. And ended up using a client side hook instead to add my class that way. It’s not as pretty… as there’s a slight delay before the class is added, but I may try again when I find some more time to hack away at it

  • NodeBB Poll Plugin - v3

    Moved
    4
    0 Votes
    4 Posts
    337 Views
    phenomlabP

    @baris sorry for delay. Seems to work fine.

  • Hook suggestion

    3
    0 Votes
    3 Posts
    220 Views
    Irfan BabarI

    @julian no I m not using session sharing because I need to use client specific endpoints, so if you can tell me which hook is best for check token authorization, it will be helpful

  • NodeBB plugin is active but not installed

    Unsolved
    2
    1 Votes
    2 Posts
    265 Views
    julianJ

    Can you take a look at the runtime logs (sorry, I'm not fluent with Docker) and see what happens at the CMD node ./nodebb activate nodebb-plugin-my-plugin; node ./nodebb build; node ./nodebb start -l step?

    It sounds like maybe when ./nodebb start -l is run, NodeBB is doing another dependency install, which can happen if it detects some dependencies as out of date. That would effectively clobber your plugin that was copied into node_modules/

  • 0 Votes
    2 Posts
    273 Views
    barisB

    See this topic for breaking changes in 1.19.0 https://community.nodebb.org/post/86172. You can rename middleware.authenticateOrGuest to middleware.authenticateRequest

  • 1 Votes
    7 Posts
    390 Views
    dave1904D

    @baris said in Exclude ignored Topics from Recent Topics widget (nodebb-widget-essentials):

    Do you have category ids defined in the widget settings?

    Yes I do, that makes it clear.

    I'm thinking about the best way to implement your mentioned filtering.

    for(int i = 0; i < cids.length; i++) { const isIgnored = await categories.isIgnored(cids[i], widget.uid); for(int j = i; j < isIgnored.length; j++) { if(isIgnored[j]) { // remove from cids array? } } }

    I know there is an Array.filter() function so I'm pretty sure there is a better/easier way?

  • 0 Votes
    6 Posts
    368 Views
    barisB

    Please open an issue on our github tracker, I am not sure if we should just remove the saving to user settings in the sort dropdown all together and move the sort settings to /user/<slug>/settings like everything else. Then you can change the sort order in every topic without effecting your settings. The setting used in the user page would be the default sort when you enter a topic.

  • Unread Count on Custom Navigation Item Icon

    Solved
    2
    0 Votes
    2 Posts
    195 Views
    yasasY

    Update:

    Was able to sort this with a client script.
    Example usage:
    plugin.json -> { "hook": "filter:navigation.available", "method": "addNavigation" }
    plugin.json -> "scripts": [ "static/lib/client-script.js",... ],

    library.js addNavigation:
    append the following to the hookData object:

    { route: '<some route>', title: <some title>, id: 'unread-count', iconClass: '<some icon> custom-class-name', text: <some title> }

    client-script.js:
    $("#unread-count .custom-class-name").attr("data-content",<unread count>)

  • Unread Topics - View

    Solved
    7
    0 Votes
    7 Posts
    417 Views
    yasasY

    Hi @baris
    I missed this somehow.

    Thank you! This is great news. I was creating a custom page but this solves the issue. Thanks very much!

  • Middleware - Correct Usage

    Solved
    10
    0 Votes
    10 Posts
    728 Views
    julianJ

    Wonderful! 😄 Glad to help.

  • Schedule / Cron Service in NodeBB

    3
    0 Votes
    3 Posts
    269 Views
    yasasY

    @baris Brilliant! I'll take a look at this. Thanks as always!

  • hide favicon counter

    4
    1 Votes
    4 Posts
    372 Views
    Sebastián CisnerosS

    @baris it worked perfectly. Thanks.

  • Plugin styling not applied when not installed via ACP

    Solved
    3
    0 Votes
    3 Posts
    212 Views
    yasasY

    Hi @baris

    I tried a less block and now it's all working well.

    Thanks a lot!

  • This topic is deleted!

    Solved
    5
    0 Votes
    5 Posts
    14 Views
  • Error when importing library

    Unsolved
    7
    0 Votes
    7 Posts
    347 Views
    G

    @baris No error, exept a "not found" on every route of libray.js

    I feel silly. I hadn't thought to use an older version. It works ! Thank you very much !!!!

  • 0 Votes
    12 Posts
    648 Views
    barisB

    do I have to read the source for each object to learns its methods?

    Yes, you will have to read the source code to see what methods are available.

  • 2 Votes
    11 Posts
    1k Views
    julianJ

    @Yve-Salazar Are you still looking to distinguish between API calls via curl?

  • 1 Votes
    17 Posts
    1k Views
    Y

    @baris thanks! This was very helpful. @Sebastián-Cisneros and I really appreciate it.