@sebastián-cisneros In static:api.routes, you'll want to call controllerHelpers.setupAPIRoute to mount the route to the appropriate /api/v3/plugins mount point.
You can see an example of how we do it in the quickstart plugin
Is there a way todo this or must I write a plugin?
Missing:
Age
Phone
Gender
Interests
Occupation
Must be more people that need this
Right now you'd have to write a plugin, although it would be kind of cool to have a profile field editor in the ACP to add / remove fields as necessary
"it would be kind of cool to have a profile field editor in the ACP to add / remove fields as necessary" <-- yes, that is how it works in phpbb
My first step is to get to know nodebb, then I want to migrate all my forums to it but i still missing features and the lack of knowledge at this moment
But if we could add this as a feature request
Hello guys, I'm going to create custom-fields
plugin.
Is any documentation about templates in use? Particulary I'm interested in augmentation of template outputs by plugins. First of all I would like to provide custom fields for the user (declared in acp) on page: /user/:username/edit
You would probably have to write a new hook and then loop through your custom data in the template. Feel free to send a PR to core/vanilla/persona or let us know if you run into trouble
@Nicolas , there is a plugin from Erlgo which should provide the functionality, but even after a tremendous amount of hacking around, I can't get it to work at all. Then again, I have a PHP background and only basic knowledge of NodeJS yet, so you might be able to make something out of it
You can find the repo here:
https://github.com/erlgo/nodebb-plugin-profile-extends
I would be so glad if we had profile fields, my users keep bugging me
@psychobunny is there any option to include plugin client js only for /account/edit
endpoint?
Also, Do you have an ideas, how to augment template for the plugin use - templates/account/edit.tpl
? I need add dynamic set of fields to the template, Vanilla's account-edit template is 3 column layout (md:2-5-5), I would like to have (md: 2:4:3:3). Main problem here, that I can't find really abstract approach, solution will be very dependent on Theme... One solution, just replace template on app startup, another option, create set of regexps and try to change template or dom manipulation to get another set of columns. Anyway I'm looking for less dependent solution, so It will not brake with every release of the theme and easily work with another themes
Taking everything into consideration, I will swap edit.tpl
and include client js with a template just as script tag
. But maybe you have better ideas