Problems with CB stream in response to CB API loading

7 years 4 months ago #288724 by timstohr
Doesn't work. We have the trigger still functioning (haven't checked the variables yet), but the return doesnt seem to work/ the CSS still does not get loaded.

Here is the code we use:
<?php
#Trigger for event comments beneath event 
outputCbTemplate();
$onDetailedEventLoadVars = $_PLUGINS->trigger( 'onDetailedEventLoad', array( $item->id, $item->published, $item->creator_name, $item->category_id));
$return = '<div class="cb_template">' . implode('', $onDetailedEventLoadVars) . '</div>';
return($return)
?>

Please Log in to join the conversation.

7 years 4 months ago #288726 by krileon
Ensure the Output parameter is set to Return as if it's set to Echo your implode won't contain the return of the stream. Again, this was all designed to be rendered inside of existing CB locations. I've never tried it outside of the scope of CB, which will all be improved with CB Activity 4.0.0 where I'll for sure be testing external usages.


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.

7 years 4 months ago #288730 by timstohr
If I set the Output type to RETURN, the stream completely disappears... :(

Any further ideas?

Please Log in to join the conversation.

7 years 4 months ago #288731 by krileon
The problem is likely with how you're outputting your return value. Change return($return); to echo $return;.


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.

7 years 4 months ago #288732 by timstohr
YEEEESSSS! IT WORKS!
Thanks very much!
The following user(s) said Thank You: krileon

Please Log in to join the conversation.

7 years 4 months ago #288758 by krileon
Awesome! Thanks for providing your code as well for others with similar needs. Hopefully with CB Activity 4.0.0 this will be less of a pain to setup.


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.

Moderators: beatnantkrileon
Time to create page: 0.251 seconds

Facebook Twitter LinkedIn