사용자 카드 사용자 지정

Is it somehow possible to customize the information / fields on a user card?

1개의 좋아요

To add a custom field, from your site’s admin panel you can setup a user field: customize > user fields

This will create a field for a user to fill out in their preferences, and it can optionally be shown on the user card.

If you’re looking to hide information on the user card, the easiest way is by adding custom CSS to your site’s theme.

6개의 좋아요

Thank you very much.

Another, similar question: is there a way to hide the user statistics at the user profile page?

1개의 좋아요

Yes, any element you see on the screen can be targetted and hidden via CSS rules in Admin, Customize.

1개의 좋아요

The link there is now a 404… is this where we’d be looking today?:
app/assets/javascripts/discourse/app/components/user-card-contents.gjs

Yes that’s accurate! that old reply about advanced customization isn’t really relevant anymore… so I’m going to remove that part. We no longer support template overrides, so you’ll want to rely on outlets or transformers as mentioned in Developing Discourse Themes & Theme Components

1개의 좋아요

Thank you! Was just dipping a toe – glad to avoid any wrong turns.