Skip to Content Skip to Menu

Tailoring CB Gallery

1 year 2 months ago - 1 year 2 months ago #334877 by huguesmarcil
Replied by huguesmarcil on topic Tailoring CB Gallery
Thank you, I think I can do that in order to have a multiple drag & drop file upload with registration.
However as you said you suggested

CB Gallery database table is _comprofiler_plugin_gallery_items. Suggest uploading something so you can review how a row should look in that table. 

How can I manage the thumbnails parts? Do I need to recreate my own thumbnails?
Here is an example:
{"name":"vi-vitrinenintendo12.jpg","extension":"jpg","mimetype":"image\/jpeg","modified":1692369159,"filesize":100703,"height":640,"width":364,"name_thumbnail":"tnd2da182a1fa5b8523145456c9f502f05.jpg","extension_thumbnail":"jpg","mimetype_thumbnail":"image\/jpeg","modified_thumbnail":1692369159,"filesize_thumbnail":26378,"height_thumbnail":320,"width_thumbnail":182}
Last edit: 1 year 2 months ago by huguesmarcil.

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

1 year 2 months ago #334879 by huguesmarcil
Replied by huguesmarcil on topic Tailoring CB Gallery
Hello again Krileon,
Could you also provide Auto Action PHP code examples or documentation?
Thank you

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48419
  • Thanks: 8274
  • Karma: 1443
1 year 1 month ago #334885 by krileon
Replied by krileon on topic Tailoring CB Gallery

How can I manage the thumbnails parts? Do I need to recreate my own thumbnails?

If a thumbnail wasn't created by your upload then yes, but you can just point the thumbnail to the original image file as well and just not have one. You can ignore the "params" column and don't need to supply its data. Explanation of the _comprofiler_plugin_gallery_items table structure is as follows.

user_id = user id of the user who owns the media
asset = what gallery the media will display on (for profile galleries this is just: profile.USER_ID)
type = what type of media this is ("files", "photos", "videos", or "music")
value = actual filename of the stored file on the server or the url to the file if is linked media
file = publicly visible filename (NOT the filename of the file stored on the server)
folder = id of the folder this media is in
title = publicly facing title for this media (same as the user supplied text field)
description = publicly facing description for this media (same as the user supplied textarea field)
thumbnail = actual filename of the stored thumbnail file on the server
published = published state of this media (1 = published, 2 = unpublished, -1 = pending)
date = datetime of the media upload/link

Could you also provide Auto Action PHP code examples or documentation?

We do not provide coding assistance outside of a Business membership. This is beyond what I could provide with a simple example. The only simply example I could provide here is use a CB Gallery action to insert linked media and instead of moving the files to just link to them from CB Gallery. Example as follows.

Global
Type: CB Gallery
User: Automatic (this may or may not find the user depending on the event data your extension provides)
Access: Everybody
Action
Mode: Item
Method: Create
Asset: profile.[user_id]
Link: URL_TO_FILE_HERE
Owner: [user_id]

I can't provide the trigger as you're using a 3rd party extension so you need to find what Joomla events it provides.


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.

1 year 1 month ago #334889 by huguesmarcil
Replied by huguesmarcil on topic Tailoring CB Gallery
That's smart solution, I like it!
Is there a way to execute several auto action from one event?

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48419
  • Thanks: 8274
  • Karma: 1443
1 year 1 month ago #334890 by krileon
Replied by krileon on topic Tailoring CB Gallery

Is there a way to execute several auto action from one event?

Yes, create an auto action with Type set to "Action" this will allow you to execute multiple auto actions from another auto action. It's not really ideal to do this when you have an event available to you. It's often best to just act on whatever trigger you need from whatever auto actions you need.


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: huguesmarcil

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

1 year 1 month ago - 1 year 3 weeks ago #335030 by huguesmarcil
Replied by huguesmarcil on topic Tailoring CB Gallery
Hi Krileon,
The "linked media" field works when I add external files, but when I enter the path to my own FTP ( test.domain.fr/f/cf_64fb4275e6283_photoTest.jpg for example), it returns this error:
File failed to save ! Error: The file URL is invalid. Please make sure the URL exists!
I'm guessing that if there's this error on the frontend, AutoActions won't be able to make it work either. Because as you said, the aim is to use AutoActions to add files to the user's gallery at the same time as they subscribe.
How can I provide a valid URL for my files?
Thank you for your reply 
Last edit: 1 year 3 weeks ago by huguesmarcil.

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

Moderators: beatnantkrileon
Powered by Kunena Forum