a rough patch attached

Comments

levelos’s picture

Thanks justafish, appreciate the help. At first glance, this patch doesn't reflect the role based assignment of each list, though. If you notice, the function get_available_lists, filters the available lists for a given user based on the roles their in. I didn't see a way around this and is why I actually gave up on the idea. Your thoughts?

spatical’s picture

Version: 6.x-2.0-beta5 » 6.x-2.0-rc4
StatusFileSize
new2.15 KB

Here is my patch for the functionality. I only slightly changed the hook_block method. How mine works, might not fit all situations. There is a block for each list. The method still uses get_available_lists. Notice the rc4 version.

For anonymous users it works great, now with separate blocks you can display the different opt-in forms in different places on your site.

For authenticated users every block turns into a update subscriptions block, so you may want to only leave one block visible for authenticated users, depending on your usage.

levelos’s picture

Status: Active » Fixed

Thanks for the patch. I took a bit of a different approach, but this is now implemented.

spatical’s picture

I tried your approach, by installing rc5 on my site. Works for me!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.