Alternatives to lock icon for categories


(cpradio) #49

It can be done using CSS. It doesn’t require a whole lot. My thought on the whole thing: If people aren’t customizing it on their instances, then obviously they don’t care enough that it needs to be changed. Yes, we changed ours. We cared enough to do so. We also added a watermark in the background on topics that are in private categories, because we cared enough to do so.

I’m not sure everyone else cares that much…


(Jacob Chapel) #50

Having it be configurable allows us to put custom icons for categories, not just for private ones. Just because it can be done with CSS, though in a less clean way than changing a config, doesn’t mean it is the best solution now.


(cpradio) #51

You really need a config that does the following for you?

.badge-category i.fa.fa-lock:before { content: "\f084"; }

I mean, really. It is a one line customization.


(mountain) #52

I am guessing he meant something hard-coded. Eg, an image and text together, instead of using CSS. That is in case the CSS sheet isn’t included but the icon still shows regardless.

That makes the icon more than just a ‘style tweak’ but instead an integral identifying aspect of the ui that sticks regardless of what stylesheet is put in.


(cpradio) #53

You can do all that with CSS too :smile: It may be ~4 lines but definitely do able. Plus since you can enable multiple styles now, you can simply have one for category alterations and keep it enabled :wink:

My point was, no one is really customizing this icon today. So we’re bikeshedding here. “It would be great if we use X or Y or Z” without actually seeing people using it.

I simply showed how easy it is to customize the icon. The background image is a bit harder, but by a smudge (I haven’t tested this, but it should be relatively close).

.badge-category i.fa.fa-lock:before { content: ""; } /* remove the existing icon */
.badge-category i.fa { background-image: url('...'); background-repeat: norepeat; padding: 6px 6px 6px 6px; } /* assuming 12x12 icon */

Is there a way to remove the lock badge for some categories but not for others?
(mountain) #54

That’s what I mean, it’s CSS. Unless if there is never a case where a stylesheet may not come into question (or may not temporarily be available due to it being hosted on a CDN that’s having server problems)

But I agree it’s bikeshedding. My point of contention is having some options customizable from the admin CP that has staying power without a stylesheet.


(Jacob Chapel) #55

If there were an option I’m sure more people would use that option.

Keep inind thee is no way to have different icons for different categories with just CSS. Well its technically possible but very janky and brittle.

I would use custom icons, and in fact had done so but had to override the template and it wasn’t very clean. Ended up removing it at the time because there were multiple areas where category templates weren’t the same.


(Sam Saffron) #56

I’m fine to add category slug to badge wrapper, though technically you can already target the href


(Jacob Chapel) #57

Yes but I feel that is hacky. Honestly I’m not hell bent on anything here. Just speaking my piece. I think its wrong to dismiss the various opinions here since they aren’t really wrong all around.

:smile:


(Sam Saffron) #58

It is hackey. Also to be clear, @codinghorror is listening it’s just that it takes a pretty strong argument to change stuff again

I am not particularly happy with changing to lock, but I do understand the reasoning behind it and drawbacks of group icon.

One of the things that makes discourse so awesome is that we all care enough to discuss it


(Jacob Chapel) #59

Exactly. If we didn’t care we wouldn’t talk at all or at least not with such fervor.


(mountain) #60

Huh, I just mentioned that same sentiment to someone else on another project. [05:14 AM] Tarak’ha (ooc): For me, when people complain, it means they would rather stay instead of skedaddle.


(cpradio) #61

That should probably be its own discussion. As I don’t get the feeling that @sam’s topic was about custom icons per category, but rather, that he doesn’t care for the default lock on categories that are restricted. Two different problems here as yours would expand to categories that do not have restrictions.

I simply wanted to point out that @sam’s issue is easy to overcome.


(Courtney Drake) #62

@jvzr How did you go about hiding the icon? I’d like to do the same thing on our forum, same principle that folks don’t need to be reminded if they have access to additional categories.


(cpradio) #63
.badge-category i.fa.fa-lock:before { content: ""; } /* remove the existing icon */

Howto: Change lock icon for restricted categories
(AstonJ) #64

An eye or slashed eye would be a good fit. (Doesn’t matter if it has been used for unlisted topics - it says the same thing, this is hidden/restricted).


(Mittineague) #65

As discussed earlier in this topic, it is a simple CSS fix to change the icon to whatever Font Awesome icon you prefer. Or did you try that unsuccessfully?

except if you want the slashed eye use "f070"
http://fortawesome.github.io/Font-Awesome/icon/eye-slash/


(AstonJ) #66

Sorry, I did not read the whole thread or even look at the CSS :blush: (still think it needs to be fixed in the core product mind).


(Daniela) #67

Changing an icon globally is very simple using APIs


(Daniela) closed #68