Closed (fixed)
Project:
Actions
Version:
5.x-2.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
2 Oct 2005 at 20:54 UTC
Updated:
23 Jan 2006 at 22:58 UTC
Jump to comment: Most recent file
Comments
Comment #1
jvandyk commentedYou're just missing an action to do that. The action_send_email action in actions.inc could easily be modified into another action called "Send Email to Node Author".
Comment #2
Steve Dondley commentedOK, so it will take a hack of the module then? I want to be sure that the feature isn't already there and I'm not missing something obvious.
Thanks.
Comment #3
jvandyk commentedIt wouldn't be a "hack of a module", it would be another action. The real solution to this is to introduce a variable language into the config screens so you could say {author} in the send email to field. But I haven't got time for that right now. You might want to look at the patch by samo.
Comment #4
Steve Dondley commentedOK, I've made a modification to the actions.inc module. See attached.
It's operation is pretty straightforward. You set the recipient to "author" if you want to have the email sent to an author. (Oops, just realized I should have enclosed 'author' in the t() function).
I also improved the functionality of the message so you can send variables in it (like %site_name, %user_name, etc.).
Comment #5
Steve Dondley commentedOK, here's a revision to put the word "author" in a t() function and gets rid of a couple of superfluous lines I found.
Comment #6
Steve Dondley commentedSorry, let's try that again. Last patch is bad. This should work.
Comment #7
jvandyk commentedSo now we have differing suggestions for variable replacement:
- samo: [[title]]
- sdondley: %node_title
- jvandyk: {title}
We want to have a variable replacement strategy that is easy to understand, easy to type, and is as standards-based as possible. Mine is probably out because curly brackets are used in Javascript.
Comment #8
Steve Dondley commentedWell, the %format is used by the user.module. I think we should go with whatever is in the core.
Comment #9
merlinofchaos commented% substitution is used most widely in Drupal, that I remember.
Comment #10
jvandyk commentedCommitted.