Skip to content
  • Re-render component without refreshing page

    NodeBB Plugins
    2
    0 Votes
    2 Posts
    210 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.

  • Modify nodebb-plugin-ws-dice

    Plugin Requests
    17
    0 Votes
    17 Posts
    1k Views
    DownPWD

    @oplik0 said in Modify nodebb-plugin-ws-dice:

    @DownPW v2.4.0 inlines the text now, making it work fine with multiple lines:

    Wooooo Very very good job @oplik0 😉👏

    awesome

    @oplik0 said in Modify nodebb-plugin-ws-dice:

    Unfortunately I'm not sure how to go about putting the icon in the middle of the event, so it's just aligned to the first line instead.

    I tried some css without success.
    Maybe @phenomlab knows how to do this ?

    It's a detail because it's already great and much better as a result!!

  • Promises (Q) vs Callbacks (async)

    NodeBB Development
    3
    0 Votes
    3 Posts
    2k Views
    NivixN

    Very good points about Bluebird. Its performance numbers are surprising, and the utility it brings with Promise.promisifyAll makes it so easy to convert callback code to promises.

  • Menu does not work on iOS and Safari

    Technical Support
    3
    0 Votes
    3 Posts
    2k Views
    A

    @psychobunny said:

    This is a confirmed issue. I was supposed to get my hands on an iPhone this weekend but couldn't unfortunately. Also it seems to work on safari for windows 👎

    Can you not go down to that device place in Toronto that has all sorts of devices? Is it even still there. 😛

  • Plugin development: environment setup

    NodeBB Plugins
    7
    0 Votes
    7 Posts
    4k Views
    julianJ

    Yes, as @Schamper recommends, do not use relative paths to break out of the plugin's root directory, just use module.parent.require to require from the context of plugins.js, or require.main.require to require from the context of app.js

    To answer OP, I use npm link to link my folders together. I have one big messy NodeBB install ( 😉 ) and next to it is a plugins/ folder where all the plugins live.

    @psychobunny integrated grunt into NodeBB, so I just use grunt --verbose to develop now, instead of ./nodebb dev 😄

  • We now have a Gruntfile...

    NodeBB Development
    8
    4 Votes
    8 Posts
    4k Views
    H

    Ignore me. The docs answer my question:

    Run grunt to start up NodeBB and watch for code changes.

    🙂

  • Developer Environment

    General Discussion
    14
    1 Votes
    14 Posts
    5k Views
    L

    @Scuzz Yeah it just has a popup after a certain number of saves, but you can keep using it without buying it. Definitely a good free editor.

  • site.name

    NodeBB Development
    3
    0 Votes
    3 Posts
    2k Views
    CyanPrimeC

    Yup, title worked. Thank you!

  • 1 Votes
    10 Posts
    6k Views
    HuggyH

    @pichalite

    Thank you!