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

    Thank you!

  • Soundcloud SSO

    2
    3 Votes
    2 Posts
    2k Views
    julianJ

    Yay, another entry into the contest 😄

  • 4 Votes
    21 Posts
    10k Views
    julianJ

    Most likely the theme will need some integration before subcategories will be shown. At present, I believe only vanilla and lavender show subcategories.

  • MtG Card Finder

    10
    1 Votes
    10 Posts
    4k Views
    NivixN

    Then that is exactly what I am looking for. Thanks!

  • 0 Votes
    4 Posts
    3k Views
    frissdiegurkeF

    for the case your plugin gets activated after user-creations you'd have to use the hook action:plugin.activate (take care to compare the id you'll get with your plugins id since this fires for each plugin).
    The following is the way I'd go within, maybe there is a more simple (or better performance) way:
    Get somehow all user-ids (personally I don't know how, maybe this would help) and use the function setUserField of the user-module to set each users field-value.

  • 3 Votes
    2 Posts
    1k Views
    P

    Should have posted this under fake account @Lulian-Jam maybe you could have won!

  • 2 Votes
    6 Posts
    4k Views
    meetdilipM

    Nice work @JLChnToZ

  • 0 Votes
    1 Posts
    1k Views
    V

    Hey guys m here again, I was wondering if there is anyway to set a URL path somewhere through this plugin so after success login with Facebook I can redirect my users to a different url than default homepage.

  • Is a Xenforo-like Resource Manager possible?

    6
    0 Votes
    6 Posts
    3k Views
    meetdilipM

    @psychobunny said:

    Can you explain what it is? I haven't personally used Xenforo before

    Nothing special. A set of threads with downloads arranged in such a manner that it will be listed as download items. You can see the example here

    https://xenforo.com/community/resources/

    It is in demand with many sites and is a hot add on with Xenforo.

  • Plugin / Theme contest!

    Locked
    38
    5 Votes
    38 Posts
    17k Views
    P

    Contest has started, here's the official link: https://community.nodebb.org/topic/2527/nodebb-plugin-theme-contest-bonanza-2014/2
    Locking this thread 🙂

  • 0 Votes
    2 Posts
    1k Views
    P

    It would probably be easier for you to build your own system rather than use the posts API to build your calendar plugin (I think so!). If you decide to go this way, can you elaborate on how you are doing this then maybe we can help by adding hooks where you need it etc

  • SSO-Twitter

    12
    0 Votes
    12 Posts
    5k Views
    NicolabN

    OAuth without user email ...
    I had noticed after having developped a module Twitter OAuth, Grrr

    Apparently I'm not alone lol

    https://twittercommunity.com/t/twitter-oauth-after-connect-get-primary-email-address/1563 https://twittercommunity.com/t/how-to-get-email-from-twitter-user-using-oauthtokens/558
  • 0 Votes
    3 Posts
    2k Views
    V

    @julian great will try this now, thanks for quick reply!

  • Custom Auth

    2
    0 Votes
    2 Posts
    2k Views
    julianJ

    @Shard Yes, the sso-oauth plugin is the plugin you should fork to get NodeBB to communicate with a customised OAuth domain endpoint 🙂

  • plugin podio??

    2
    0 Votes
    2 Posts
    973 Views
    A

    No plugin exists for podio yet.

  • Hook Request Thread

    15
    0 Votes
    15 Posts
    5k Views
    JLChnToZJ

    Can I have a filter hook that can process the raw HTTP request from users? I'm wondering if I can use this to do something with the request headers before NodeBB processing everything.(sorry for my bad English...)

  • Altering Groups behavior

    1
    0 Votes
    1 Posts
    747 Views
    ShardS

    I ask a lot of questions - heh. Sorry.

    I'm not certain if this is something that can be done as plugin or if this is something that would have to to be done as a core enhancement - so I'm asking here before I go to far down the rabbit hole.

    I'd like to do two things for groups. The first, add the option of an external bitmap image. The second is add the option of adding to or replacing the Font Awesome options with Font Custom ( http://fontcustom.com/ ) which is essentially roll your own Font Awesome.

    My rationale is that I'm going to abuse groups slightly to provide two requirements that have been imposed on me ( Badges and Forum Titles ) by using Groups for both. Those with Images , badges, those without, titles.

    Anyhow. Is this an enhancement to the codebase or something I can do with a plugin? Pointers would be great.

  • 0 Votes
    8 Posts
    4k Views
    julianJ

    Would a server-side hook be all that you need?

    gh#2112

  • Gallery system

    10
    0 Votes
    10 Posts
    4k Views
    N

    That would be cool. Especially so if there were different configurable categories.

  • Get just latest info from an api.

    3
    0 Votes
    3 Posts
    1k Views
    A

    @julian it's in order. Thanking you. Will see if I can put that into production.

  • 0 Votes
    1 Posts
    1k Views
    mootzvilleM

    I am wanting to add some fields to the registration page, so I thought I'd write a plugin for it.

    It looks like the process would be:

    Add a 'filter:register.build' hook function to insert the html for the extra form inputs. Add a 'filter:user.custom_fields' function to insert the key/value to the userData object.

    I looked at the spam-be-gone plugin to get an understanding of how to go about it, but my question is: Is it possible to place my added field(s) at the top of the form -- or anywhere else -- rather than the bottom?

    I can also do this by adding my additional html into the register.tpl file and then adding the key/value to the userData object in /src/user/create.js, but I'd rather do it via a plugin as it seems cleaner. I don't need the data to appear on the site (i.e. the user's profile) so just these two things work fine.

    The problem is I believe I'd have to do a 'git pull --rebase' each time I wanted to get updates for nodebb which could break things over time. Seems hacky. Plus, it is more maintainable to keep my modifications modular.

    So, is there a better way? What's the best way to go about doing something like this? I'm just assuming that doing it via a plugin would be ideal, but if there are better options that are clean, then please let me know.

    Lastly, if I wanted to have a function run a check on this info for duplicates during the registration (exactly like the one for username) can you steer me in the right direction on how I'd go about it?

    Thanks!