Steven
Maio 14, 2019, 1:59pm
1
Uma apresentação mais leve da lista de tópicos para seu fórum Discourse. A coluna de postadores foi removida, mas algumas informações foram adicionadas (nome e avatar do último postador) na coluna de atividade e abaixo do título do tópico (nome do criador do tópico e um pequeno emoji para as tags).
Compatibilidade
Este componente de tema é compatível com as funções de tags, links em destaque e qualquer função disponível na versão original da lista de tópicos . Qualquer estilo de apresentação de categoria (lista com marcadores, barra, caixa) deve funcionar com este componente.
O componente de tema foi testado em algumas paletas de cores e funcionará com temas claros, neutros ou escuros.
Infelizmente, o componente de tema pode não funcionar com plugins que já alteram a apresentação da lista de tópicos, como as Pré-visualizações da Lista de Tópicos.
Avise-me se tiver algum problema!
29 curtidas
Love this component.
Is there any easy way to make the poster-info div exactly as in the screenshot?
I think this makes it more readable
Author name above
Relative-date below
2 curtidas
Steven
Setembro 29, 2019, 10:22am
4
It’s not a bad idea actually, I might use this by default
But for now, you can edit the component, ib the header part, around line 60 to 69
Original
<div class='poster-avatar'>
<a href="{{topic.lastPostUr}}" data-user-card="{{topic.last_poster_username}}">{{avatar topic.lastPoster usernamePath="username" imageSize="medium"}}</a>
</div>
<div class='poster-info'>
<a href="{{topic.lastPostUrl}}">
{{format-date topic.bumpedAt format="tiny"}}
</a>
<br />
<span class='editor'><a href="/users/{{topic.last_poster_username}}" data-auto-route="true" data-user-card="{{topic.last_poster_username}}">{{topic.last_poster_username}}</a></span>
</div>
What you want to use
<div class='poster-avatar'>
<a href="{{topic.lastPostUr}}" data-user-card="{{topic.last_poster_username}}">{{avatar topic.lastPoster usernamePath="username" imageSize="medium"}}</a>
</div>
<div class='poster-info'>
<span class='editor'><a href="/users/{{topic.last_poster_username}}" data-auto-route="true" data-user-card="{{topic.last_poster_username}}">{{topic.last_poster_username}}</a></span>
<br />
<a href="{{topic.lastPostUrl}}">
{{format-date topic.bumpedAt format="tiny"}}
</a>
</div>
You’ll need to edit this after each update but the component will not be upgraded that much.
You could also fork the repository, edit the file and use this version on your forum, if you’re familiar with github
5 curtidas
Steven
Outubro 2, 2019, 10:50pm
5
I tried this change on my forum and I think it’s a good idea, I pushed an upgrade
If you prefer what we previously used, let me know, I can make an alternate version
6 curtidas
@Steven did it stoped working with the last update? Its broke here.
1 curtida
Steven
Novembro 29, 2019, 11:48am
7
I didn’t notice yet, I usually do my upgrades on the weekend, I’ll check this tonight
Steven
Novembro 29, 2019, 5:29pm
8
I upgraded a forum and checked the logs, no issue for me.
Can you share a screenshot of the issue on your forum ? If I remember correctly you use a heavily customized theme, I think it might come from it. But I’ll see what I can do
3 curtidas
I don’t use this theme anymore.
I tested in Material Design without CSS customizations, can’t make it work in any theme. Maybe it’s a plugin?
Steven
Novembro 30, 2019, 9:04pm
10
If you have Discourse topic previews for example the component will not work because it also uses change the topic-list-item.raw template
1 curtida
You’re right about it. But I only use it for News Plugin 📰 , that requires the Topic Preview.
So I have to choose between then.
Looks awesome on my forum and the little tag emoji is nice haha, awesome work!
2 curtidas
Using this too on my instance. Looks so much cleaner. I never understood the concept of the 5 avatars, looks so cluttered.
1 curtida
Just updated to the most recent ver of discourse ( 2.5.0.beta2 ) and it seems user avatars on posts have disappeared.
Forum link: https://techscammersunited.com/
1 curtida
Steven
Março 26, 2020, 1:51am
15
I’ll check this tomorrow, I updated a few days ago, and it was fine, maybe something changed
3 curtidas
Steven
Março 26, 2020, 1:28pm
16
Thanks for reporting, it is fixed now. You can upgrade the component and reactivate it
3 curtidas
Ah, ty for the quick fix man! It’s working like a charm now
I have updated to the newest version and my avatars are gone (2.4.1).
I had to disable this component for now.
Steven
Março 27, 2020, 12:58pm
20
You need to upgrade Discourse also and it will be fixed
2 curtidas
Unfortunately for me, that means lots of upgrades (18 custom plugins) so I tend to update once every 3-4 months. I guess I am out of luck
Anyway to access the previous version?