Skip to content

Plugin Development

Have a question about building a plugin? Ask here
427 Topics 1.9k Posts
  • Overriding client-side js

    6
    0 Votes
    6 Posts
    330 Views
    R

    @baris That should work, I'll give it a shot.

    I love the customizability of nodeBB. Particularly the ability to override templates and language files in the custom themes. It would be amazing if that capability could be extended to other file types as well just by placing the customized files in a folder structure that mimics the structure of the core files.

  • How to output logs in plugins?

    Solved
    3
    0 Votes
    3 Posts
    180 Views
    jszsjJ

    @baris Thanks, I figured out that the code wasn't being triggered, just as you said. I'm getting output now!

  • Hook for infinite scroll

    6
    0 Votes
    6 Posts
    268 Views
    R

    @baris Thanks for the confirmation

  • Redirect to login

    Solved
    16
    0 Votes
    16 Posts
    2k Views
    F

    Hello @jalathpc_demo

    I tried to create a patch:
    https://github.com/LM1LC3N7/nodebb-plugin-private-forum/releases/tag/v1.3.1

    I no longer have a NodeBB instance, so let me know if it works (I am honestly not sure, as /logout should be allowed as you are logged in.

    It would be interesting to check if req.loggedIn is correctly set when using SSO. This could be why the plugin is not working as you need.

    NPM link: https://www.npmjs.com/package/nodebb-plugin-private-forum/v/1.3.1

  • Tipping plugin

    2
    0 Votes
    2 Posts
    164 Views
    phenomlabP

    @julia123 Hi, and welcome.

    As far as I know, there is no existing plugin that does this natively, so one would need to be developed. However, there are some plugins that come "close" such as @nodebb/nodebb-plugin-user-level which could be forked and modified to suit.

    It might be best for the devs themselves to respond here, as this will likely be custom work.

    Regds

  • scheduling topics

    6
    0 Votes
    6 Posts
    303 Views
    R

    @baris Thanks much, your help is always appreciated.

  • Username restrictions (Characters)

    4
    0 Votes
    4 Posts
    535 Views
    B

    @baris said in Username restrictions (Characters):

    This is the function limiting usernames https://github.com/NodeBB/NodeBB/blob/master/public/src/utils.js#L394

    Would anyone happen to know where this function got moved to in the intervening years?

    Edit: I think I found it, here: https://github.com/NodeBB/NodeBB/blob/master/public/src/utils.common.js#L330

  • Return a custom HTML element when Regex is match

    Solved
    8
    0 Votes
    8 Posts
    543 Views
    B

    @baris this is work! ­čĹŹ Thank you!

    st_small_507x507-pad_600x600_f8f8f8-removebg-preview.png

  • Custom Category with private topics

    2
    1 Votes
    2 Posts
    213 Views
    R

    I was able to achieve the desired functionality by adding a custom "Share" button to the template for the private topics. This button triggers the move to predesignated categories based on the type of post.
    Cheers

  • Running nodebb in tor

    10
    1 Votes
    10 Posts
    703 Views
    B

    I was send issue to Socket.io on GitHub.

    This problems not only in Tor, with VPN too (every 10sec alert about bad connection on forum).

    I hope this probmel have solution and it's can be fix with change configuration of socket or Nginx on NodeBB. But if it's not, this is bad news for people who life in country with censorsheps and they wants use NodeBB for freedom communication.

    Polish Observe GIF

    https://socket.io/docs/v3/reverse-proxy/#nodejs-http-proxy
    https://socket.io/docs/v3/troubleshooting-connection-issues/

  • Composer tpl - add custom data.

    7
    0 Votes
    7 Posts
    977 Views
    barisB

    You need to override the template and add {aName} into it to display it. Depending on where you want to add it you will have to create a new tpl file that overrides one of the files in https://github.com/NodeBB/nodebb-plugin-composer-default/tree/master/static/templates.

  • 0 Votes
    7 Posts
    584 Views
    PitaJP

    Would a plugin that just parses meta og tags work? Or does Twitter not like that?

  • Nodebb in tor works!

    6
    1 Votes
    6 Posts
    536 Views
    NikolaiPatrushevN

    Version 3.1.4 works!

  • Add custom user attribute using plugin

    1
    0 Votes
    1 Posts
    159 Views
    vijay kumavatV

    Hi Team NodeBB,

    I am trying to create plugin to add one set image/icon field in the user setting page (user/username/settings) and this value display after user name in topic list page.

    var Plugin = {}; console.log('outside - called properly'); Plugin.addCustomFields = function(hookData, callback) { console.log('Custom Field function is called properly'); // Add your custom fields to the `fields` object here hookData.custom_field_1 = { type: 'text', required: true, title: 'Custom Field 1' }; }; module.exports = Plugin;

    could you please guide me which method i need to use and for image/icon field how to write filed attribute?

  • 0 Votes
    7 Posts
    2k Views
    manaM

    Gamification is a great boost for communities that aren't very active, even though it's forced. Many of the bbs communities I'm involved with rely on this.I will try to fix the point-ns, not now though.

  • Client side pagination

    2
    0 Votes
    2 Posts
    176 Views
    R

    I was able to use Categories.setCategoryField to tag the categories that are customized with topic cards and then use that attribute in the templates.

  • Topic preview

    19
    1 Votes
    19 Posts
    934 Views
    R

    Perfect, as always your help is much appreciated.

  • Extending schema for topics/posts

    3
    0 Votes
    3 Posts
    230 Views
    R

    Nice, thanks for help!

  • 0 Votes
    3 Posts
    943 Views
    julianJ

    The main issue for me is that vscode will incorrectly highlight older templates.js syntax inside of an html tag, but that is mostly gone when you use benchpress syntax.

    A vscode plugin for highlighting the benchpress braces would be neat ­čśä

  • nodebb-plugin-shoutbox - v3

    16
    0 Votes
    16 Posts
    824 Views
    barisB

    @DownPW thanks for reporting fixed in 2.0.4