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. 25th)
🌲 Merry Christmas! Great savings on Professional and Developer Memberships! Get 25% off now with code XMAS-2024!

CB Gallery link building

  • activha
  • activha
  • OFFLINE
  • Posts: 2336
  • Thanks: 117
  • Karma: 13
7 months 3 weeks ago #337977 by activha
CB Gallery link building was created by activha
Hello

I have a query autoaction which retrieves all photos of a user with a token.

Is it possible to build the CB Gallery link in the output instead of returning the result of the query and how could I do this ?

My query is 
Code:
SELECT id, value FROM `#__comprofiler_plugin_gallery_items` WHERE `type` = 'photos'   AND `asset` LIKE 'monia.imgs.%'   AND `user_id` = '[user_id]'   AND (     `description` LIKE CONCAT('%', '[post_keyword_1]', '%')      OR `title` LIKE CONCAT('%', '[post_keyword_1]', '%')      OR `file` LIKE CONCAT('%', '[post_keyword_1]', '%')     OR `description` LIKE CONCAT('%', '[post_keyword_2]', '%')      OR `title` LIKE CONCAT('%', '[post_keyword_2]', '%')      OR `file` LIKE CONCAT('%', '[post_keyword_2]', '%')   );

I am thinking at substitutions but cannot really see how ?

Thanks
 

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48616
  • Thanks: 8302
  • Karma: 1446
7 months 3 weeks ago #337982 by krileon
Replied by krileon on topic CB Gallery link building
A link to what exactly? The image itself, the gallery with the image displayed, the modal window contents? There's a few links available for media. Example as follows.

Inline Modal Window
Code:
index.php?option=com_comprofiler&view=pluginclass&plugin=cbgallery&action=item&func=display&id=MEDIA_ID_HERE

Embedded Media
Code:
index.php?option=com_comprofiler&view=pluginclass&plugin=cbgallery&action=item&func=embed&id=MEDIA_ID_HERE

Media Preview Image
Code:
index.php?option=com_comprofiler&view=pluginclass&plugin=cbgallery&action=item&func=preview&id=MEDIA_ID_HERE

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

How you build this is entirely up to you. For example you could just CONCAT it together. It won't be in SEO format though. The other option is to use PHP and process your query results to add whatever additional data you need.

Note if the media belongs to a custom gallery it won't be able to rebuild it from the URL. The above mainly works really well with profile galleries. All other galleries you'll need to utilize gallery_onGalleryAccess and rebuild them from the URL. This will eventually be solved like it was with CB Activity by moving galleries to storage, but currently that's not the case.


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
4 months 2 days ago #338988 by activha
Replied by activha on topic CB Gallery link building
Thanks for this.

With our external AI application we can only retrieve the name of the file which is in the CB Gallery table, not the id.

Would it be possible to implement ?
index.php?option=com_comprofiler&view=pluginclass&plugin=cbgallery&action=item&func=display&id=MEDIA_VALUE_HERE

Either by autoaction or by an addition to your code ? ;-)

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48616
  • Thanks: 8302
  • Karma: 1446
4 months 1 day ago #338991 by krileon
Replied by krileon on topic CB Gallery link building
There is no API endpoints in CB Gallery. If you need something like that you'll have to code that in CB Auto Actions to retrieve that information and output it in an API based format like 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.

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

Moderators: beatnantkrileon
Powered by Kunena Forum