Ok, So I have figured out the template system, learned from some other plugins a few things. Able to modify broken ones to make work again etc.
Now I have a plugin that on their registration adds a field to their main user mongo objectid. Question is where can I find some useful information on how to pull that said information from the database to display it in html on the template.
I know base values can be done such as username etc with {username} obviously I need the plugin to "whitelist" or add this new value to be able to use it in templates too.
I'm self taught programmer, learn from things i see. Examples are super helpful to me.
I assume id have to do something like:
Require User src
User.getUserField(data.uid, 'NAMEOFID', function (err, NAMEOFIDDATA) {
//What to do here to push it to template field?
}
I just find it hard to find accurate documentation and descriptions of nodebb plugin making maybe im looking in the wrong areas but seems like its hidden easter eggs.
But yeah, a bit more detail.
db.objects.find({_key: "user:4"})
{ "_id" : ObjectId("5ce1e1fa549c71c7acd236cb"), "_key" : "user:4", "valueId" : "hello", "returnTo" : "/" }
(Obviously theres more in that object id i just removed it) - however I want to display valueid's value (hello) to a tpl. If this makes it easier to understand.