Skip to content
  • 25 Votes
    1 Posts
    2k Views
    E

    Hello everyone,

    Please join us in welcoming our new team member: Emir Onur @gasoved !

    Emir lives in Istanbul, Turkey with his wife and his little boy. His coding journey started with an Amiga-500. He developed his "Breakout" clone in QBasic. As a freelance software developer since 2009, he brings extensive skills and experience to the table. He is a pre-pandemic "home-officer" whose second favorite animal is ducks πŸ¦†

    He is happy to be a part of NodeBB team and we are excited to have him onboard.

    Welcome to NodeBB @gasoved !

  • 10 Votes
    1 Posts
    9k Views
    julianJ

    Please take a look at the official Plugin Writing Guide

  • 10 Votes
    1 Posts
    1k Views
    P

    A bug in our validation logic made it possible to change the password of any user on a running NodeBB forum by sending a specially crafted socket.io call to the server.

    We have resolved this in the latest version of NodeBB, and the fix has already been rolled out as a patch on all of our hosted customers.

    For more information on the vulnerability as well as instructions on how to resolve this issue, please have a look here: https://github.com/NodeBB/NodeBB/security/advisories/GHSA-hr66-c8pg-5mg7

    Click here to see the full blog post

  • 9 Votes
    1 Posts
    4k Views
    A

    Hi nodebb. Another friend from BitBangers here to show you my first plugin.

    Trying to look through a thread of phone screenshots was just painful, so I made a little plugin to allow you to resize images.

    The syntax is based loosely on the way iOS handles multple image sizes combined with normal markdown image embedding:
    ![alt text](http://someurl.com/someimage.png@<size>)

    Size can take the following formats:
    100x200 - Absolute size
    100x x200 - Absolute size where the other dimension is calculated to maintain aspect ratio
    50% - Percentage
    0.5 - Scalar Multiplier

    So for example, my original picture:
    http://cl.ly/image/2L3F1M2E1X3l/IMG_0136.JPG
    is 1000x750.
    All of the following would produce the same image at 1/2 size:
    ![white house](http://cl.ly/image/2L3F1M2E1X3l/IMG_0136.JPG@500x375)
    ![white house](http://cl.ly/image/2L3F1M2E1X3l/IMG_0136.JPG@500x)
    ![white house](http://cl.ly/image/2L3F1M2E1X3l/IMG_0136.JPG@x375)
    ![white house](http://cl.ly/image/2L3F1M2E1X3l/IMG_0136.JPG@50%)
    ![white house](http://cl.ly/image/2L3F1M2E1X3l/[email protected])

    Install via npm:
    npm install nodebb-plugin-image-sizer

    Source:
    https://github.com/Kern--/nodebb-plugin-image-sizer

    Known Issues:
    Images that are set to be wider than their container become elongated (width is set to match the container, but height is not adjusted). This means that mobile can get a bit dicey.

  • 9 Votes
    1 Posts
    640 Views
    julianJ

    Occasionally, we will get asked whether there are any differences between our hosted service and the open source project.

    It is as though we are holding back some great features and only allowing our paying customers access them! Conversely, it could be assumed that because we are hosting the software for others, that we would somehow out of self-interest or for economic reasons, deliver an inferior version with limitations.

    I'd like to say upfront that this is not the case for NodeBB.

    When you use our hosted service, you receive the same great NodeBB software that you can get for free off of our GitHub repository.

    What we're selling is support, maintenance, upgrades, and peace of mind delivered by our world-class† support team.

    You definitely can host NodeBB on your own! We've strived for years to deliver a piece of software that runs lean and fast on minimal hardware, great docs (some contributed by other admins!) that help you get up to speed quickly, and a fantastic community that will help you if you get stuck.

    The reason I take this principled stand is simple β€” I think it's unfair when artificial limitations are placed on software just for the purpose of getting customers to pay more.

    We've seen all this time and time again:

    You can't install any plugin you want, just a select few from a small list You can only have X units (tickets, posts, etc) of whatever you're using You can only have X admins/owners You can't see any messages older than X days

    These limitations are all artificial, and serve to restrict the use of something to the bare minimum. Anything extra is β€” of course β€” available for the right price.

    We don't do that. We tell everybody that NodeBB is powerful enough to run huge communities, and we stand by it. We tell everybody that NodeBB is flexible enough to look and function however you want, and we stand by it.

    These are the real limitations we impose on our hosting service:

    Hard drive space for uploads are imposed by our upstream provider and are set, though we are happy to add additional drive volumes for a fee) We have soft "pageview" limits that any user on our hosting can exceed (in fact, many do). We set them purely as a benchmark for the point at which your NodeBB may slow down depending on the type of load that you get, and encourage dialogue to make sure that you're on the right plan (server resources, etc.) We do not allow shell access for security reasons (and if you needed it, you probably could self-host)

    So please do rest assured when I and others tell you that what you see is what you get. No more, no less. I'd rather everybody get to use the best of NodeBB, instead of serving a special feature-reduced version for others.

    † I'm going to go out on limb here and say that we're probably the most qualified people to maintain NodeBB. Feel free to disagree πŸ˜‰

  • 8 Votes
    1 Posts
    2k Views
    E

    Hello all,

    We've just released version 1.9.1. This is a minor patch that closes these issues.

    Cheers!

  • 8 Votes
    1 Posts
    6k Views
    PitaJP

    This FAQ is applicable for the following situations:

    You're receiving the following error in the Javascript console: WebSocket connection to 'wss://<site>/socket.io/?EIO=3&transport=websocket' failed: Error during WebSocket handshake: Unexpected response code: 400 The "Looks like your connection to NodeBB was lost, please wait while we try to reconnect." alert box and the spinner in the navbar consistently appear You want your users to be able to access NodeBB from multiple subdomains on your site Background

    By default, NodeBB only allows websocket connections from the "url" value in config.json. This is because of what is called Cross-Site Websocket Hijacking. By restricting the origin at which sockets can connect, we prevent this attack from taking place.

    Diagnosis

    To make sure that your issue is in fact caused by an origin mismatch, try this:

    Stop the NodeBB server: ./nodebb stop Start NodeBB in dev mode: ./nodebb dev Visit your site, and see if the issue is resolved. Ctrl+C to exit dev mode

    If the issue disappeared when visiting your site running in dev mode, then your problem is in fact an origin mismatch. If not, it is likely something else, so look around or ask a question here on the forum.

    Solutions

    The easiest solution is to set the "url" value in config.json to exactly the URL at which you access your NodeBB forum. For instance, the configuration for this site is

    { "url": "https://community.nodebb.org", ... }

    If you want your forum to work from multiple origins (like www.yoursite.com and yoursite.com) the preferred option is to just redirect one to the other. For instance, redirect www.yoursite.com to yoursite.com within your reverse proxy.

    If you absolutely must have full access from multiple origins, you can configure the accepted origins directly. As documented here, you can add a socket.io:origins property to config.json.

    For example, to allow accessing the forum sockets from the main NodeBB site, nodebb.org, the following would be added to our config:

    { ... "socket.io": { "origins": "https://community.nodebb.org:* https://nodebb.org:*" } }

    Make sure your original site is included in the new origins property, and that you add :*, otherwise it's invalid.

    Still having issues?

    It's likely a reverse proxy configuration issue. Take a look at the proxy documentation for examples. If you still have issues, ask a question here on the forum.

  • 8 Votes
    1 Posts
    293 Views
    barisB

    Since NodeBB 1.18.6 it is possible to create dropdowns in the navigation (https://github.com/NodeBB/NodeBB/issues/9967). Before 1.18.6 to accomplish this you would have to use nodebb-plugin-customize to modify the menu template or use javascript to inject the markup after page load.

    In this tutorial I will show you how to create a dropdown navigation item that replaces the default categories link with a dropdown. The final result will look like this:

    category-dropdown.gif

    First thing to do is to turn the navigation item into a dropdown, to do this head over to yourforum.com/admin/settings/navigation, select the categories navigation item and toggle the dropdown option.

    category-dropdown-1.gif

    Once this is done you can use the text area below the toggle to add your markup. To create a simple dropdown you would just add a list of dropdown items like so:

    <li><a class="dropdown-item" href="/categories">All</a></li> <li><a class="dropdown-item" href="/category/2/general-discussion">General Discussion</a></li>

    Since you can input html here you can create custom dropdowns. To achieve the same dropdown as the first gif use the below html code, no css is necessary.

    <li><a class="dropdown-item" href="/categories">All</a></li> <li class="dropdown-divider"> <li><a class="dropdown-item" href="/category/2/general-discussion">General Discussion</a></li> <li class="d-flex flex-column"> <a class="dropdown-item" href="/category/3/nodebb-development">NodeBB Development</a> <div class="d-flex flex-column px-4"> <div class="d-flex align-items-center gap-1"> <i class="fa fa-fw fa-caret-right text-primary"></i> <a class="btn-ghost-sm text-sm text-nowrap" href="/category/13/nodebb-blog">NodeBB Blog</a> </div> <div class="d-flex align-items-center gap-1"> <i class="fa fa-fw fa-caret-right text-primary"></i> <a class="btn-ghost-sm text-sm text-nowrap" href="/category/5/feature-requests">Feature Requests</a> </div> <div class="d-flex align-items-center gap-1"> <i class="fa fa-fw fa-caret-right text-primary"></i> <a class="btn-ghost-sm text-sm text-nowrap" href="/category/6/bug-reports">Bug Reports</a> </div> <div class="d-flex align-items-center gap-1"> <i class="fa fa-fw fa-caret-right text-primary"></i> <a class="btn-ghost-sm text-sm text-nowrap" href="https://explore.transifex.com/nodebb/nodebb/">NodeBB Localization</a> </div> </div> </li> <li><a class="dropdown-item" href="/category/7/nodebb-plugins">NodeBB Plugins</a></li> <li><a class="dropdown-item" href="#">...add more as needed...</a></li>

    Modify the links to match your forum categories. To create dividers between sections you can use <li class="dropdown-divider">

    Now you can navigate your categories without going to the home/categories page. 🎊