Publisher does not support the Fluid field type. Please do not contact asking when support will be available.
If you purchased an add-on from expressionengine.com, be sure to visit boldminded.com/claim to add the license to your account here on boldminded.com.
Ticket: Send email notification when a draft has been approved
Status | Resolved |
Add-on / Version | Publisher |
Severity | Trivial |
EE Version |
Timothy Kelty
May 24, 2013Client was asking to send an email to arbitrary address when entries in a particular channel have been approved (a draft has been published, or new version published).
Anything like that planned? I haven’t looked at the code yet, does Publisher have a hook I might be able to use if I need to do a custom extension?
BoldMinded (Brian)
There is actually a new hook in the email method, in Publisher_email.php, you can use that one. Its not documented yet, but it should be pretty clear on what it does if you look at the code.
Timothy Kelty
I see the hook, but wasn’t sure how I could use it, as I don’t believe the current logic ever calls an email when something is “approved” (a draft becomes published).
Here’s my ghetto-fied way of hacking it in for now: In publisher/models/publisher_entry.php, around line 142 in Publisher_entry->save
Timothy Kelty
Not sure if that’s necessarily the proper place for it, but it seems to do the job for now.
BoldMinded (Brian)
The publisher_approval_entry.php file might be a better spot?
Does the hook not work? It should be sending a load of data to you to use.
Timothy Kelty
Oh yeah…hmmm Publisher_approval_entry->save calls send….seems like I should indeed be able to use that.
Thanks, I’ll re-investigate.
BoldMinded (Brian)
Going to close this since you’re heading in the right direction.