Sending Stream Activity to Firebase

1 year 8 months ago #330446 by PaceOnline
Sending Stream Activity to Firebase was created by PaceOnline
We use a activity_onAfterStreamActivity event to send group notifications to Firebase for all members of the group. our issue is we cannot access the group name to send in the notification. on another post you sent me a substitution that we used for the category and I can't manipulate this to get the group name. Please help.

Please Log in to join the conversation.

1 year 8 months ago #330448 by krileon
Replied by krileon on topic Sending Stream Activity to Firebase
There is no activity_onAfterStreamActivity trigger. Did you mean activity_onAfterCreateStreamActivity? If so its variables are as follows.

$_PLUGINS->trigger( 'activity_onAfterCreateStreamActivity', array( $stream, $source, $row ) );

$source is the source object for that activity. For GJ activity that's usually the group object. So you'd be able to get group name with [var2_name] since $source is the second variable.


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 to join the conversation.

1 year 7 months ago #330495 by PaceOnline
Replied by PaceOnline on topic Sending Stream Activity to Firebase
Thank you that worked for the main posting, but we have another auto action which works gj_onAfterCreatePhoto, how can I get the group name of the group the photo is being created in and the id of activity for the posting of the photo?

Please Log in to join the conversation.

1 year 7 months ago #330496 by krileon
Replied by krileon on topic Sending Stream Activity to Firebase
You can't. That trigger has no knowledge of where the photo came from it's just a trigger for when a photo object is first saved. Try using gallery_onAfterCreateGalleryItem instead which has the following variables.
$_PLUGINS->trigger( 'gallery_onAfterCreateGalleryItem', array( $gallery, $source, $row ) );

Same situation as the activity trigger. $var2 for this trigger is the $source. So [var2_name] should give you the group name.


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 to join the conversation.

1 year 7 months ago #330497 by PaceOnline
Replied by PaceOnline on topic Sending Stream Activity to Firebase
Does this trigger also work if a photo is uploaded outside of a gallery like a normal photo upload in the photos tab?

Please Log in to join the conversation.

1 year 7 months ago #330503 by krileon
Replied by krileon on topic Sending Stream Activity to Firebase

Does this trigger also work if a photo is uploaded outside of a gallery like a normal photo upload in the photos tab

It works as long as the upload was through CB Gallery. Uploads on profile of course won't have a $source of a GJ group though. You should condition the [var3_asset] to know where the gallery entry is.


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.
The following user(s) said Thank You: PaceOnline

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.214 seconds

Facebook Twitter LinkedIn