Skip to content

Technical Support

Need help with installing or configuring NodeBB? Look here.

4.7k Topics 26.2k Posts

Subcategories


  • User documentation for NodeBB

    44 Topics
    44 Posts
    Jay MoonahJ

    One of the first important things to do after setting up NodeBB is to set up an emailer plugin. While NodeBB does include a local emailer, if your forum is particularly active we recommend using an third-party emailer such as SendGrid which provides better deliverability for sites that send a high volume of email. Setting up SendGrid in NodeBB is very easy.

    Open the administrative dashboard using the 'gear' icon on your forum. Open the Extend > Plugins menu, and select the Find Plugins tab. Use the search on the right. Type 'SendGrid' and the plugin should appear -- select Install when you see it. From Installed tab on the Plugins menu, search again for 'SendGrid' and select Activate. Activating the plugin will require a restart of your forum. To restart, select the Dashboard menu and press the Restart button to the right. After NodeBB restarts, the SendGrid plugin will be active.

    After you restart, there should be a item called Emailer (SendGrid) under the Plugins menu -- if you don't see this right away, try refreshing your browser.

    Sign up to SendGrid

    Go to the SendGrid website, open the pricing page and scroll to the bottom. Click on the link and create your free account. Once you've confirmed your SendGrid account via email, you should be able to login to the SendGrid website. On the left side of your SendGrid dashboard, open Settings and click on API Keys. Click the button in the top right to create a new key. Make sure that the key has Full Access for Send Mail and Alerts.  When you are done, the new key to your clipboard.

    Now, return to the SendGrid menu on your NodeBB admin panel. Paste the API key into the field, and save your changes. Now go back to the Dashboard to restart your forum one more time.

    SendGrid should now be working for your forum.

    YouTube Setting up SendGrid mailer for NodeBB

  • NodeBB guides, how-to's and general tips and tricks

    82 Topics
    599 Posts
    barisB

    Quick start plugin has an example on how to add a new api route https://github.com/NodeBB/nodebb-plugin-quickstart/blob/master/library.js#L40-L76.

    The hooks that are fired client side are for client side code in plugins. If you want to pass data from the client to the server you have two options.

    Create an api route like in quick start plugin Create a new socket event listener on the server side and use socket.emit() client side. Example here
  • 25 Topics
    196 Posts
    phenomlabP

    @baris updated to 3.7.2 and now just waiting for the plugin to be updated.

  • 0 Votes
    5 Posts
    3k Views
    julianJ

    Feel free to add a pull request for this if you haven't already 🙂

  • Using templates/partials, some examples, etc.

    Moved
    1
    3 Votes
    1 Posts
    1k Views
    T

    I believe you should have as many partials in your main template as efficiently as possible to cut down on redundant code. Here I'll write the standard for a good rule of thumb on how you should organize your templates and all the code within in them.

    Any redundant JS scripts should be in their own partial to be reused in other templates if need be.

    Take full advantage of the NBB API so that you extend your template even further. For example using <!-- IF loggedIn --> condition can greatly improve UX and conversions rates on your site. Having some type of call to action or banner within these will let the user know that they aren't logged. OR when they are logged in, show something else. You can come up with some pretty crafty ideas. But yeah, do what you can with the existing API.

    You can only do so much with the templates but is that good enough? Maybe, maybe not, but it does work when you plan out the logical flow and hopefully not get lost in the div's and such. For example on the Majestic Theme, the topic covers are pretty complex and one can easily get lost in the flow of what's going on. Here's a screenshot of the topics UI.

    Screen Shot 2015-03-17 at 8.12.29 AM.png

    Now lets take a little peek at whats under the hood;

    Screen Shot 2015-03-17 at 8.16.46 AM.png

    Screen Shot 2015-03-17 at 8.14.33 AM.png

    Now there's way more to this, but this is just a little example of how I control the topic covers. The only reason why I'm posting this is because I'm quite certain it would take a while to replicate without all of the other partials in this one template (not shown for obvious reasons).

    You can also do stuff like this to take control over pluralization of your template: post<!-- IF !topics.unreplied -->s<!-- ENDIF !topics.unreplied -->
    Which would mean, if you don't have any posts, remove the s in post, otherwise its posts. Neat huh?

    Anyone else have any cool things they've done with the template system so far in their existing theme? Share some of your ideas here. 🙂

  • 0 Votes
    5 Posts
    2k Views
    R

    In the end, here are the only changes (to the original theme) I did to successfully achieve what I wanted without bug:

    Change container to container-fluid in header.tpl to set the "default" format to fluid. For each page that I want to be non-fluid, wrap the whole ***.tpl into a <div class="container"></div>.
    For example I did this for category.tpl, topic.tpl, register.tpl and login.tpl.

    It works.

  • New themes not display correctly

    Moved
    12
    0 Votes
    12 Posts
    5k Views
    strangebeerS

    @julian, I've created a repo with my code:
    https://github.com/sanpatricio/nodebb-theme-capitol

  • Efficiently developing a theme

    Moved
    4
    0 Votes
    4 Posts
    2k Views
    B

    Thanks a lot! 🙂

  • No theme works on my installation

    Moved
    3
    0 Votes
    3 Posts
    2k Views
    S

    Thanks for your prompt response pitaj.

  • Anyone interested in helping with a template?

    Moved
    11
    0 Votes
    11 Posts
    5k Views
    P

    OP has decided to stick with NodeBB with some minor modifications to the home page as per screenshot.

    @thesimon Thanks for the link to IPB, I'm sure it's a great platform.

  • 0 Votes
    3 Posts
    2k Views
    codejetC

    Solved:

    .subcategories .category-item {
    margin-left:8px;
    margin-right:8px;
    }

    .col-md-3 {
    width:24.1%;
    }

    put that in custom CSS/HTML section

  • 0 Votes
    2 Posts
    2k Views
    barisB

    If you make a menu.tpl in lavender it will overwrite the one from vanilla so thats one way of doing it. Or you can fork vanilla and do the changes in your fork and make that a new theme.

  • 0 Votes
    9 Posts
    5k Views
    J

    Awesome! Thanks guys!

  • Medium Editor on nodeBB

    Moved
    4
    1 Votes
    4 Posts
    3k Views
    S

    Could possibly use:

    $.getScript("url_to_file.js");

    ??

  • Lavender Question - Alignment (Bug?)

    Moved
    15
    0 Votes
    15 Posts
    7k Views
    P

    Hey all, I've resolved this issue as of Lavender v0.2.8 - let me know if you still experience it. Make sure your full width categories have the class col-lg-12

  • loggedIn in footer.tpl

    Moved
    2
    0 Votes
    2 Posts
    2k Views
    O

    I've created Pull Request with support of loggedIn variable in footer.tpl

  • How to get subcategories from home.tpl?

    Moved
    2
    0 Votes
    2 Posts
    2k Views
    P

    Ok, this works

    <!-- IF categories.children.length --> <!-- BEGIN children --> <!-- IF @first -->(Sub-forums: <!-- ENDIF @first --> <a href="\{relative_path\}/category/{categories.children.slug}" itemprop="url">{categories.children.name}</a> <!-- IF !@last --> &middot; <!-- ENDIF !@last --> <!-- IF @last -->)<!-- ENDIF @last --> <!-- END children --> <!-- ENDIF categories.children.length -->

    Just put it somewhere between <!-- BEGIN categories --> and <!--END categories --> in home.tpl

    And take both \ from {relative_path}.. it seems that nodebb parses it... so I had to type...

  • New from-scratch theme

    Moved
    7
    1 Votes
    7 Posts
    4k Views
    R

    Opened an issue. Getting rid of Bootstrap is currently close to impossible without modifying NodeBB.

  • How to show sub-categories as home page?

    Moved
    8
    0 Votes
    8 Posts
    5k Views
    P

    Ok. it was my first pull request ever, hope I did it correctly. =]

  • Vanilla's fade-in

    Moved
    2
    0 Votes
    2 Posts
    2k Views
    julianJ

    Here, application of the ajaxifying class to the #content element

  • 1 Votes
    4 Posts
    3k Views
    R

    @baris Thanks, but there's no way to just get all the most recent posts in a category, including all subcategories posts? The templating engine doesn't seem to allow anything too complicated (nor anything complicated at all in fact), so I don't think I can like aggregate the different arrays and sort them...

    Maybe it's something that you should be able to configure? Subcategories is a quite recent addition so it's normal that no such thing has been implemented / thinked about yet, but maybe it's something you might want to have.

    I really want all my posts on my main page (WIP theme http://nodebb-test.ribesg.fr/)

  • Theme Updates Functionality

    Moved
    2
    1 Votes
    2 Posts
    2k Views
    julianJ

    If you've forked the Lavender theme, just add the original source as another remote:

    $ git remote add upstream git://github.com/NodeBB/nodebb-theme-lavender.git

    Then every time you want to merge the latest changes in:

    $ git fetch upstream && git merge upstream/master
  • 0 Votes
    3 Posts
    2k Views
    R

    Thanks for that. I would expect some way to configure that. Removing that line would also apply that to all widgets areas, on all themes, right?

    My workaround is to add a plznohide class to the appropriate widget areas' divs and add this to either my theme CSS or the "Custom CSS":

    .hidden.plznohide { display: initial !important; visibility: visible !important; }

    It seems to work as expected. Being able to configure if each widget area should be hidden in the ACP would still be nice.