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 ?
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.
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.
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.