[nodebb-plugin-ns-custom-fields] NS Custom Fields
-
Hi,
The update added a separate page for the custom fields, and I wanted to know whether I could still add the custom fields on the user profile 'edit' page instead of a separate page.
Thanks
-
There is no such way. Current implementation It's like best practice from NodeBB Team.
-
Version 4.0.0
New version is available. Summary: focus on UX in ACP panel and integration with Persona based themes.
- Use ACP Scripts capabilities of NodeBB
- Improved UX of ACP panel: confirmation windows, sort via drag-n-drop, edit
- Seamless field editing for users: sub-page for editing
Preview
-
You should install everything through package manager in ACP.
NodeBB checks compatibilities with plugins. By installing stuff directly vianpm
you are bypassing such checks. -
@Nicolas said:
Version 4.0.0
Well, i couldn't find a Version 4.0.0 in the plugin install section. It says Latest 3.0.1
-
If you can't find it, It means you can't use it
Plugin v4 is for Nodebb v1.x -
How to add a specific custom field only ?
i could add
<!-- IMPORT partials/account/custom_fields_flex.tpl -->
In my theme which display all the custom fields.
The things is i want to add a link on a specific custom field. I tried like :
<a href="{customFields.myfield.value}">link</a>
But it doesn't work.
Any help ?
Thank you.
-
Here is how you can reach properties:
.customFields
it's an Array data structure. You can access element via index. -
customFields[0]
- but I'm not sure if template.js supports such syntax. -
I will add to TODO List, so in next updates, you will be able to target concrete custom field.
-
Installed, and added a couple of fields. One with Gender, with two options, and one with Club, with 42 options (all 42 SPFL clubs).
Restarted forum too.
Go to any profile to edit (user/username/edit/custom-fields), including my own, and the page doesn't stop loading - the progress bar (nodebb's blue line which sweeps across the top) stops about 3/4 across the page, and the little spinning circle keeps going.
./nodebb log not showing anything unusual.
Using v1.0.2 and 4.0.0 plugin.
-
hm, interesting.
Hard to guess, what do you have in console, when page hangs on 3/4 of progress?
When have you added 42 fields, did you create unique key for every field?
Did you try plugin with v1.0.0? I have developed v4 on NodeBB v1.0.0. -
@Nicolas In console - the only "warns" I had was possible plugin compatibility issues with spam-be-gone, the Google & Twitter SSO plugins, and it skipped style.css of nodebb-plugin-newuser-invitation. Those appear anyway and don't affect the forum at all.
When I go to edit the custom fields in my profile, that's when it hangs, and there's nothing in log.
Each field had a key - "gender" and "club", with the same names but with capital letters at the start, and each option on both had an individual ID - all numerical (1-2, 1-42).