I am not against experimenting with adding a tiny avatar, but I would like to see the experiment in a plugin first. It is pretty straightforward to add.
I agree that option (perhaps as global setting) to display mention as @sam OR as Sam Saffron would be really great.
With the same formatting as mentions now have, but displaying full name instead of @handle
So, you guys allow for SSO logins, presumably to allow for companies, anong other entities who maintain master employee/user lists to login with ease.
The issue I’m running into here is this. We have 4500 employees. Most don’t know each other. While tagging by typing name in works perfectly fine, the username displayed is a 5 digit employee #. So now all people see is comeone tagging a 5 digit #
Can you guys write/enable a user option that simply displays the Full Name field in lieu of @username please!
You allow a user option to select the Full Name displayed first in a thread reply with username to the right. A simple visual switch.
I totally get the purpose of using a “twitter” tagging model, but it is severely aggravating for large professional/educational institutions to use. Please, please make an option available. In any means.
It’s not even in a paid hosted/supported version, so you’re missing out there on revenue for large organizations who might otherwise use this.
In my case, I’m trying to “sell” it to my board to adopt discourse. I’m sure they won’t like this missing capibility
Who decided the username had to be a 5 digit number? That’s a bad decision.
It’s quite common from what I have seen in larger organisations to have their AD logon use their payroll or ID number in order to logon rather than names. Not necessarily 5 numbers however. For example my last organisation my login was B3293016 - would be difficult to distinguish who that is if they then used SSO to check against that login and use it for discourse username and mentions.
What @mikechristopher said. The 5 did fit # is our employee I’d. Technically it’s 6, but the zero at the beginning is left off as we haven’t reached numbers greater than 100,000.
Bottom line, again having the feature I described will give corporate/enterprise clients a lot better usability.
Had you not integrated SSO, I’d understand being reluctant to allow full name tags vs username. But you made SSO available, this is a logical next step enhancement
I am not against adding this kind of option, but at the moment none of our paying customers need it so I cannot prioritize it.
I would probably recommend building this as a plugin first, this is something I would consider building if an enterprise customer funded it.
@mcwumbly have you had any luck with the CSS route?
Haven’t tried it, sorry. Just threw out the idea, but this isn’t something I’ve felt the need to explore too deeply personally.
Just to beat this dead horse a bit more, one of the barriers we’re having in our group is that people get super easily confused by the usernames. So right now, they have no problems making mentions, but when reading, they often don’t know who the mentioned person is. As such, in our use case, @cpradio (Jim Smith) would be ideal. The user would type in the @mention (let’s say @cpradio) and it automatically turns into @cpradio (Jim Smith) for others to read.
This would be just like the username mentions by each of our posts.
Has there been any movement here? It’s annoying to have to click on a username to figure out who the actual person is. And trying to move from Facebook Groups to Discourse is a pain when don’t get to see full names by default. I don’t think uniqueness is really the problem that people think it is from reading previous comments, as, once again, you can use usercards to differentiate if that’s the case. I’ve already changed the site settings to prioritize full names in UX…
J’ai écrit un petit script qui fait cela. Je l’ai placé dans un composant, dans la section </head>, et cela fonctionne. On pourrait certainement l’améliorer, mais le voici.
<script type="text/discourse-plugin" version="0.1">
var decorateAtMentions = function($post) {
$post.find("a.mention").each(function() {
var $elem = $(this);
var username = $elem.text().substr(1);
var data = Discourse.User.findByUsername(username).then(function(user) {
var avatarurl = user.avatar_template.replace("{size}", 18);
var realname = user.name;
$elem.before("<img src='"+avatarurl+"' title='"+realname+"'>");
$elem.attr("title", realname);
$elem.after("["+realname+"]");
});
})
}
api.decorateCooked(decorateAtMentions, {id: 'decorate-at-mentions'});
</script>
L’attribut title dans la balise img pose un problème potentiel si un nom contient un apostrophe, il faut donc le faire « comme il faut » (pour ma part, je vais probablement le supprimer car je ne l’aime pas vraiment).
Je voulais modifier le texte du lien, au lieu d’ajouter le vrai nom à la fin, mais malheureusement cela casse le gestionnaire de clic pour la carte utilisateur (car il semble s’appuyer sur le texte de la mention pour charger le nom) et je ne voulais pas m’enfoncer dans cette impasse.
Cela semble super. Pour un novice, auriez-vous un guide étape par étape sur la façon d’ajouter cela à mon instance Discourse ? ![]()
Il existe déjà un guide, veuillez le lire
et créez votre premier composant de thème.
@nachof J’ai trouvé un moyen de faire fonctionner : Use fullnames for mentions · GitHub en surchargeant _show() dans component:user-card-contents. Je suppose que l’underscore de début signifie que nous ne devrions probablement pas le surcharger ? Mais cela semble fonctionner :
Peut-être qu’un point d’entrée serait nécessaire pour récupérer optionnellement le nom d’utilisateur depuis $target ? Quoi qu’il en soit, c’était vraiment un blocage de mon point de vue pour le déploiement à ma communauté plus large. Il est temps d’avancer ![]()
C’est incroyable ! Je ne suis pas développeur logiciel, alors je n’ai pas réussi à comprendre comment intégrer ce que tu as créé à mon site Discourse. J’ai essayé d’utiliser cette URL pour l’installer via un dépôt Git, mais il m’a demandé si j’étais certain qu’il s’agissait d’un thème Discourse. Quelles étapes devrais-je suivre ?
Vous créeriez un nouveau composant de thème à partir de l’UX et vous copieriez ces éléments dans la partie balise head du thème.
Désolé de ressasser la même chose pour la centième fois, mais je l’ai installé correctement et les cartes utilisateur ne s’affichent pas. Y a-t-il une solution à ce problème, étant donné que cela date de deux ans ?
Je sais qu’il y a peu de chances que vous preniez la peine de le reprogrammer, mais peut-être qu’un membre sympathique de la communauté pourra nous aider.
Je suis honnêtement toujours un peu perdu avec ces instructions. Votre aide sur What makes a successful volunteer Discourse sysadmin? est super utile, mais je n’ai pas encore trouvé ce bénévole.
En attendant, @jessicah, êtes-vous toujours là pour peut-être transformer cela en un composant de thème publié dans #theme-component ? Ou quelqu’un d’autre peut-il créer un composant de thème fonctionnel ?
Salut @debryc et @OverseersMight ,
Si vous êtes toujours intéressés ![]()
