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
    427 Topics
    2k Posts
    traarrrT

    Hi all,
    Well this is my first time writing a plugin which involves using client side hooks...
    For a start, i would want my plugin to listen to a hook which activates when the topic page is completely loaded and topic tools are loaded too.

    For which I wrote this function:

    'use strict'; /* globals document, $ */ $(document).ready(function () { function alertType(type, message) { require(['alerts'], function (alerts) { alerts[type](message); }); } console.log('nodebb-plugin-quickstart: loaded'); $(window).on('action:topic.loaded', notifyBox); function notifyBox() { console.log("in notify box"); alertType('success', "done") } });

    but this is not working... I can only see "nodebb-plugin-quickstart: loaded" on the console.

    Where am i going wrong here??

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

    @baris 👍

  • 17 Votes
    36 Posts
    9k Views
    barisB

    @dave1904 you should be able to get that data the same way this plugin does.
    https://github.com/barisusakli/nodebb-plugin-browsing-users/blob/master/index.js#L103-L112

    That code gets all the connected sockets that are in the topic. Each socket object has a data.uid field. If it is 0 then it is a guest other wise it is the user id of the logged in user. From that you can get the total number of sockets in the topic or just the guests etc.

  • 7 Votes
    22 Posts
    1k Views
    DownPWD

    Thanks you very much @baris

  • 0 Votes
    4 Posts
    240 Views
    phenomlabP

    @mschwartz there are two "versions" of the preview links plugin. One is the officially supported one you're using courtesy of @julian and the other is a client side version I wrote. Whilst not a plugin in the traditional sense, it's in use on my site (and several others I know of). You can read about it here (OGProxy)

    Link Preview Image Setup OGProxy for use in NodeBB

    For anyone who has been following the below thread, this is for you in terms of installation on your own forum. As with all good demos and POC’s, this site r...

    favicon

    Sudonix | A one-stop-shop for all your technology questions (sudonix.org)

  • NodeBB LinkedIn SSO Plugin

    2
    0 Votes
    2 Posts
    173 Views
    B

    I tried the below SSO plugins but they didnt work.
    https://github.com/joe1chen/nodebb-plugin-sso-linkedin-oauth2
    https://github.com/mootzville/nodebb-plugin-sso-linkedin

  • [nodebb-plugin-rss] RSS Feed plugin

    217
    18 Votes
    217 Posts
    159k Views
    barisB

    @phenomlab, @BrotherGlaucon & @crazycells this plugin is updated for 3.2.x and up, latest version 4.0.0

  • [nodebb-plugin-emoji] Emoji Plugin

    46
    0 Votes
    46 Posts
    11k Views
    dave1904D

    @PitaJ Not a ton but currently I have about 70 emojis added by hand, some I would like to delete, some I would like to add and re-sort. A custom pack is actually a good idea, I'll take a look at that

  • [nodebb-plugin-poll] Poll plugin

    187
    14 Votes
    187 Posts
    143k Views
    dave1904D

    @phenomlab thanks!

  • 7 Votes
    24 Posts
    5k Views
    crazycellsC

    @baris said in [nodebb-plugin-osm-map] OpenStreetMap based map to locate users:

    Version 2.2.0 of this plugin is compatible with 3.2.0 and up.

    thank you 🙏

  • 12 Votes
    40 Posts
    18k Views
    LEVI HAVIVL

    I thought about it,
    It's not that complicated at all.
    The question is what kind of meeting are we going for...
    About a big meeting, with screen sharing, moderators, etc.
    Or you go for a type of personal meeting, like the original idea, that there is such a button in the chat, of a conversation, and then it's like a WhatsApp conversation, where you just see each other... That's it, without extensive options...

    @julian what are you saying?

  • 0 Votes
    3 Posts
    187 Views
    LEVI HAVIVL

    Oh!
    Thanks for the comment,
    In the meantime, I found a plugin that defines this, and on the server side I simply launch a socket, which is sent to the plugin, and then the plugin sends the notification.

  • [nodebb-plugin-adsense] Google Adsense

    82
    6 Votes
    82 Posts
    59k Views
    barisB

    This plugin is updated to work with 3.2.x and up. It also uses widgets now instead of hardcoded ad areas so it is possible to place an ad wherever there is widget area in the theme.

    @omega I've added /ads.txt support into the plugin.
    25311c03-f012-4298-969d-ef0d7b0edc74-image.png

    This only applies if the forum is hosted on the root domain, if you have another CMS on your root domain you need to handle it there. The adsense verification can be done with the custom head tab in the ACP if nodebb is on the root domain.

  • 5 Votes
    26 Posts
    3k Views
    B

    @DownPW change 6M to 150M or 200M

  • nodebb-plugin-topic-noindex

    3
    3 Votes
    3 Posts
    393 Views
    barisB

    @crazycells that's correct

  • 37 Votes
    302 Posts
    251k Views
    barisB

    @Hope33 when you activate shoutbox and rebuild restart it should add a new route at yourforum.com/shoutbox you can also drag and drop it as a widget on a page.

  • Re-render component without refreshing page

    2
    0 Votes
    2 Posts
    184 Views
    barisB

    If you want to re-render something client side you can use

    const html = await app.parseAndTranslate('path/to/template', 'blockName', data);

    Where block name is the name used in the tpl file for a loop like {{{ each topics }}} and then once the render is done you can replace the html with jquery $('#some-target').html(html);.

    If you search core code you will see many uses of app.parseAndTranslate to update the DOM.

  • LDAP Plugin

    30
    0 Votes
    30 Posts
    2k Views
    phenomlabP

    I found this listed in the NPM registry
    https://github.com/Chrischenny/nodebb-plugin-node-ldap-ad

    Can't get it to work though - crashes NodeBB every time.

    EDIT - working now - I had the one amended by @baris still installed, so removed and all good from the stability perspective. Doesn't seem to work with AD though - at least, not for me - investigating.

  • 0 Votes
    22 Posts
    1k Views
    phenomlabP

    @baris Thanks

  • 18 Votes
    356 Posts
    275k Views
    Gliding9426G

    Forgot to mention that if i open that URL from the browser window I get the expected result in the JSON, the response contains

    "isAdmin": true, "isLoggedIn": true,

    It looks like if the browser does the request in the page via the javascript, could not access the cookies and so it gets a "logged out" json (but i tested on clean ms edge with no cookie blocking)

    Ps: i could not edit the other post because of a weird issue, I'm going to open another post to ask if this is intended behavior

  • 7 Votes
    136 Posts
    43k Views
    DownPWD

    @DownPW said in [nodebb-plugin-ns-embed] NS Embed:

    I search dailymotion rules for this plugin.

    I've tested this but doesn't work

    Dailymotion
    Watch

    (?:<a.*?)?(?:https?:\\/\\/)?(?:www\\.)?dailymotion\\.com\\/video\\/([a-zA-Z0-9_-]{4,11})(?:.*?\\/a>)?

    Replace

    <div class='embed-wrapper'><div class='embed-container'><iframe src='//www.dailymotion.com/embed/video/$1' frameborder='0' allowfullscreen></iframe></div></div>

    Anyone ?

  • 0 Votes
    5 Posts
    238 Views
    oplik0O

    If you need to use v1.x, the latest release is v1.19.12
    You can find upgrade instructions here: https://docs.nodebb.org/configuring/upgrade/
    Follow the "via release branches" part and use the v1.x branch.

    However, if you can upgrade to v3 or at least v2 that would probably be preferable, since they'll be supported for longer (v2 will get security fixes until August 2025. source) in addition to offering quite a few new features.