Este componente de tema está obsoleto e não deve mais ser usado. Seus recursos agora estão no Discourse Core (veja: Trazer recursos populares ao Discourse).
Para personalização de ícones de categoria privada, consulte este tópico.
Resumo
Category Icons permite que links de emblemas de categoria tenham ícones ao lado do nome da categoria.
Note que este componente também permite que você substitua o ícone de bloqueio de categoria usado para denotar categorias privadas.
Veja também o componente Tag Icons (que faz a mesma coisa para tags).
Configurações
Nome
Descrição
category icon list
A lista de categorias e seus respectivos ícones
svg icons
Adicionar ícones extras não incluídos por padrão
category lock icon
O ícone para substituir o ‘ícone de bloqueio de categoria’
Para adicionar um ícone a uma categoria, insira os detalhes separados por vírgulas assim: “slug,ícone,cor,correspondência”
A cor está no formato #123456, ou “categoryColor” para usar a cor padrão da categoria (a mesma da cor do Emblema)
Se a correspondência for “partial”, o slug precisa corresponder apenas parcialmente ao slug da categoria; caso contrário, uma correspondência exata é necessária.
Problemas
Não respeita corretamente a cor do ícone ao usar com o estilo de categoria bullet. Em geral, no entanto, isso não deve ser usado com os estilos de categoria bullet ou bar, pois a interface ficaria desnecessariamente poluída.
Histórico de desenvolvimento
Obrigado a @rogerco, por adicionar a palavra-chave “partial” para corresponder parcialmente aos slugs de categoria (ou seja, inserir “book,icon,red,partial” corresponderia a todos os slugs de categoria contendo “book”).
Hospedado por nós? Componentes de tema estão disponíveis para uso em nossos planos Standard, Business e Enterprise.
This component has had an impact on our forum in an artistic way. I like it.
However there is a problem with category names. I created a category with the name of “Doğa Bilimleri”, but later changed its name to “Bilim” and created a sub-category with the name of “Doğa Bilimleri”.
Before:
After:
I only assigned an icon for the category of “Doğa Bilimleri”, not for “Bilim”.
But the flask icon has been assigned for both “Bilim” and its sub-category “Doğa Bilimleri”.
I cannot also assign an icon to a category whose name I change if I use the new name of it, yet the old name always works. (I solved this one: This is all about “category slug”. If you leave the category slug with the old name, you will experience same pseudo-problem.)
Edit: I figured out why the flask icon is assigned for the main category. It is because both the main category and the sub-category include same word “Bilim”. Even if I give a random name like “abcdefbilimghjk” in the category icon list, it will still assign the icon I choose to the category “Bilim”, since the random name includes the word “bilim”.
Hi Emre, thanks for the report, I’ve now fixed the issue with loose matching of slugs. If you update the theme, it should be resolved, “abcdefbilimghjk” will no longer apply the icon to the “bilim” slug.
First, a big thank you to @pmusaraj for making this great theme-component.
I have configured it on my site, but have two issues:
There seems to be no way I can “attach” any icon to Jadran category
I have tried with various icons, even the ones that are working on other categories with no success.
Configuration is the same as for other categories:
I have an idea, why “Jadran” does not work: I have another category “Jadranje”, which includes first name. I would expect that slug would be checked with exact match (everything between /), right?
Is there a possibility to upload own svg icon and then use it as category icon? I tried to upload it on Category icons upload, but not sure how should I reference it?
Do you have any plans to extend this to the sub-category boxes Penar? Would be awesome to have them everywhere. My site looks great with all these icons now, appreciate this!