Please excuse the posting here but as you cannot attach files in comments it seems I'm putting some files in here for another user at http://drupal.org/node/769096

I'm fairly sure the patch worked for me but I might have made it work and forgot. I've attached both of the patches I use (the other one properly sets a reply-to address for restrictive isp's). I've also attached both the contact module file and the contact module inc file so you can drop those right in if need be....

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jdln’s picture

Hi Chad
The Patch is working, on a users profile page I can now send them a message, even if im unregistered.

The only problem Im having is that the View Field 'User: Link to contact page' isnt working properly. It works fine for registered users, but unregistered users see the label 'Link to contact page:' but then their is no link.

I can get round this with a message saying 'click for more info or to message this user' so its not a critical issue at all. Maybe this isnt worth fixing at all if it will be superseded by the next update or version of Drupal.

Thanks again for your help. I really appreciate it and im sure the charity im making the site for will too.

Chad_Dupuis’s picture

Well if it's every user that can be contacted don't use the view field 'user:link to contact page' - just use link to user's profile and then customize the link within views to add /contact on the end of the url... Does that make sense? This of course would only work if you want every user on the site to be contacted....

jdln’s picture

I think thats similar to the work around I was talking about.

Ive made a list of users with Views so you would have to click on the link the profile page, and then click on the contact link. Having the second step is redundant as their is no extra information on the profile page that isnt in the list view.

This is obviously quite a minor issue though.

Chad_Dupuis’s picture

Add User: Uid to your view and click "exlude from display", then you can rewrite one of the fields below that one to include it in a custom made url that adds the contact link - something like - select "Rewrite the output of this field" in views (on any item below where you have derived their user profile) and then put in something like <ul><li>[name]<br /><a href="/[user_uid]/contact">Contact This Person</a></li></ul>

I hope that makes sense to you, if not play around with some of the settings where you see rewrite the output of this field and you'll figure it out...

jdln’s picture

I used this code user/[uid]/contact and it works.

Thanks a lot. Ive learned a lot from this.