[nodebb-plugin-ns-custom-fields] NS Custom Fields
-
@psychobunny said:
@Nicolas said:
@psychobunny Also I'm going to create another plugin, and I need this space in user's profile. Do you have any suggestions how I can reach it without manual editing also?
Sorry I missed this. We should add more hooks (or widget areas) in the profile section. This is way better than requiring people to edit the template for sure. If you make a PR to add that functionality I'm sure we would accept it
How about giving plugins a way to specify some markup that'd added before/after every partial?
i.e. nodebb-theme-persona/templates/partials/topic/post.tpl existing would add a hooks/widget areas/whatevs. likebefore:topic-post
andafter:topic-post
? -
hi! sorry to bump this post. do you have any idea how I could get this running smoothly on 0.6.0? the plugin itself runs fine, and I can set up custom fields in the ACP, but when I try to import the partial (or even copy the contents of it into the .tpl itself), nothing shows. any idea why/how I can fix this?
(i can't update because the theme i'm using depends on 0.6)
-
@itsCrafted
I have developed this plugin on0.7.x
, so, you could have some problems with 0.6.
Where do you edit source file/template of your theme?If you want to add import to your theme, you should edit initial template of the theme (under
node_modules
) and don't forget to restart your forum. -
@itsCrafted
For Profile View (
node_modules/theme_directory/templates/account/profile.tpl
) - https://github.com/NicolasSiver/nodebb-plugin-ns-custom-fields#profile-viewAdd import
<!-- IMPORT partials/account/custom_fields_two_columns.tpl -->
, where do you like, for example after block with general data about user:Note: see last line
-
@Nicolas great, that works, but users can't edit the custom fields. How do I implement this?
edit: can you edit fields from the ACP or manually set them into Redis? this would be fine for me as well :P, my use case is probably quite different -
What do you mean by - users can't edit the custom fields?
They edit defined custom fields under their profile - https://community.nodebb.org/user/itscrafted/edit
Admin defines what custom fields are available for the forum. -
I see.
Answer will be simple: this plugin supports Vanilla/Levander and Persona, and themes that are derived from them.
Plugin isn't aware about custom themes, even if it uses widgets, It's up to theme developer to declare them. -
@itsCrafted said:
through redis-cli
Yes. User fields are stored in Database, you can edit them directly if you wish.
They could be found via key:user:X:ns:custom_fields
, whereX
is an user identifier. -
Version 2.0.0
New version is released. No new features, main idea to be compatible
- Compatibility with NodeBB v0.8
- ACP: refreshed look
Install updated version via Plugins section in ACP
-
It isn't compatible with 0.9, especially because of UI changes in 0.9 to profile page.
Also, I'm considering better options for this plugin:User Settings: hook? 路 Issue #3837 路 NodeBB/NodeBB
I saw you did changes to user's settings page? Did you add some hook so additional buttons/actions can be added? Is it a good idea to have hook for such button? Real Example: Edit Custom Fields, and by clicking it, user will visit dedica...
GitHub (github.com)
For now, if 0.9 update isn't critical for you, stick with 0.8
-
Version 3.0.0
New version is available. Summary: changed idea how plugin integrates with User's page.
- Compatibility with NodeBB
v0.9.1
- Introduced dedicated page for custom fields (i.e.
/user/nicolas/custom-fields/edit
). Removed dependency on Account's Edit Page (i.e. no dependency on theme). - Profile page: added new Flex template that could be used with Persona Theme
- Compatibility with NodeBB
-
I have two suggestions what I see in other f贸rum CMS.
1 - Support to links(Field type): I define URL of the custom field in ACP:
[link_what_i_want(ex: https://twitter.com)]: [user_information(MyTwitter@UserName)] and the hook give me a result like this: "Twitter: ins"2 - Support to images or icons in setup to show in templates, like this http://i.imgur.com/7aLADPS.png - This is an extension of first suggestion;
-
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