For my website I'd like to make a clear distinction between admins, moderators and normal users. Now all usernames are grey, but I'd like to see admins' and moderators' username have a different color. I could do this by applying colors for every role, but that's inefficient and some roles actually have the same 'rank', e.g. forum moderators and news posters. They're equal.
I would like to be able to create ranks to which roles can be applied. A rank would describe a user's level of privileges rather than the privileges themselves. You can look at it as a group of roles.
The idea I had on how to make this happen was to give every role a select box with values -10 to 10 (similar to the weight select boxes of terms etc.). This 'rank' value would be saved in the same table as the roles. It doesn't need a table of its own, because there are only rank IDs and no names etc. Again, this was what I have come up with. You developers might know a better way to implement this.
I hope I've been clear enough on this and you understand what I mean.
Comments
Comment #1
xanoSubtle kick.
Comment #2
xanoNo one interested in such a feature?
Comment #3
xanoKick.
Comment #4
Susurrus commentedThis sounds like something that would be better served by a contrib module. As it stands, however, there is a lot of discussion about modifying the roles system and that could make a contrib module for this easier to make. As of right now it sounds like this functionality doesn't require any core hacking and is specific enough that it shouldn't be handled in core.
Comment #5
Gurpartap Singh commentedThere are contributed modules to get those features. Also you can override theme_username with your customized template and set the colors, as per user's choice in their profile(using profile module, or custom code).
I don't think such a feature will make it to core, as this requirement is very much site specific.
Comment #6
xanoIt could be implemented pretty easily by just calling it 'weights', but perhaps you're right in saying it's site-specific. What modules do you know that provide this feature?
Comment #7
Gurpartap Singh commentedYou don't really need any module for that. Enable the profile.module included in Drupal itself. Create a multiple options(maybe checkboxes) field, add the options for your rank/group names. Then edit the profile template, and the theme_username template, and according to the profile field value for ranks, make your changes!
Comment #8
cwgordon7 commentedI agree, this is site-specific and would best be served in a contributed module.