Skip to content

Extended functions for Q&A NodeBB plugin

Let's Build It
  • I wanted to add functionality into Sudonix so that it

    a) Adds a new DIV in the form of a panel/card after the last post if the topic is “solved”
    b) Adds a link that will take you straight to the solution
    c) Scrolls to that particular DIV containing the solution using page scrolling with an offset

    Basically, it would look like this - see video below:

    To my mind, this is a nice touch - a key feature that is missing from the Q&A plugin. I’ve asked for it to be added, although I’m not sure how much of an appetite there is for this, so with some simple HTML, NodeBB Widget areas, and some jQuery, it’s all possible 🙂

    Widget code below:

    How to use

    1. Open /admin/extend/widgets
    2. Drag and drop a HTML widget into the topic.tpl template, positioned in the Topic Footer
    3. Paste the code from Github into the HTML pane like below


    1. Save the changes

    Add this into your custom CSS /admin/appearance/customise#custom-css. Note that this is a “starting point” that uses var and so you will need to adjust to fir your own site.

    From now, any topics which are enabled for Q&A and set to a question will look something like the below







    This makes the Q&A plugin a bit more intuitive - what do you think?

  • That looks fantastic Mark 👌🏻🤝.

  • Very good like always 😉