• Development

    Private Messages – Moving “Delete” button into “Actions” select list

    By default the “Delete” operations will show as a buttonĀ on Privatemsg‘s message listing page. There is an “Actions” dropdown that includes actions to “mark as read” or “mark as unread” so why not include “delete” there?

    Luckily the module developers included a hook to easily override the options. If you set the “button” property of the “delete” operation to FALSE it’ll render in the select list instead of as a button.

  • Development

    Allowing Users to Cancel Their Own Commerce Licenses

    UPDATE: I’ve written a contrib module called Commerce License Cancel to get the ball rolling to make this a community effort. Read on if you’d like to see how I got there.

    There’s been some talk in the issue queue for Commerce License Billing about needing a way for users to cancel their own licenses. Here are some pieces and parts that I’m using to achieve this. This is a work in progress and I’m really just posting here so I can provide a clean link in the issue queue. Sorry for the lack of detailed explanations; hopefully you still find this helpful.

    There’s already a method to “revoke” a user license. When you revoke a license, the recurring billing should close out automatically and the role granted (if it’s a licensed role) will be taken away from the user.

    The site I’m working on has just a few “membership plans” or levels that a user can purchase. For this reason, I could hardcode a few things. It’d take a LOT more work to make this stuff ready for the masses.