Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add referenced links to e-mail notifications #177

Open
Artmir opened this issue May 8, 2021 · 6 comments
Open

Add referenced links to e-mail notifications #177

Artmir opened this issue May 8, 2021 · 6 comments
Assignees

Comments

@Artmir
Copy link

Artmir commented May 8, 2021

There is a need for links to be added to the referenced content when sending out e-mail notifications for: New comment, liked comment and possibly others.
Currently only plain text is sent.

e-mail notification
dd

@zohar
Copy link
Member

zohar commented May 8, 2021

@Artmir I agree. I will happily accept patches with new default text!

@Artmir
Copy link
Author

Artmir commented May 10, 2021

Unfortunately haven't had time to play with github that much to be able to apply patches. I hope it is ok if I send the text and links to you when I come up with some.

@zohar
Copy link
Member

zohar commented May 10, 2021

Sure! Let's use this thread for that.

@Artmir
Copy link
Author

Artmir commented May 10, 2021

E-mail notification for new comment. Tested working as of 3.0.8. Will update on the other message templates later.

<p>Hi,</p>
<p><a href="[message:author:url:absolute]">[message:author:display-name]</a> commented on the <a href="[message:field_node_reference:entity:url]">[message:trimmed-node-title]</a>.</p>
<p>Read the comment here: <a href="[message:field_comment_reference:entity:url]">[message:trimmed-comment]</a>.</p>
<br>
<p>SIncerely,</p>
<p>[site:name] team</p>

What's funny is why don't the url's automatically translate without having to hyperlink them manually.

@Artmir
Copy link
Author

Artmir commented May 12, 2021

Here is the full list of message templates I managed to create. Worth to note is that when idea moves back to 'needs work' there is no notification event fired in the announcement nor in the e-mail. I feel that at least the author should be notified.

Also when new content is created (new node, challenge, idea etc) users will not get notified by e-mail.
It would be great to have the ability for users to be notified of new content. At the moment I have created this functionality using a third party module (admin content notification) , but I figured since we have the message templates already in place why not have this function in it. I looked around in some forums and I am not sure if this would work with rules. Anyway...

          --------------------Template list below ------------------

Challenge status:

Third placeholder:

<p>Hi,</p>

<p>The Challenge <a href="[message:field_node_reference:entity:url]">[message:field_node_reference:entity:title]</a>&nbsp;posted at [site:name]&nbsp;is now @challenge_status.</p>

<p>Sincerely,</p>

<p>The&nbsp;[site:name] team</p>

<p>&nbsp;</p>

Created challenge:

First placeholder:

<p class="message--text"><a href="[message:author:url:absolute]">[message:author:display-name]</a>&nbsp;created a new challenge: <a href="[message:field_node_reference:entity:url]">[message:field_node_reference:entity:title]</a></p>

Third placeholder:

<p>Hi,</p>

<p>A a new challenge: <a href="[message:field_node_reference:entity:url]">[message:field_node_reference:entity:title]</a>&nbsp;was created at&nbsp;[site:name] by&nbsp;<a href="[message:author:url:absolute]">[message:author:display-name]</a>.</p>

<p>Read the full challenge here:&nbsp;<a href="[message:field_node_reference:entity:url]">[message:field_node_reference:entity:title]</a>.</p>

<p>Best:</p>

<p>The [site:name] team</p>

Created like on comment:

First placeholder:

<p class="message--text"><a href="[message:author:url:absolute]">[message:author:display-name]</a>&nbsp;liked a <a href="[message:field_comment_reference:entity:url]">comment</a> in <a href="[message:field_node_reference:entity:url]">[message:field_node_reference:entity:title]</a></p>

Third placeholder:

<p>Hi,</p>

<p><a href="[message:author:url:absolute]">[message:author:display-name]</a>&nbsp;liked your&nbsp;comment in <a href="[message:field_node_reference:entity:url]">[message:field_node_reference:entity:title]</a>.</p>

