Is there a way to distinguish between categories visible to logged in users only and categories visible to certain groups?
At the moment, I use CSS to hide the lock icon in front of all categories that are visible to logged-in users only. Now I would like to put a group icon in front of categories that are restricted to groups.
While I understand your question, I am thinking about the use case. Especially because only users who can see the categories, see the categories regardless of groups or logged-in state. So how would the differentiation help? I do not think there is way though, but I might be wrong.
The use case is the same as for the lock icons, which, I think, is to remind users: if you post here or share a link from here it won’t be accessible by everyone.
I feel like I don’t need that reminder for login-only categories, because very few categories on my site are visible to anonymous users. (Instead, I mark the publicly visible category’s with an icon to remind users that these are out in the open internet.)
For categories that have more restrictions than “must be logged in”, it can be less obvious that they’re for a more or less exclusive group only. New users might have been granted access to a group when they first created their account. So from day one they’re seeing a different set of categories than some other users, but unless the category name or description (if they read it) includes a hint, they couldn’t tell that a category is visible only to some. Older users might forget that this one category they once were granted access to is not in fact accessible by all.
So, in short, a quick visual reminder like the lock icon makes more sense to me for restricted categories than applying it to almost all categories on a mostly logged-in only site.
We’ve recently made a category restricted to a higher trust level and now people keep thinking those topics have been closed. Closed and restricted are different things and it is confusing for them to have the same icon. A lock is generally understood to indicate that the person seeing it doesn’t have full access, not that it is hidden from other people.
In the meantime, I decided to indicate in front of each category, what the level of access is. I’m using a globe for categories that are public (anonymous access), a “group” icon for categories accessible by logged-in users and a “friends” icon for other restricted categories.
¿Cómo lo estás logrando? Creo que es una gran idea y, a medida que acercamos nuestro sitio a tener un par de categorías públicas, me encantaría hacer algo similar para ellas. ¡Me encanta el globo terráqueo!
Me encantaría lograr:
en Categorías configuradas en everyone
Sin icono establecido en Categorías que permitan el acceso a trust_level_0
Sí, eso es lo que uso. En el campo svg-icons, introduce users, user-friends y el símbolo que quieras usar para acceso público (para el globo, estoy usando un icono de Freepik, que he añadido a mi Discourse a través de un sprite subido a un componente de tema)
Oculto el icono del candado con este CSS añadido a un componente de tema:
// no lock icon for private categories
.category .badge-category.clear-badge.restricted .d-icon-lock,
.badge-category.clear-badge.restricted .d-icon-lock,
.category-list .category-text-title .d-icon-lock,
.category-box-heading .d-icon-lock {
display:none;
}
He desarrollado una variación de tu idea, donde puedo ocultar el icono de candado selectivamente solo en las categorías a las que se puede acceder manualmente (TL_0).
Dado que no hay una clase CSS conveniente para esto, debes apuntar a las propiedades hover (título) y link (href) en su lugar, y también debes hacerlo para cada una de las categorías para las que deseas ocultar el icono de candado:
// oculta los iconos de candado para la categoría de ux
[title = "ux"], [href = "/c/ux/9"] {
.d-icon {
display: none;
}
}
Por supuesto, entraría en conflicto con cualquier icono del Componente de Iconos de Categoría, pero esto se puede mitigar apuntando a .d-icon-lock (o el icono que estés usando) en lugar de .d-icon para esa categoría.
Acabo de editar ese CSS después de descubrir que me faltaban algunos de los iconos. Ahora funciona mucho mejor, pero se romperá fácilmente si cambias la estructura de tu categoría.