OpenRA / openrauseraccounts

Connect phpBB forum accounts to OpenRA installations
https://forum.openra.net/ucp.php?i=232
GNU General Public License v2.0
3 stars 3 forks source link

Give registered players a default badge #18

Closed ghost closed 6 years ago

ghost commented 6 years ago

See http://logs.openra.net/?year=2018&month=07&day=01#19:19:24. This should supplement the new player indicators and not replace them.

This will need to done automatically because unlike the other badges, this can not be handled manually by the board admin. I'm not sure if the badge should be given to all registered users of the board or if there should be other requirements, like having a public key / fingerprint associated to the user that has been accessed.

ghost commented 6 years ago

After inserting the fingerprint manually in the db (authentication does not work on my end) I had a first look at the ingame UI and I have to say that I really like how it looks. I'm not so sure if the "Registered user" badge really is a good idea as it feels a bit redundant to the new player indicators. Instead, there could be a list of default badges with references to the c&c saga for example of which the user could chose one from. In either case (and if there should be something like a default/set of standard badges) this is something the OpenRA devs will need to decide so this is just a suggestion, see #21.

ghost commented 6 years ago

I will implement an a set of default badges which will be shown as radio buttons in the UCP badges module and add a config option for enabling/disabling the feature in the ACP badges module. This will exist next to the badge ordering interface and will if activated and set to use a default badge reduce the number of shown badges from the ordering table by one, so it stays at 5 in total. Radio buttons will be added/removed for each badge that is marked as "default" in the ACP badge module.

ghost commented 6 years ago

I have implemented an interface which allows users to select a default badge from badges that are marked as "Set to default" in the ACP badges module. "Mod Fan Club" is the label which I defined in the ACP badges module when adding the badges.

See demo below: 13723

The feature is finished but not linked to a config option yet which is the last thing to do here. Once you have set a default badge, you can not remove it but only set another default badge. Removal could be implemented too but I don't plan to do so at the moment.

pchote commented 6 years ago

This looks really nice, but seeing this makes me think that we really should support enabling multiple default badges (players might want to be in more than one fan club, or advertise more than one OS).

How about having a second table listing the default badges with a checkbox on whether to include in the profile. Enabling the checkboxes then adds them to the profile badges section.

ghost commented 6 years ago

What about if we use hidden checkboxes instead of radio buttons for the default icons? I like the look of it more than having another table tbh. This would also mean less work. You could then select multiple icons and they would be saved in the user badge table on submit. This would also allow to remove all default badges because unlike radio buttons in a group, checkboxes can be all unchecked.

pchote commented 6 years ago

I like your idea above for having both the default mods and OS choices (possibly including different linux distros) as default options. This means at least 6, but possibly more than 10 default badge choices. It would IMO be messy to not have a table for this many entries.

ghost commented 6 years ago

Good point. Let me see if I can come up with a good visual implementation, otherwise I will take the approach you mentioned.

ghost commented 6 years ago

Implemented the UI for selecting/unselecting default badges. The grouping by OS/Mod/Misc will require another yes/no input in the ACP badges module which I haven't done yet. 100

ghost commented 6 years ago

There is now a ACP module mode to add/edit/delete badge types and a list of these types to select an option from when adding new badges.

Feature is finished with the mentioned limitation that you currently can't remove the last default badge once you have selected one, which is something we can live with in v1 IMO.

ghost commented 6 years ago

You can now remove all badges from your profile so this can be closed.