This new feature looks cool but I am just unclear about how it functions or why one may use it. Did not see anything in the docs so was just wondering.


aaronbauman’s picture


please tell us what this feature does.

NancyDru’s picture

Perhaps Likeless can tell us because I haven't gotten into that feature yet.

venusrising’s picture

Yes would love to know.

badzilla’s picture

I think I've figured this out. This feature enables the assignment of arbitrary achievement badges to users. So for instance one of my clients is a political campaigning organisation - therefore it should be possible to assign a badge for activists who attend a particular campaign. Of course it is not limited to this - it can be any set of terms you chose to put into a taxonomy vocabulary. Another example would be to assign different badges for members of staff at different geographical locations (See my example following the link below). The vocabulary is selected in the user_badges settings page.

The problem as I see it is there is no front-end functionality within the user_badges module to actually save this information in the database table user_badges_user. So perhaps the author of user_badges has left this for the community to implement?

I have created a module to do precisely this. I've called it user_badges_taxonomy. Link below. This adds a tab on to a user's profile and lists all the achievement badges available next to a checkbox for each badge. Someone with the correct permissions can go to this page and tick those badges a user has earned.

NancyDru’s picture

Thank you, badzilla. Since user_badges_taxonomy.install has no functionality, it is not needed. Then I suggest you run it through the Coder module as I see some things that are not to Drupal coding standards. After I get up to speed on Git, would you like to include this with the module distribution?

badzilla’s picture

Yeah I included the .install file as a placeholder in case additional functionality including db schema additions came along. In retrospect probably not a great idea, so happy to remove.

I have a whitespace-centric coding style which I find more readable than the Drupal standard, but I can run the code through Coder for the benefit of the community so it can be included in the distribution.

NancyDru’s picture

Talk about coincidence! I just finally met Webchick on Thursday and recalled one of our first encounters on D.O. On the publishing of my first contributed module, I had used my own variation of the standards, which had a lot of extra white space too; she really fussed about that. I told her pretty much the same thing. As I did more and more Drupal development, I began to see the wisdom of Drupal's standards (except concatenation, which has now been changed). Now I have trouble reading code that's done any other way, and even when I do non-Drupal code, I still follow those standards.