Technical Support

4.6k Topics 25.1k Posts

Subcategories


  • User documentation for NodeBB

    44 Topics
    44 Posts

    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

    80 Topics
    566 Posts

    Thanks dude @baris

    Works great know on Smartphone an Desktop 🙂

    Love it !

  • 23 Topics
    133 Posts

    Cool, very intuitive

  • Loading JS/JQuery in Extend > Widgets

    Solved
    10
    0 Votes
    10 Posts
    88 Views

    @baris said in Loading JS/JQuery in Extend > Widgets:

    <script type="text/javascript">
    (function() {
    function myWidgetCode() {
    $('#someElement').text('jquery should work here!');
    }
    if (document.readyState === 'loading') {
    document.addEventListener('DOMContentLoaded', myWidgetCode);
    } else {
    myWidgetCode();
    }
    })();
    </script>

    I just tried and it works perfectly! Thank you!

  • Hide Code

    Unsolved
    3
    0 Votes
    3 Posts
    60 Views

    @PitaJ I imagine this would be used for some code sharing site where you need to be a member to view.

    Anyway, this can be done via custom plugin listening on the parse hooks. You can remove code blocks there and insert a block asking users to log in 🤷

    @Konrad-Gierej-0 Are you developing this yourself?

  • Manually setting vote count for posts

    Unsolved
    19
    0 Votes
    19 Posts
    180 Views

    Thanks, that works perfectly. I'm handling the hook in my custom theme, but this probably needs to be in the https://community.nodebb.org/post/95161 plugin as well (without the importedVotes)

    library.setTopicVotes = async function(hookData) { const topicData = await topics.getTopicFields(hookData.post.tid, ['cid', 'importedVotes']); const importedVotes = topicData.importedVotes || 0 const voteData = await db.getSortedSetRangeByScoreWithScores(`tid:${hookData.post.tid}:posts:votes`, 0, -1, 1, '+inf'); let allvotes = voteData.reduce((acc, cur) => acc + cur.score, 0); allvotes = allvotes + importedVotes await db.sortedSetAdd(`cid:${topicData.cid}:tids:votes`, allvotes, hookData.post.tid) }
  • 0 Votes
    4 Posts
    72 Views

    @sivaprakash-ramasamy as far as I know there is no easy way to increase that limit in MongoDB.

    What is the key that is storing 16mb? Can you change it to use a sorted set instead?

  • Styling Tooltips in Harmony Theme

    Solved
    3
    0 Votes
    3 Posts
    45 Views

    @baris Cool! Giving this a shot now!

  • Custom Theme is Not in the NPM Registry

    Unsolved
    6
    0 Votes
    6 Posts
    62 Views

    @julian I'm still getting the same error. Do I have to uninstall the custom theme first (It's currently active as the main theme).

    I probably did it the wrong way. I basically copied harmony in node_modules and rename it and did my edits from there.

  • My admin panel is without CSS, how can I fix this?

    Unsolved
    5
    0 Votes
    5 Posts
    96 Views

    Looks like I also misconfigured the proxy server, /assets was pointing to an empty directory (it used to work until i moved it forgetting it was mentioned there)

  • Help with Custom Skin in V3

    Solved
    34
    0 Votes
    34 Posts
    749 Views

    @baris this makes me so happy. Thank you!!! Happy Dance Happy GIF

  • Using NodeBB with MySQL

    3
    0 Votes
    3 Posts
    2k Views

    By default, it's no possible to use mysql directly. But if you really want it, some efforts could be take to migrate the db from existing dbs to mysql database.

    So, in short, it's possible to use mysql only if you can successfuly migrate all schemas and existing database operations in the code from mongodb/redis/postgresql(any of these) into mysql.

  • Upload File API - 403 Forbidden

    Unsolved
    11
    0 Votes
    11 Posts
    177 Views

    @clementneveu said in Upload File API - 403 Forbidden:

    To get the csrf_token with the config api, no problem for me !

    How are you getting this token? Can you show us the code?

  • Help Accessing Group Slug

    Solved
    8
    0 Votes
    8 Posts
    128 Views

    @baris Fantastic! Thank you!

  • Pagination Setting Not Working

    Unsolved
    3
    0 Votes
    3 Posts
    51 Views

    @dave1904 ah there it is! Is there a way to reset that for all users?

  • Help with my Custom Function

    Solved
    13
    0 Votes
    13 Posts
    168 Views

    @oplik0 yeah and if you don't want an upgrade script and just want to run some code that connects to the database to modify stuff or create reports etc. you can run custom script. These go in the nodebb folder and can be executed by node my_custom_script.js. Below is a template that we use frequently.

    /* globals require, console, process */ 'use strict'; const nconf = require('nconf'); nconf.file({ file: 'config.json', }); nconf.defaults({ base_dir: __dirname, views_dir: './build/public/templates', upload_path: 'public/uploads', }); const db = require('./src/database'); db.init(async (err) => { if (err) { console.log(`NodeBB could not connect to your database. Error: ${err.message}`); process.exit(); } await doSomethingUseful(); console.log('done'); process.exit(); }); async function doSomethingUseful() { console.log('global object', await db.getObject('global')); }
  • Process "20108" from pidfile not found, deleting pidfile

    Unsolved
    12
    0 Votes
    12 Posts
    403 Views

    @baris I'm able to fix it. I switched to v16, deleted the pidfile, then start nodebb again. Thanks!

  • Left border transition out

    Unsolved
    7
    0 Votes
    7 Posts
    98 Views

    @baris thanks

  • 0 Votes
    2 Posts
    73 Views

    You find the login.tpl in the plugin folder of the theme you are using, e.g. /node_modules/nodebb-theme-harmony/templates/login.tpl

    After changing a template you have to rebuild & restart your nodebb to see effects.

  • Install Nodebb using AWS env

    Unsolved
    2
    0 Votes
    2 Posts
    55 Views

    @Vishal-Grover if you're just using EC2, you can use the Ubuntu guide as it's the same. I'd recommend you don't use the AWS Linux build though - use the Ubuntu one.

  • Clustered nodeBB and rolling restarts

    Unsolved
    4
    0 Votes
    4 Posts
    83 Views

    @razibal that would work for a single server but once you have multiple servers each running multiple nodebbs you would need the socket.io redis adapter. https://github.com/socketio/socket.io-cluster-adapter/issues/1

  • 0 Votes
    2 Posts
    66 Views

    Not exactly what you want but one would be to use filter:topic.build hook and set the title to

    templateData.title = `${templateData.title} | @${templateData.mainPost.user.username}`

    Haven't tested it but it would look like 3.0.0 Upgrade Support Thread | @baris | NodeBB Community