By IRNA on Saturday, 22 June 2019
Posted in General Issues
Replies 4
Likes 0
Views 541
Votes 0
Hello,
The documentation doesn't have information on email notifications yet, so I'm hoping you can help me here.

I'm trying to add email notifications for any post added to the general stream.

I've added an email template file to "/components/com_easysocial/themes/wireframe/emails/stream/updates.php" and I've modified/discovered the stream.alert file:


[
{
"element" : "stream",
"rule" : "tagged",
"core" : true
},
{
"element" : "stream",
"rule" : "updates",
"core" : true
}
]


What else do I need to add to the site to enable the email notifications?
Hey there,

I am really sorry for the delay of this reply as it is a weekend for us here.

It seems like you didn't explain more details which kind of user you would like to notify them when someone share a story post on the user dashboard.

And which stream post type you would like to notify to your user because there got different type of post type e.g. story, photo, link, video and etc.

Based on what you shared with us above your new rules and email template file for story stream.updates everything is done correctly.

Now you only leave 1 part is add some of the code under the function page, similar with this code (screenshot : http://take.ms/3LNpz ).
·
Saturday, 22 June 2019 10:26
·
0 Likes
·
0 Votes
·
0 Comments
·
I would like to notify all users of all post types added to the general community stream.
Is adding the "rule":"updates" to steam.alert the correct way to do that?

For the function page, how do I specify the recipient list? Can I copy the notification code from Broadcast?
·
Tuesday, 25 June 2019 03:31
·
0 Likes
·
0 Votes
·
0 Comments
·
Hm, if you would like to notify all the users of all the post types, then this might be involve a few customization work.

You can try understand how the system work :

1. When someone submit a story stream item, it will call this 'create' function under this file JoomlaFolder/administrator/components/com_easysocial/includes/story/story.php

2. So you can take a look this sample 'notify' function http://take.ms/8BJQs and see how the code notify to single recipient. http://take.ms/Zz8W2

3. But you can't copy the code because your requirement is different, you need to sent to a list of recipient but you can get the concept how to send to the recipient for these function code.

Is adding the "rule":"updates" to steam.alert the correct way to do that?

Are you referring this following alert rules? If yes, those element and rule name what you listed is fine, because this one just let system know what new alert you created, so when you this 'ES::notify()' function, then you need to specific what alert you would like to notify to the recipient.

[
{
"element" : "stream",
"rule" : "tagged",
"core" : true
},
{
"element" : "stream",
"rule" : "updates",
"core" : true
}
]


For example :


[
{
"element" : "profile",
"rule" : "story",
"core" : true
}
]


So you code have to specify which alert name e.g. profile.story

$state = ES::notify('profile.story', array($recipient->id), $emailOptions, $systemOptions);


By the way, I am really sorry but unfortunately our support policy https://stackideas.com/support does not cover customizations

Having said that, if you require us to perform the customization for you, you can always request for a quote from us at https://crm.stackideas.com and select "Customizations" . Our sales person would gladly send you a quote for the customization that you have requested.
·
Tuesday, 25 June 2019 17:00
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post