Skip to Content Skip to Menu

🌲 Merry Christmas! Great savings on Professional and Developer Memberships! Get 25% off now with code XMAS-2024!

CB Activity API usage update

  • activha
  • activha
  • OFFLINE
  • Posts: 2336
  • Thanks: 117
  • Karma: 13
11 months 2 weeks ago #336506 by activha
Replied by activha on topic CB Activity API usage update
I've noticed that you moved the post to a new topic.

Following the hard work that I did last year to integrate our process with CB Activity, I have attached the autoactions that I use and the files that they called.

First we set some buttons to add, save and edit our "activations" 
With CB 6  is there a newer solution to add custom buttons that the autoactions attached. They worked fine with CB 5 but no longer with CB 6

Secondly I call the attached files with the autoactions to display each "activation" separately.
If I understand well, this should be now in a folder /components/com_comprofiler/plugin/user/plug_cbactivity/templates/default/activity/custom/activha/group/event.php ??

The asset that we use is activha.group.55.event.26.activation.11827

But should I set this file if has to be used both for the short activation display and the long display if it is displayed in a standalone page ?

I have also attached the screenshot of what we have now on CB 5 

Could you help me achieve the same on CB 6 devel website ? For now it's a full mess :-(

Thanks a lot for the help as I try not to update the production website for now



 
Attachments:

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48622
  • Thanks: 8302
  • Karma: 1446
11 months 2 weeks ago - 11 months 2 weeks ago #336507 by krileon
Replied by krileon on topic CB Activity API usage update

Secondly I call the attached files with the autoactions to display each "activation" separately.
If I understand well, this should be now in a folder /components/com_comprofiler/plugin/user/plug_cbactivity/templates/default/activity/custom/activha/group/event.php ??

The asset that we use is activha.group.55.event.26.activation.11827

Custom activity goes in the custom folder, yes. As for the Asset Path as explained earlier simply edit one of your custom activity entries in CB Activity > Activity and under the Details tab it will tell you exactly what file it's looking for for custom display.

But should I set this file if has to be used both for the short activation display and the long display if it is displayed in a standalone page ?

All of the following variables are available to your custom activity.
Code:
/** * @var ActivityTable $row * @var null|ActivityStreamTable $stream * * @var int $myUserId * @var UserTable $myUser * @var bool $canModerate * @var bool $isOwner * @var bool $isNew * @var bool $isRow * @var bool $isModal * @var bool $isInline * @var bool $isSimple * @var bool $isEmbed * * @var string $somethingWentWrong * * @var string $title * @var string $subTitle * @var string $caret * @var string $message * @var string $subMessage * @var string $date * @var string $content * @var string $media * @var string $header * @var string $footer * @var array $menu * @var bool $compact */

$isRow can be used to determine if a row is being directly viewed or not.

Could you help me achieve the same on CB 6 devel website ? For now it's a full mess

We do not provide coding assistance outside of Business memberships. I can only provide you with simple examples and CB Activity 6.0.0 includes those examples with your install.

I'm not sure you even need your location behavior anymore. CB Activity 6.0.0 includes map support for its built in location feature now.


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.
Last edit: 11 months 2 weeks ago by krileon.

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

  • activha
  • activha
  • OFFLINE
  • Posts: 2336
  • Thanks: 117
  • Karma: 13
11 months 2 weeks ago #336508 by activha
Replied by activha on topic CB Activity API usage update
I've been asking for business membership since a year and a half but never got an answer about it.

Of course would be glad to pay for this as I have spent a lot of time over the last two years to adapt to CB 5 and all seems to be lost with CB 6

Let me know about how to get a business subscription and move on

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48622
  • Thanks: 8302
  • Karma: 1446
11 months 2 weeks ago - 11 months 2 weeks ago #336510 by krileon
Replied by krileon on topic CB Activity API usage update
I've reminded Beat regarding your quote.

I'm not sure what I'm looking at here with your scripts. Is all of this meant to add something to CB Activity?

www.joomlapolis.com/forum/255-developer-members-support/244490-cb-activity-new-use-for-spots-display?start=18#327216

The code there should still work. You'll need to make the following adjustments.

