Skip to Content Skip to Menu

How to make comments on an activity created by an auto-action appear in the stre

  • timstohr
  • timstohr
  • OFFLINE
  • Posts: 1091
  • Thanks: 56
  • Karma: 9
7 years 3 months ago #295831 by timstohr
Hi Kyle,
Here is some food for thoughts... I have been trying to figure out the problem and have not made any headway.
I have a third party plugin that creates events. Upon event creation, an auto-action fires that outputs an activity with asset event.[eventID]. The user can comment on this stream.
Each event also has a stream (that I outputted via auto action acting on a CB trigger integrated into the PHP/HTML that is loading the events page). All of the posts inside this stream have the asset events.[eventID].

How can I make it that any comments that are made on event.[eventID] also appear inside the stream events.[eventID] as comments to a post that says "[userName] created the event [Name of Event]" (or whatever this post should say)

Would be great to have your thoughts on this,
Thanks
Tim

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48444
  • Thanks: 8279
  • Karma: 1443
7 years 3 months ago #295839 by krileon
Only way to do that is to process the activity on display and override its comments asset otherwise comments will always be tied to the activity entry. You can see this in action for core activity in the below template file (see overrides.comments_asset param usages).

components/com_comprofiler/plugin/user/plug_cbactivity/templates/default/activity_core.php

Example of how to do this from a plugin can be found below.

components/com_comprofiler/plugin/user/plug_cbgallery/library/Trigger/ActivityTrigger.php

Note the above is parsing on triggers, which are registered in the below.

components/com_comprofiler/plugin/user/plug_cbgallery/cbgallery.php


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