<p>Visit your&nbsp;<a href="[message:field_comment_reference:entity:url]">comment here</a>.</p>

<p>Best,</p>

<p>The [site:name] team</p>

Created reply to comment:

Third placeholder:

<p>Hi,</p>

<p><a href="[message:author:url:absolute]">[message:author:display-name]</a>&nbsp;replied to your comment at [site:name].</p>

<p>Read the full&nbsp;<a href="[message:field_comment_reference:entity:url]">comment here</a>.</p>

<p>Sincerely,</p>

<p>The [site:name] team</p>

Create like on node:

Third placeholder:

<p>Hi,</p>

<p><a href="[message:author:url:absolute]">[message:author:display-name]</a>&nbsp;liked the&nbsp;[message:field_node_reference:entity:content-type]:&nbsp;<a href="[message:field_node_reference:entity:url]">[message:field_node_reference:entity:title]</a>&nbsp;you published at the&nbsp;[site:name]!</p>

<p>Click<a href="[message:field_node_reference:entity:url]"> here to visit the&nbsp;[message:field_node_reference:entity:content-type]</a>.</p>

<p>Best,</p>

<p>The&nbsp; [site:name] team</p>

Idea life-cycle change:

Third placeholder:

<p>Hi,</p>

<p>Your [message:field_node_reference:entity:content-type]:&nbsp;<a href="[message:field_node_reference:entity:url]">[message:field_node_reference:entity:title]</a>&nbsp;posted at [site:name] has moved to @idea_life_cycle phase.</p>

<p>Sincerely,</p>

<p>The [site:name] team</p>

New comment created:

Third placeholder:

<p>Hi,</p>

<p><a href="[message:author:url:absolute]">[message:author:display-name]</a>&nbsp;has commented on your&nbsp;[message:field_node_reference:entity:content-type]:&nbsp;<a href="[message:field_node_reference:entity:url]">[message:trimmed-node-title]</a>.</p>

<p>Read the full&nbsp;<a href="[message:field_comment_reference:entity:url]">comment here</a>.</p>

<p>&nbsp;</p>

<p>Sincerely,</p>

<p>The&nbsp;[site:name] team</p>

New discussion:

First placeholder:

<p class="message--text"><a href="[message:author:url:absolute]">[message:author:display-name]</a>&nbsp;created a new [message:field_node_reference:entity:content-type]: <a href="[message:field_node_reference:entity:url]">[message:field_node_reference:entity:title]</a></p>

Second placeholder:

Third placeholder:

<p>Hi,</p>

<p><a href="[message:author:url:absolute]">[message:author:display-name]</a>&nbsp;has created a new [message:field_node_reference:entity:content-type]: <a href="[message:field_node_reference:entity:url]">[message:field_node_reference:entity:title]</a>&nbsp;to your post.</p>

<p>&nbsp;</p>

<p>Sincerely,</p>

<p>[site:name] team</p>

User mention:

first placeholder:

<p class="message--text"><a href="[message:field_comment_reference:entity:author:url]">[message:field_comment_reference:entity:author]</a> mentioned you in <a href="[message:field_node_reference:entity:url]">[message:field_node_reference:entity:title]</a>.</p>

Third placeholder:

<p>Hi,</p>

<p><a href="[message:field_comment_reference:entity:author:url]">[message:field_comment_reference:entity:author]</a> has mentioned you on <a href="[message:field_node_reference:entity:url]">[message:field_node_reference:entity:title]</a>.</p>

<p>See what they say:&nbsp;[message:trimmed-comment].</p>

<p>Read the full&nbsp;<a href="[message:field_comment_reference:entity:url]">comment here</a>.</p>

<p>&nbsp;</p>

<p>Sincerely,</p>

<p>The [site:name] team</p>

@Artmir
Copy link
Author

Artmir commented Jan 26, 2022

I suggest adding the above updated message templates to the ver. 3.0.9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants