I originally proposed this over at #235956-1: Tie publish/unpublish of bio nodes to the user's status (active vs. blocked), but we ended up solving that problem via other means. However, I was so struck by the coolness of the approach (and I actually need some of this for the bio-based site I'm building), that I just whipped up a quick patch against bio_views.inc to implement this. Tested it all on a local site, and it's all happy to my eyes. So far, it's just exporting some fields. Adding filters, sorts and arguments for these should be pretty trivial now, so that's left as an exercise for the interested reader. ;)

Any objections, or should I commit this?

Thanks,
-Derek

Comments

dww’s picture

StatusFileSize
new4.83 KB

Bah, turns out views_handler_field_email() is only defined by views if the core profile.module is enabled (which is a views bug, IMHO, but I know Earl has his hands full). So, to get the email fields to show-up as mailto: links, we need to conditionally define this trivial handler ourselves...

webchick’s picture

Ok, I didn't quite understand from the description what this is doing, so I asked dww about it on IRC. He said basically this would allow you to place aribtrary user table fields (like e-mail address, signature, user picture...) into a View that shows bio nodes. Sounds pretty awesome to me!

No time to test but +1. :D

dww’s picture

Sorry the original description wasn't verbose enough... I needed to expose stuff from {users} to a view of my bio nodes. In particular, I needed a column in my user directory with the user's email address. But, while I was at it, I exposed the account status, username, picture, signature, and access, creation, and login timestamps, since it was all so trivial to do at the same time. ;)

senpai’s picture

Status: Needs review » Reviewed & tested by the community

Tested and WAI with Views 1.6 and Bio 5.x-1.x-dev. I copied the recent_biographies View and was able to make a page that shows a List View of all users with an email address. (Which is both of them on my test site, but even so, I saw a List of user's email addresses. Saw-weet!

RTBC

dww’s picture

Status: Reviewed & tested by the community » Fixed

Committed to DRUPAL-5. Thanks for the testing, Senpai.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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