כיצד להציג שם מלא בהטמעות הערות

סיכום מבוסס בינה מלאכותית

The discussion addresses how to display a user’s full name instead of their username in embedded comments on Discourse. j3ang notes that despite configuring admin settings, the username still appears. j3ang shares that modifying the comments.html.erb file by changing <%= post.user.username %> to <%= post.user.name %> resolves the issue. greedNotGood asks for clarification, and greedNotGood confirms the solution after trial and error. Canapin emphasizes that file modifications should be done via a theme component or plugin, not directly, and provides a link to an example plugin for reference.

In the embedded topics iframe, the user’s username is displayed instead of the full name. I have configured all the admin settings to display full name. but it’s not working?

Any sugguestions?


For anyone else also looking to modify:
/var/www/discourse/app/views/embed/comments.html.erb

Hi @j3ang , can you maybe let me know the change you have made in the file to accomplish this? I tried changing username to fullname but that didn’t work.

OK, some more trial and error brought this: change <%= post.user.username %> to <%= post.user.name %> — simple, but you just have to know it…

Important note: if you want to override Discourse’s files, you need to use either a theme component or a plugin.

A good example of what you’re trying to do can be found here: