Role Weights

11th Apr
2006

role_weights_1.pngWell, I've applied for CVS access on drupal.org, been approved, and committed my first module: Role Weights. This module allows admins to specify weights for roles, which other modules can then make use of.

Role Weights is simple, and not all that much use on its own. I committed this one first as it was the simplest to get up to a reasonable standard (although there is always room for improvement). Please try the module out if you are a Drupal module or theme developer, or a site admin with a bit of coding nouse. One example of use is in theme functions for user profiles and usernames: select the 'highest' from multiple roles for theming (eg a user could be an admin and a subscriber, but we'd want to show that admin takes precedence when theming their profile).

I'd love to hear from any developers who use this utility module to provide role weights for their own theme or module: please comment on this thread or submit an issue to the project.

I have some more code up my sleeve we've worked on at Leafish for several past projects, but they are larger modules with several areas left to polish before I release them. They are:

  • Request Role: allows users to request a role at registration, subject to admin approval;
  • Simple Invoice: allows creation of quotes, invoices and receipts, includes printable versions and reminders;
  • Blingo: a simple 'shoutbox' type module, with the ability to 'upgrade' shouts into nodes;
  • Personal RSS: allows users to enter specific RSS feeds into their profile (eg del.icio.us, digg, last.fm), which will be added to a specific aggregator category, and shown on their profile as aggregated items.

So, thanks the the Drupal team for approving my account, and I hope that someone out there finds use for some of things I contribute.

Views support

I've recently added in some first steps towards Views support to this module. With Views and Role Weights enabled, user-created views can now access/display or sort by the node author's role weight.

Paul, i managed only

Paul, i managed only yesterday to test your Role-weight mod and it seems to work fine on me (4.7 of course). Integration vith Views rocks!

Sorry for my late reply, have been two very intense weeks..!

Will anyhow test further in future, and eventually let you know of any prob...hopefully not ;)

Cheers, Marco

Post new comment

The content of this field is kept private and will not be shown publicly.