Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

Email instead of notification on Activity @Mention

  • robster80
  • robster80
  • OFFLINE
  • Posts: 46
  • Thanks: 5
  • Karma: 0
1 month 1 week ago #339164 by robster80
I changed the settings as you advised and it works as it should (with one small additional change), that settles it. Which was not obvious to me, but it worked when I switched the option:Parameters
Format Functions: Yes

Thanks!
The following user(s) said Thank You: krileon

Please Log in or Create an account to join the conversation.

  • jcrimmel
  • jcrimmel
  • ONLINE
  • Posts: 44
  • Thanks: 9
  • Karma: 2
2 days 16 hours ago - 2 days 16 hours ago #339472 by jcrimmel
Two additional questions:

1) Is it possible to show the owner of the steam in the email along with an [cb_userfield] that belongs to the stream owner? In my case, I have an activity stream under a profile where another two users may be mentioning each other. It would be nice if the email was able to show the name of the actual profile the comment is listed under and a [cb_userfield] that was from the actual stream owner.

2) Is It possible for [cb:parse function="getNotificationTitle" class="var2" /] to not be truncated to 50 characters? I would just use [var2_message] to show the entire message, but the @mentions show up as (mention:[user_id]) when using [var2_message]. If that was the actual user name being mentioned and not their user ID, [var2_message] would work fine. 
Last edit: 2 days 16 hours ago by jcrimmel.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48459
  • Thanks: 8280
  • Karma: 1443
1 day 21 hours ago #339475 by krileon

1) Is it possible to show the owner of the steam in the email along with an [cb_userfield] that belongs to the stream owner? In my case, I have an activity stream under a profile where another two users may be mentioning each other. It would be nice if the email was able to show the name of the actual profile the comment is listed under and a [cb_userfield] that was from the actual stream owner.

var2 is the activity object that's mentioning the user. So to get the user id of the user that mentioned someone you'd use [var2_user_id]. Next you can combine this with CBs built in substitution nesting functionality.

[cb:userfield field="formatname" user="[var2_user_id]" /]

This for example should give you the formatname field display of the user doing the mentioning. To get your custom field you should be able to just do the following.

[cb:userfield field="cb_userfield" user="[var2_user_id]" /]

Note both are using "userfield" substitutions which respect access permissions and display settings. You can get raw stored values using "userdata" instead.

For more details on nested substitutions please check out our substitutions tutorial below.

www.joomlapolis.com/documentation/127-community-builder/279-tutorials/18353-using-substitutions-throughout-cb

2) Is It possible for [cb:parse function="getNotificationTitle" class="var2" /] to not be truncated to 50 characters? I would just use [var2_message] to show the entire message, but the @mentions show up as (mention:[user_id]) when using [var2_message]. If that was the actual user name being mentioned and not their user ID, [var2_message] would work fine.

That sounds like a bug as the mention should be replaced before truncating. Will review the code and try to have a fix out today. To answer your question yes you can adjust the truncating. The below should work.

[cb:parse function="getNotificationTitle" class="var2" length="0" /]

That should turn it off or you can use something like the below to increase the allowed character count.

[cb:parse function="getNotificationTitle" class="var2" length="300" /]


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48459
  • Thanks: 8280
  • Karma: 1443
1 day 21 hours ago #339476 by krileon

but the @mentions show up as (mention:[user_id]) when using [var2_message].

Retested getNotificationTitle and am seeing the mentions converting fine. Are you seeing the literal text (mention:[user_id]) or is it something like (mention:123)? As (mention:[user_id]) doesn't exist in CB Activity as you can't just substitute in a user id into a mention like that.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • jcrimmel
  • jcrimmel
  • ONLINE
  • Posts: 44
  • Thanks: 9
  • Karma: 2
1 day 20 hours ago #339478 by jcrimmel
it is (mention:123)

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48459
  • Thanks: 8280
  • Karma: 1443
1 day 20 hours ago #339479 by krileon
Strange, that should've been replaced before it was shortened. Are mentions enabled for the stream that activity post belongs to?


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum