The thread notification email is sent to notify users who previously commented on a file that the file has received a new comment.
This email contains the comment, and a link to the medianotificationoptout page that allows the user to opt-out of notification emails.
View how to create the Thread Notification Email template.
NB 1: The URL of the link to the opt-out notification page provided in this email will be for to the application that the email template is in.
NB 2: You have to create the threadnotificationoptout page in order for the users to be able to opt out of thread notifications.
The owner of the media does not receive a notification email when (s)he comments on their own media or when they comment on a thread of their own media.
View how to allow users to edit their Media Notification Opt-out settings.
View how users can edit their Media and Thread Notification Opt-out settings.
First, the comment notification feature needs to be enabled and configured in the Project Settings.
Setting | Description |
---|---|
Media Moderation | If set to "Pre" (meaning that media, including comments, will be moderated before they are posted on the site), then the notification email is sent when the comment is approved. If set to "Post" (meaning that media, including comments, will be moderated after they are posted on the site), then the notification email is sent as soon as the comment is posted. |
Media Comment Notifications | This setting specifies if a system email is sent to the poster of a comment when that same file receives additional comments. "Off" means no comment notification emails will be sent, ever. "Send by default" means that comment notification emails will be sent for all users that have not opted out. "User must opt-in" means that comment notification emails will only be sent to those that have explicitly opted in. Requires that this option exists in the user profile page. Comment notification email templates are specified in the channel settings. |
Thread Comment Notifications | This setting specifies if a system email is sent to the poster of a comment when that same file receives additional comments. "Off" means no comment notification emails will be sent, ever. "Send by default" means that comment notification emails will be sent for all users that have not opted out. "User must opt-in" means that comment notification emails will only be sent to those that have explicitly opted in. Requires that this option exists in the user profile page. Comment notification email templates are specified in the channel settings. |
The email template needs to be configured at the channel level. The primary purpose of this is to support multiple languages.
In the threadnotificationoptout template, add the following:
You have opted out of Thread Notifications.
In the application's "editprofile" template, add the following code which will allow the user to change their "Receive media notifications" setting.
Receive media notifications?
Log in to the application, and in the editprofile page edit the setting for "Receive media notifications".
This setting enables and disables both the media and thread notification settings.
Name | Description |
---|---|
author | (String) - The first and last name of the user that wrote the comment. |
author_firstname | (String) - The first name of the user that wrote the comment. |
author_id | (Integer) - The id of the user that wrote the comment. |
comment | (String) - The comment that was posted. |
comment_id | (Integer) - The id of the comment that was posted. |
comment_meta | (Array) - The meta data of the comment that was written. Contains the URL that was used to create the comment. In order to be available in the mediadetail page, this metadata has to be passed as: $fileData[metadata][user][<url_key>] and is available in the template as {$$comment_meta.user.<url_key>} |
email_recipient_firstname | (String) - The first name of the recipient of the email. |
media_id | (Integer) - The id of the media that has been commented on. |
media_owner_firstname | (String) - The first name of the media owner. |
media_owner_id | (Integer) - The id of the owner of the media that has been commented on. |
media_title | (String) - The title of the media that has been commented on. |
mediaorthread | (String) - Signifies whether the email is for media or thread moderation. Can be either 'media' or 'thread'. |
mediaorthread | (String) - Required - Signifies whether the email is for media or thread moderation. Can be either 'media' or 'thread'. |
secret1 | (String) - Required - The first encrypted string used to verify the email recipient for the media and thread notification opt-out emails. |
secret2 | (String) - Required - The second encrypted string used to verify the email recipient for the media and thread notification opt-out emails. |
u | (Integer) - Required - The user id of the email recipient. (The email recipient being the media owner) |
vhostmaindomain | (String) - Required - The domain of the application. |
{$$email_recipient_firstname},
{$$author} just posted a comment on "{$$media_title}":
{$$comment}
The URL of the comment is: {$$comment_meta.user.url}
Do more at http://{$$vhostmaindomain}
OPT OUT FROM THE NOTIFICATIONS AT:
{$$vhostmaindomain}/action/v2/{$$mediaorthread}notificationoptout?u={$$u}&s={$$secret1}&s2={$$secret2}