Skip to content

Plugin Development

Have a question about building a plugin? Ask here
444 Topics 1.9k Posts
  • `./nodebb build` build only one plugin

    8
    0 Votes
    8 Posts
    2k Views
    Z
    @PitaJ Perfect, thanks a ton!
  • How to specify dependency on other plugins?

    2
    1 Votes
    2 Posts
    786 Views
    PitaJP
    There's no way to require it. The best you can do is tell the user to do it. Also, it use require.main.require instead
  • Import plugin for phpbb port for phpnuke

    3
    1 Votes
    3 Posts
    1k Views
    thomas.picklesT
    Hope so! Seems like there's at least one other site using this port of phpbb. Perhaps more if they cleaned out the attribution footer markup or aren't indexed by google.
  • Creating custom privilege

    3
    0 Votes
    3 Posts
    1k Views
    ende124E
    @pitaj Thank you for the detailed answer, appreciate it!
  • Hook on a custom page

    11
    0 Votes
    11 Posts
    3k Views
    yariplusY
    I don't think so, probably something to do with cookies changing. I'm guessing you need to call redirect or status.send to avoid the error. https://github.com/NodeBB/NodeBB/blob/master/src/controllers/authentication.js#L292-L296
  • plugin-ns-embed need help.

    1
    0 Votes
    1 Posts
    674 Views
    Thương Để NhớT
    Dear all. i have install plugin ns-embed in my forum. i want create new rules with information: watch link : https://cocobay.com/play?hash=QmXBSgySrGc78z53H7bNmuxnKPVPfqKF4LyJYe42MpEF2k&channel=7099 embed ifram : <iframe id="embediframe" width="100%" height="250" src=" https://cocobay.com/playerembed/7099/QmXBSgySrGc78z53H7bNmuxnKPVPfqKF4LyJYe42MpEF2k " frameborder="0" allow="encrypted-media" allowfullscreen="" class="embedVideoIframe"></iframe> how to create new rules on ns-embed plugin. please help me. this is very importance for me. thank you.
  • Is there a hook fired after all plugins have initialized?

    4
    0 Votes
    4 Posts
    1k Views
    julianJ
    Would you like us to fire an action hook when static:app.init has finished executing?
  • Plugin Settings page reload

    2
    0 Votes
    2 Posts
    1k Views
    PitaJP
    You need to run event.preventDefault() to prevent the Click from automatically submitting the form
  • Grabbing data on topic reply

    1
    0 Votes
    1 Posts
    821 Views
    G
    Hi all, I'm working on a minor "experience" per post based plugin. User posts, it saves experience to an object. The saving works great, it displays fine. What I'm having an issue with is when someone replies to a topic. Everything stores correctly... but since the page doesn't refresh, the post doesnt populate with the updated information UNLESS they refresh the page. I've tried multiple hooks/filters and can't get any to work. The most appropriate seems to be "action:topic.reply". If I try to make a DB call to grab the object data, the action returns long before the DB call returns so none of the data I need gets added to the returned post object. Any ideas?
  • Best way to get base URL from client side JS

    5
    0 Votes
    5 Posts
    3k Views
    J
    @PitaJ, is there a simple way to find the client IP, similar to config.relative_path?
  • Define a widget area in a partial template

    2
    0 Votes
    2 Posts
    1k Views
    barisB
    Widgets are only rendered on the page itself right now https://github.com/NodeBB/NodeBB/blob/master/src/middleware/render.js#L53. We would have to add support so they are rendered in renderHeader method as well. Open an issue on our github it could be a nice addition.
  • translation for widget content

    Solved
    4
    0 Votes
    4 Posts
    1k Views
    Alex GalaxA
    got it! had to add the folter/files for the default language en-GB as set in apc, even though my user account language is de.
  • How do I call JQuery inside library.js

    3
    0 Votes
    3 Posts
    1k Views
    Alex GalaxA
    library.js is server-side java script, not jQuery. jQuery functionallity can be simulated with eg cheerio main.js is included in HTML (client-side), here u can use jQuery.
  • Contributing to plugins

    9
    1 Votes
    9 Posts
    3k Views
    imavlrI
    Ah, I've figured out the problem, it was a silly mistake. I had forgotten to rename the folder to match the plugin name. Thanks for verifying the quickstart plugin works.
  • Widget: Templating with client side data

    1
    0 Votes
    1 Posts
    914 Views
    F
    Good morning. First of all, I'm not a developer, and I'm sorry for every noob question that comes up here. Right now I'm playing around with the plugin/widget development. My goal is to have a widget which includes a search bar and a result div. Every change in the search input field fires a jquery request against a foreign api. Result is a big json object, containing an array of objects (example fields: image, name, uuid, type). I was able to put the plain results into the div. Now I want to process these results (splitting them up by type) and render them into beautiful partials. For your imagination: <search box> <box for type A with a list of entries> <box for type B with a list of entries>... Can anyone please give me a headstart? Thanks in advance.
  • Confirm on post

    3
    0 Votes
    3 Posts
    2k Views
    A
    @baris thanks for the suggestions, for now I've just replaced the toast on clicking Reply with the confirm dialog and if they cancel it presses the discard button to close the composer.
  • Handlers on client side

    2
    0 Votes
    2 Posts
    1k Views
    barisB
    When you are on the category page you can access the topics with ajaxify.data.topics and on the topic page its ajaxify.data.posts. There are also hooks fired whenever new topics/posts are added. They are $(window).trigger('action:topics.loaded', { topics: ajaxify.data.topics }); and $(window).trigger('action:posts.loaded', { posts: data.posts });
  • Built-in Reward Essential doesn't work

    4
    0 Votes
    4 Posts
    2k Views
    J
    Looks like @baris already fixed it? May I know where can I find the code? I can merge it to my local one
  • is this fully open sourced. I have to use this for a business purpose?

    3
    0 Votes
    3 Posts
    1k Views
    julianJ
    To be specific, you are allowed to use NodeBB to host for most purposes, although you are not allowed to redistribute changed copies of NodeBB unless you also publish that source code.
  • plugin-assign-new-user-to-group not working after upgrade from v1.5.x to v1.6.x

    Solved
    14
    0 Votes
    14 Posts
    5k Views
    W
    @baris no, just I got an empty pull down menu when I clicked Topic Tools. Today I tried again, and got the pull down popolated. Strange....