Closed (fixed)
Project:
Views (for Drupal 7)
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
26 Jun 2007 at 22:31 UTC
Updated:
18 Jul 2009 at 08:11 UTC
Jump to comment: Most recent file
Comments
Comment #1
Zack Rosen commentedWhat the field looks like.
Comment #2
Zack Rosen commentedField options.
Comment #3
Zack Rosen commentedoops. THIS is what the field looks like.
Comment #4
Zack Rosen commentedI probably shouldn't send null in the $absolute param.
Comment #5
merlinofchaos commentedShould this check to see if the user has permission to even visit the contact form?
Comment #6
Zack Rosen commentedGood point Earl. The easy way to do this is with the _contact_user_tab_access($account) function. Should I call this function directly even though it is internally declared as a helper function?
Comment #7
merlinofchaos commentedShould probably call it directly. But that leads to another issue: This should probably be in views_contact.module rather than views_user.module since this feature won't exist if contact.module isn't enabled.
That means creating a new file for this feature.
Comment #8
merlinofchaos commentedComment #9
joshk commentedHere it is as it's own .inc file.
The _access_user_contact_tab() thinger seemed to be for HEAD, so I've copied DRUPAL-5's definition for access on the contact_menu $item, which checks to see that the global $user->uid is non-zero.
Comment #10
joshk commentedJust pinging this to see if there's any progress. 6.0 perhaps?
Comment #11
karens commentedPulling out this old request. I needed a way to put a link to the user contact page into a view, so I got this working in Views 2. You can create your own text for the link or use the icon image. It turns out to be pretty simple to do in Views 2 using the older code as a starting point.
Per the comments above, it's in a separate contact.inc file and we test user access with _contact_user_tab_access($account).
Comment #12
karens commentedIt also works nicely if you create a view based on the user table of your users to show a contact link next to each name.
Comment #13
karens commentedOne more time, the previous patch had another patch in it, this one is clean.
Comment #14
jfkelley commentedApologies in advance for being a total newbie (and probable ignoramous)...
I applied the 2/6/2009 patch above to my Drupal 6.9 views/includes/handlers.inc (which also created 2 new files contact.views.inc and views_handler_field_contact_link.inc)
I'm looking all over the Edit View page for my user_list view (straight out of the examples that came with the views module) and I'm not seeing anything like the configuration objects shown in contact_view.png above.
I'd love to have a contact link on my table of users/profiles like in the example above.
What step am I missing?
Comment #15
merlinofchaos commentedYou probably need to flush your cache. You can go directly to mysql and TRUNCATE cache_views;
Comment #16
merlinofchaos commentedCommited to 2.x and 3.x branches.
Comment #18
gpk commentedFollow-up at #523222: Access check is done twice on link to a user's contact form, and incorrectly.