Help to display activity in another component

2 months 1 week ago - 2 months 6 days ago #316464 by activha

I was thinking at displaying activity streams in another component page where I need to input the id of this component items in the asset.

Tried with the activity bot but it seems that it would not display directly in another component template
CB content
{module id="1672" fixhtml="false" style="division" moduleclass_sfx="cercle"}
Tried with an activity module and overriding its params but not luck neither

CB activity
{module id="1445" activity_asset=<?php echo 'hotspot.' .$this->hotspot->id; ?> fixhtml="false" style="division" moduleclass_sfx="cercle"}

Also tried directly to get the output :
$activity = $cbUser->replaceUserVars ('[cbactivity:activity asset="hotspot.dynamicid"/]';)
But no chance...

What's my best options, knowing that I need to output a dynamic id which is the item id of the component item (hotspot in this case).

I thought of using auto actions but cannot see really how to output them in another component template ?

Also can you tell me where to retrieve an asset id ?
For instance if I want to retrieve all events associated to my hotspots referenced by asset hotspot.%.event.%

Thanks in advance for suggestions
2 months 4 days ago #316474 by krileon
If your other component passes its content through Joomla content prepare then you'll be able to substitute in an activity stream, like buttons, etc.. using CB Activity Bot; see the description of CB Activity Bot in Extensions > Plugins for usage information.

If the other component doesn't pass its content through Joomla content prepare then you'll need to figure out another means like assigning a module to the components page, but that won't help if you need information from the other component to construct the asset.

If the other component has Joomla events you could try using CB Auto Actions and a CB Activity action; be sure to prefix the Joomla events with joomla_ for it to act on them.

Beyond that you'll have to explore using PHP and calling CB Activity API directly, which I don't recommend as it's just another thing you will have to maintain (the API may and likely will change in the future).

Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Templates - CBSubs - Hosting - Forge - Incubator - GroupJive
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 EST to 4:00 PM EST. 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: activha
Moderators: beatnantkrileon
Time to create page: 0.573 seconds

Facebook Twitter LinkedIn