Skip to Content Skip to Menu

Create Linked CB Gallery Media Items

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
1 year 5 months ago #333983 by krileon
Replied by krileon on topic Create Linked CB Gallery Media Items

is there another trigger that we can use for the activity of the item being created so that I can pass the activity id and the asset together?

Can you be more specific the chain of things? I assume you're doing: Auto Action > Create Media > Auto Action > Create Activity? So your activity is being created from gallery_onAfterCreateItem trigger? or are you just using the included system action? Where are you wanting to pass the activity id and asset?


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.

  • PaceOnline
  • PaceOnline
  • OFFLINE
  • Posts: 104
  • Thanks: 2
  • Karma: 0
1 year 5 months ago - 1 year 5 months ago #333987 by PaceOnline
Replied by PaceOnline on topic Create Linked CB Gallery Media Items
Right now we are only using the gallery_onAfterCreateItem event when a CB Gallery Item is created then we send that item via REST passing the photos id, url and caption. We don't have a corresponding activity action that sends the activity via REST. So what I guess I need reading from your response is an event for the activity and then another one for the photo. We have the photo action please can I have a trigger for the activity action so that I can add that as well.
Last edit: 1 year 5 months ago by PaceOnline.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
1 year 5 months ago #333996 by krileon
Replied by krileon on topic Create Linked CB Gallery Media Items
Please see the below tutorial for a list of available triggers.

www.joomlapolis.com/documentation/279-community-builder/tutorials/18358-using-cb-triggers

You'll probably have to use the below given the activity is created directly through API.

activity_onAfterUpdateActivity
activity_onAfterCreateActivity

Basically same as the gallery trigger where var1 is the activity object. You'd get its id with [var1_id].


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.

  • PaceOnline
  • PaceOnline
  • OFFLINE
  • Posts: 104
  • Thanks: 2
  • Karma: 0
1 year 5 months ago #334028 by PaceOnline
Replied by PaceOnline on topic Create Linked CB Gallery Media Items
Everything seems to be working with the exception of linking the files externally. for example [site_url]/images/comprofiler/plug_cbgallery/[user]/photos/4a7bffee57272d5158945558599e357c.jpg is the location of a photo but I cannot show this photo in my browser and hence the other application can't pick it up.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
1 year 5 months ago #334034 by krileon
Replied by krileon on topic Create Linked CB Gallery Media Items
CB Gallery files cannot be accessed directly. They have to be accessed through PHP. This is because they're secured by various access controls. Notice the CB Gallery directory is htaccess protected. To have it rebuild a media entries gallery and render it inline use the below URL structure.

Thumbnail
Code:
index.php?option=com_comprofiler&view=pluginclass&plugin=cbgallery&action=item&func=preview&id=MEDIA_ID_HERE&format=raw

Fullsize
Code:
index.php?option=com_comprofiler&view=pluginclass&plugin=cbgallery&action=item&func=show&id=MEDIA_ID_HERE&format=raw


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.

  • PaceOnline
  • PaceOnline
  • OFFLINE
  • Posts: 104
  • Thanks: 2
  • Karma: 0
1 year 5 months ago #334197 by PaceOnline
Replied by PaceOnline on topic Create Linked CB Gallery Media Items
This has worked. The challenge we are now facing is transmitting the accompanying activity. We use activity_onAfterCreateActivity and activiity_onAfterUpdateActivity to send via request action which works except the substitution of the params of the activity. [var1_params] is empty but all the other substitutions ([var1_date], [var1_description] etc.) work. What could be the issue? We really need the params because without them we can't link the activity to its media.

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

Moderators: beatnantkrileon
Powered by Kunena Forum