Bypass the 6 badge fav limit

So out communities have a very specific use for… badges. Some have 4 badges and they’ll do fine.

However, we also have users with 24 badges!

image

I want to know if there is a way to make the max_favorite_badges to be set ABOVE 6:

discourse(prod)> SiteSetting.max_favorite_badges = 50
lib/site_settings/type_supervisor.rb:308:in ‘SiteSettings::TypeSupervisor#validate_value’: max_favorite_badges: Value must be between 0 and 6. (Discourse::InvalidParameters)

Nope. The max value is set here:

I don’t believe there is any way to change a maximum value, they are usually set that way for a reason.

Do you know if there is a way to bypass the suggested value? With the risks fortold taken into account. (eg. no support is something badge related breaks)

What exactly is your use case for allowing that many favorites?
I think 24 badges would be a lot for a usercard - at least in the default theme. Where do you want to use those favorites? Maybe there is an alternative to using this site setting. For example, the post badges plugin allows users to select which of their badges is shown next to their name on their posts.

No, I don’t think that’s possible right now. It would be a bad idea to let people bypass the limits put in place, which as I said, are almost always there for a reason.

People want to display all their badges on their profile, it’s a specific request for the type of community because people participated in several competitions, they’re an “Mentor”, or “Moderator” or even an “translator” and they want a place to show every single one of those. I have both the groups and badges currently, but can only display the single group icon on the post and the badges (6) on the user card.

Looked into that, all badges (admin made) need to be displayed by default. And it doesn’t seem like that plugins allows you to do so.

This is VERY MUCH community specific, because of how the community works with the badges on the platform (Resonite). Hence why it’s such a specific request :stuck_out_tongue:

All of their badges are visible on their profile. You can see all my badges here: https://meta.discourse.org/u/moin/badges.

Into the plugin I linked or into the theme component?
Maybe it’s not exactly what you need but it may still be a good starting point for creating what you need.

Plugin, you did not link a theme component… I think.

I am blind, you called it a plugin but it IS a theme component. So in that case, the component.

Checking again, I can do it with the component, but still have to manually add all 160~ badges. See here:

I called it a plugin because the post I linked contains a plugin. It’s not my fault that it is discussed within the topic of the theme component :person_shrugging:

The plugin allows users to select the badges, while in the component the admin decides which badges are shown. I thought that the plugin might be closer to selecting favorites.

increasing to like a dozen is likely possible with a custom plugin, or some rails commands and accompanying css to fix the layout issues, but doing 50 would bloat json payloads and bork a lot of stuff. any increase in the default hardcoded badge limit would be pretty fragile i think.

I checked your site, there’s a lot that could just be self-serve groups or even user fields (like the sexuality/impairment ones). Badges are meant for achievements, like the rest of them are or seem to be.

Unless having flag flairs is important to you, I’d recommend just making a user field for things like that.

They sure are. In my opinion, it’s often good to share the reason™ if known :slight_smile:
Could be for readability purpose. For request optimizations. For both, for others purposes, whatever.
Personally I always feel satisfied when someone asks about something and the reason™ is given at some point :smile:
Sometimes, even the reason™ can be rightfully challenged by users :slight_smile:


@codixer if the limit can’t be increased from the interface, then posting in Contribute > Feature is the way to go (or you can try the plugin way, but I’m not sure we can override this setting, even with a plugin).
There’s little chance a change will happen if the topic has no traction and nobody else asked for this (especially customers), but asking a feature request can’t harm!
Like many others, I’ve occasionally opened feature requests that got no likes nor votes, even if I thought I had fantastic ideas :face_with_tongue:

Yeah, I’m looking for something that can display based on the groups of a user. And just the primary group didn’t really work. Got an alternative?

They are, same as the actual platform its for. If you have an alternative. I’m open for any :smiley:

if you have a budget and need this, post in Marketplace and i may be able to help

If I did know I would have said it for your same reasons :sob: I just figured the 6 number got landed on at some point one way or another. If I was making a total wild guess it’d be for user card (because 6 is already a lot) readability but staff would probably know better than me :slightly_smiling_face: