Hi, Its me again.
I want to hook into the elgg notification object before its send. Basically I want to get the recpient details, the notification message subject and body. I tried to hook into 'prepare', 'notification' hook, but I failed to retrieve the notification object details. Any idea?
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- iionly@iionly
iionly - 0 likes
- Sarath@sarathsince85
Sarath - 0 likes
- Nikolai Shcherbin@rivervanrain
Nikolai Shcherbin - 0 likes
- Sarath@sarathsince85
Sarath - 0 likes
- iionly@iionly
iionly - 0 likes
- Sarath@sarathsince85
Sarath - 0 likes
You must log in to post replies.Which version of Elgg are you using? Best would be you would post your code to allow for debugging andd suggest improvements.
Hi, I am using Elgg 3.3.6
So far i havent reached anywhere.
Contents of the notification message should be defined with the
'prepare', 'notification:[action]:[type]:[subtype]'
hook.There's good example to help you with this task.
@RVR: that is for preparing a new notification. What I want is to get a notification object before it is sending from the server and modify it / extract some data before it is send.
I've looked at http://learn.elgg.org/en/stable/guides/hooks-list.html#notifications and the file vendor/elgg/elgg/engine/classes/Elgg/Notifications/Notification.php to figure that out. I hope it helps.
Thanks iionly. That's what I was looking for. Let me give a try.