Skip to Content Skip to Menu

🌟Discover the Joomla AI Plugin that wrote its own story! - CB Editor Assistant 1.1now for Joomla 3, 4 & 5!
✍️ 5-Day Free Trial, then 🎯 save up to 30% with our 🛍️ Intro Offer (First 50 users, ends Dec. 31)
🌲 Merry Christmas! Great savings on Professional and Developer Memberships! Get 25% off now with code XMAS-2024!

Create Linked CB Gallery Media Items

  • krileon
  • krileon
  • ONLINE
  • Posts: 48630
  • Thanks: 8307
  • Karma: 1446
1 year 2 months ago #335291 by krileon
Replied by krileon on topic Create Linked CB Gallery Media Items
It contains all the column data in the _comprofiler_plugin_gallery_items database table. What information are you needing to return specifically? That would entirely depend on your external integration and what that integration needs/expects.


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 2 months ago #335298 by PaceOnline
Replied by PaceOnline on topic Create Linked CB Gallery Media Items
We need to return;
id
user_id
asset
date
 

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48630
  • Thanks: 8307
  • Karma: 1446
1 year 2 months ago #335300 by krileon
Replied by krileon on topic Create Linked CB Gallery Media Items
Then you should just be able to do the following.
Code:
if ( ! $actiondata['data1'] ) {     return []; } return [    'id'        =>    $actiondata['data1']->getInt( 'id' , 0 ),             'user_id'    =>    $actiondata['data1']->getInt( 'user_id' , 0 ),             'asset'        =>    $actiondata['data1']->getString( 'asset' , '' ),             'date'        =>    $actiondata['data1']->getString( 'date' , '' ),         ];

Then leave the "Display" parameter as JSON.


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.
The following user(s) said Thank You: PaceOnline

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

  • PaceOnline
  • PaceOnline
  • OFFLINE
  • Posts: 104
  • Thanks: 2
  • Karma: 0
1 year 2 months ago #335303 by PaceOnline
Replied by PaceOnline on topic Create Linked CB Gallery Media Items
I am still getting the timeout error having used your code. I have tried putting static values in the auto action and just using the Internal Action URL and clicking that I still get a timeout error. Is it possible I am missing something else?

 

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48630
  • Thanks: 8307
  • Karma: 1446
1 year 2 months ago #335304 by krileon
Replied by krileon on topic Create Linked CB Gallery Media Items
Enable debug mode and maximum error reporting in Joomla global configuration. Then in your auto action under Parameters toggle on Debug. Now access the auto actions direct URL with whatever GET parameters you need to pass to it with &format=raw removed from the URL. This will spit out any errors that it may be throwing. I can't see any reason for it to be throwing a timeout error unless you've setup some triggers in a way to cause an infinite loop or your server is blocking it for whatever reason.


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 2 months ago #335315 by PaceOnline
Replied by PaceOnline on topic Create Linked CB Gallery Media Items
This is what I have done;

I have disabled all other auto actions. Enabled Joomla debug mode. Enabled Maximum error reporting. Then set up the auto action with all static values and used the the Internal Action URL. I am getting "SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data" Could it be a php issue or extension missing?

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

Moderators: beatnantkrileon
Powered by Kunena Forum