I would like for an anonymous user to be able to send the node author a private message directly from the node page. Is this possible with private message, 7.x branch?
This would function exactly like here:
http://charlotte.ebayclassifieds.com/retail-merchandise/charlotte/sphinx... (click on 'reply by email' to see the form)
If this is possible, please help me understand how to implement it? If not, perhaps change this to a feature request?
Also, if anyone has recommendations on another way to achieve this, I am open to suggestions.
Thanks!
Comments
Comment #1
Gastonia commentedI guess I should clarify the above. I know a link is available to be displayed on the node form that will take you to the pm form.
But I am trying hard to keep the person on the page of the node. I don't want to redirect them. This seems like it should be default functionality, especially if a link can be put on the page, then why not a block with the exact form that displays after clicking the 'send author?' link?
Or, is there a way to pop that form up into Drupal 7's new lightbox overlay system? I am toying with the idea of using the 'send author' link for the source and putting it in an iframe. Surely there is a better way?
Comment #2
dhayles commentedI to would also like this feature, I have Commerce Nodes whereby each product node could have been created by a differing user.
I would like to have on the page which is displaying the product node the message form which has the TO: UID pre-populated from the node owner, a couple of Line items that can populate into the message body and a blank message field also to be added to the message body.
The send button would also reside on this page.
Any help would be greatly appreciated.
Comment #3
lameei commentedcheck this one out http://drupal.org/node/1360752
Comment #4
alex.87 commented#3 doesnt work in d7 im getting errors and output is just array...
Comment #5
Gastonia commentedIt's been a while since I posted that, but I have an early drupal 7 snippet that still works.
To enable it, you simply create a block that can execute PHP. Paste this into the block, although, you may have to tweak it for your specific use.
I have in my notes where I was working on submitting the form via ajax, however, I never finished implementing it. If anyone tinkers with it and gets it working, please post your code! I think that would be great functionality.
Comment #6
alex.87 commentedThanks for your snipet Gastonia, i had problem to show div if user is not logged in, so i edited your codee a bit and got it working like this:
Comment #7
ptmkenny commentedThanks @Gastonia and @ul71m0. I've added this to the privatemsg documentation here.
Comment #8
pascalli commentedHI All,
I've tried your solution in #6.
I created a block as suggested. Added php code and eval.
PM Form appears but default value are not filled in.
error:
Notice: Undefined variable: node in eval() (line 5 of /Users/pascallisot/Sites/student.be/modules/php/php.module(80) : eval()'d code).
Notice: Trying to get property of non-object in eval() (line 5 of /Users/pascallisot/Sites/student.be/modules/php/php.module(80) : eval()'d code).
Notice: Undefined variable: node in eval() (line 6 of /Users/pascallisot/Sites/student.be/modules/php/php.module(80) : eval()'d code).
Any idea where I need to check?
Thx in advance for your time.
Pascalli
Comment #9
pascalli commentedHi All,
It's me again. Please disregard my previous comment.
Found issue.
By putting code in template node value can be reached.
Works fine now.
Cheers,
Pascal
Comment #10
xiaomo commentedI know this is an old post but how did you get #6 working? I'm getting errors.
Comment #11
xiaomo commentedComment #12
xiaomo commented