I'm guessing you did this for the latest version? The one that is not compatible with the stable version of nodebb?
Re: NodeBB For a Complete Beginner
^ Quite a few years have past since this post, I'm at the same stage than @AccessDenied. I have dev experience, yet I'm lost without any proper explanation around the data flows for NodeBB.
I want to:
userIdand an external user Id
extUserID. (using Mongo)
extUserID) and show this custom data for each user.
I've had a look at many widgets, but I still quite don't get how the data flows from the back to the front-end. e.g to get user data here this widget calls
Now my dumb questions:
extUserId? Is there a list of those methods somewhere?
extUserId. I get that I can add it manually to mongo but how to let users fill it. This would represent an additional field in the user profile I imagine.
I believe there are two systems for data flow from backend to frontend.
Templates. You can pass data to the renderer as a js object and fill the template with it. Use curly brackets to refer to it.
Square brackets will give you a translated string.
For more on templates look here
Both systems work with widgets, so choose the option you prefer. The templates seem better if the data you want to load isn't supposed to change after the page loaded (there is lazy loading if you want to use it though), while with websockets you will have some delay between page load and data getting from backend to frontend, but you can request it dynamically without any reloads.
Edit: if you just need some more data about an user or something there is also the api - basically you get json data from almost any page you prepend
/api/ to. For example community.nodebb.org/api/user/oplik0
@oplik0 oof those template docs are really outdated. I need to do some work to bring them up to date.
In the meantime, please refer to the Benchpress docs instead: https://github.com/benchpressjs/benchpressjs/blob/master/docs/readme.md
Thank you so much for the replies. I'll dig into that again and probably come back with other questions