Add Activity Feature
FROM: activity_onDisplayStreamActivityNew
TO: activity_onDisplayActivityStreamNew

FROM:
Code:
$variables['var1']['left'] = '<button type="button" class="btn btn-light btn-sm border streamToggle ' . htmlspecialchars( $buttonName ) . '" data-cbactivity-toggle-target=".' . htmlspecialchars( $buttonTarget ) . '" data-cbactivity-toggle-active-classes="btn-info" data-cbactivity-toggle-inactive-classes="btn-light border" data-cbtooltip-tooltip="' . htmlspecialchars( $buttonDescription ) . '" data-hascbtooltip="true" data-cbtooltip-position-my="bottom center" data-cbtooltip-position-at="top center" data-cbtooltip-classes="qtip-simple"><span class="' . htmlspecialchars( $buttonIcon ) . '"></span></button>';

TO:
Code:
$variables['var3']['menu'] = '<button type="button" class="btn btn-light btn-sm border streamToggle ' . htmlspecialchars( $buttonName ) . '" data-cbactivity-toggle-target=".' . htmlspecialchars( $buttonTarget ) . '" data-cbactivity-toggle-active-classes="btn-info" data-cbactivity-toggle-inactive-classes="btn-light border" data-cbtooltip-tooltip="' . htmlspecialchars( $buttonDescription ) . '" data-hascbtooltip="true" data-cbtooltip-position-my="bottom center" data-cbtooltip-position-at="top center" data-cbtooltip-classes="qtip-simple"><span class="' . htmlspecialchars( $buttonIcon ) . '"></span></button>';

Use 'menu' for left aligned buttons and 'buttons' for right aligned. You might also need to adjust: Reference Variables: Variable 3.

Save Activity Feature
FROM:
Code:
$variables['var3']->params()->set( 'custom', $input->getString( 'custom' ) );

TO:
Code:
$variables['var3']->getParams()->set( 'custom', $input->getString( 'custom' ) );

Save Activity Feature
FROM: activity_onDisplayStreamActivity
TO: activity_onDisplayActivity

Display Activity Feature
FROM:
Code:
[var1_params_custom]

TO:
Code:
[var2_params_custom]

FROM:
Code:
$variables['var5'] = $variables['var5'] . $content;

TO:
Code:
$variables['var3']['content'] = $variables['var3']['content'] . $content;

FROM: Reference Variables: Variable 5
TO: Reference Variables: Variable 3

I don't recall where you wanted this to display exactly so 'content' in var3 might not be correct. There's also a way to directly insert something at the top of the activity display using 'header' so that might be what you're wanting.


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.
Last edit: 11 months 2 weeks ago by krileon.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48622
  • Thanks: 8302
  • Karma: 1446
11 months 2 weeks ago #336512 by krileon
Replied by krileon on topic CB Activity API usage update
Re-reading your old topic. I still don't understand why you're trying to force CB Activity into doing this. It would be significantly easier and likely better for your users to just integrate Hotspots into CB Activity. So that when they create a Hotspot it generates an activity entry and that activity entry can then display the Hotspot details.

With that said CB Activity 6.0.0 does have a map feature now for Locations. You can also edit your stream and under Create > Require you can force the post to be required to provide a Location. So you could make a Hotspots stream and require Message, Location, and Gallery to more or less fulfil the requirements you're wanting.


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.

  • activha
  • activha
  • OFFLINE
  • Posts: 2336
  • Thanks: 117
  • Karma: 13
11 months 2 weeks ago #336515 by activha
Replied by activha on topic CB Activity API usage update
I am using an API which is automatically proposing companies in the geographical area of the user. Once the user selects a company in the drop down list retrieved, we get its full data and build the activation page. Then we retrieve the details of the company holder and contacts. They are displayed on the activation page and the user only has to select one to share the page with an email.

The API is integrated in other autoactions endpoints and called by the files that I have attached.

I also save the company data for further use in order not to pay several times for the same thing.

The integration with CB Activity is fine because it allows to discuss around the company profile. For instance : cercle.business/societe/metaconcept-groupe-6079

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

Moderators: beatnantkrileon
Powered by Kunena Forum