149 Posts
MtnPavlas
10 years ago
4
Topic
Wondering if anyone could provide a hint for setting up the notification system similar to this forum. I've got content type Trip Report and another content type Trip Report Reply (which is set up like a comments solution ... each Trip Report Reply has a parent ID, which is the ID of the Trip Report it belongs to). The requirements are:
  1. If someone posts a reply, send a notification to the author of the parent Trip Report
  2. When someone posts a reply, send notification to authors of all previous replies for the same parent Trip Report
  3. Ideally, #2 would only work if the reply poster/author checks off a box (just the way most commenting solutions work)
You can see the site here: http://192.254.147.17/~turnsall/index.php/trip-reports/heliotrope-ridge-11-03-2013-tr (you can log in w/ username 3test and pwd Pass4seblod)

Thank you for any pointers.
Get a VIP membership
10 years ago
1
Level 1
Hello MtnPavlas,

the better way to archieve a notification system is to use the plugin code "Afterstore".
In this plugin you have access to the table "$fields" which allow you to make some test on the field you need and then send email.

Have a look at this post
(sorry, link corrected..)

Best regards.
Lionel
548 Posts
joomleb
10 years ago
0
Level 2
Hi Lionel,

the link you posted doesn't work...
149 Posts
MtnPavlas
10 years ago
1
Level 1
Thank you, Lionel, for the tip. I've read through the topic you posted a link to, and have experimented a bit but it seems that some sophisticated piece of code is needed for the notifications solution I'm after (which is similar user experience to this forum). When someone posts a new answer to a topic, is there a query that goes through all previous answers and the original topic and collects emails of those who posted them? Then it's injected into an Email field on the answer content type?
This post provides guidance on a simple logic if a certain field is true, then use email field 1, otherwise use email field 2, which is way simpler than this topic is trying to solve.
Thank you very much, once again, for any pointers ;-)

10 years ago
0
Level 2
Hello MtnPavlas,
yes, in the Afterstore you can do what you want.

Like you wrote, you can make a request on database to get recipient emails and update the desired email field. By cons, for that, the Field Code must be put before the email field because in an email field, emails are send in the afterstore event.

Regards.
Lionel
Get a Book for SEBLOD