Hello,

Pardon my non-tech question: is the module already integrated with 4.7?

I am looking to set 3 different roles (memberships), and have listings (flexinodes) sorted by role. Is this already possible just installing Roles by Weight out-of-the-box, or do i need to hack node or flexinode modules?

Thank you very much, for the nice contribution and for eventual support ;)

Marco

Comments

pfaocle’s picture

This module simply allows setting of weights to roles, and provides a form to edit them. This module does not actually do anything on its own. However, once its enabled, other modules (or PHP snippets/themes) can call two functions:

  • function role_weights_get_weight($role_id) - gets the weight value for a specified role
  • function role_weights_get_highest($roles) - gets the highest role from an array of roles

So, in answer to your question, you'd need to edit in some code somewhere. A PHP page could provide the listings?

Or, could Views be the answer? It often is... ;) I may look at whether I can allow Role Weights to expose the weights as a sort criteria when I'm less busy.

pfaocle’s picture

I've submitted an issue on Views integration. I'm working on it!

pfaocle’s picture

Status: Active » Fixed

Views integration should work now, if you want to give it go! Would appreciate the testing/feedback.

Anonymous’s picture

Status: Fixed » Closed (fixed)
marcoBauli’s picture

Version: » master

Managed only yesterday to test this feature, and it seems to work fine on me (4.7 of course)!

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

Cheers,
Marco

pfaocle’s picture

Thanks! Could you keep an eye out for Bèr's problem described here? I haven't been able to reproduce it - the more people testing the merrier.