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!

CB Gallery question

  • krileon
  • krileon
  • ONLINE
  • Posts: 48630
  • Thanks: 8307
  • Karma: 1446
1 year 6 months ago #334210 by krileon
Replied by krileon on topic CB Gallery question
The following auto action will cause media to validate their album privacy rule. So this should at least help with that issue on the frontend.

Global
Triggers: gallery_onLoadItems
Type: CB Privacy
User: Self
Access: All Non-Moderators
Conditions
Condition 1
Field: Custom > Value
Custom Value: [user_id]
Operator: Not Equal To
Value: [loop_user_id]
Condition 2
Field: Custom > Value
Custom Value: [loop_folder]
Operator: Not Equal To
Value: 0
Action
Mode: Privacy
Method: Authorized
Asset: gallery.album.[loop_folder]
Owner: [loop_user_id]
Parameters
References: Variable 1
Loop: Variable 1

That should validate a media items album privacy on access to media item.

I don't have a solution for you to easily extract what privacy rule was selected without just acting on CB Privacy triggers. Specifically the following.

privacy_onAfterUpdatePrivacy
privacy_onAfterCreatePrivacy


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
1 year 6 months ago - 1 year 6 months ago #334213 by activha
Replied by activha on topic CB Gallery question
How do you think it could help ?
I am acting on uploading a new item to add its privacy rule to the vector store
Will the items inherit the album rule at the same time ?

Can we imagine that in an album the items would only inherit the album rules and not be editable for their privacy settings ?
This way my users would only add albums according to their needs with privacy set and then only add and remove items without being able to edit their privacy ?
Last edit: 1 year 6 months ago by activha.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48630
  • Thanks: 8307
  • Karma: 1446
1 year 6 months ago #334214 by krileon
Replied by krileon on topic CB Gallery question

I am acting on uploading a new item to add its privacy rule to the vector store

Well as explained before if you want the privacy rule of uploaded media you need to act on the privacy trigger.

Will the items inherit the album rule at the same time ?

On display it would check the album privacy in addition to the media privacy. If either privacy rule would prevent access then the media access will be blocked.

Can we imagine that in an album the items would only inherit the album rules and not be editable for their privacy settings ?

Yes, you could then just not have media privacy if that's what you wanted.

This way my users would only add albums according to their needs with privacy set and then only add and remove items without being able to edit their privacy ?

Yes, if that's the desired usage you want.


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
1 year 6 months ago - 1 year 6 months ago #334215 by activha
Replied by activha on topic CB Gallery question
Great that would do it ;-)
How can I remove the privacy edit settings for items in a cb gallery field and make them only inherit their album privacy rule ?

Say that I want a public privacy for all items and those within albums would inherit their privacy rules on upload ?

Also last point : where are the language strings for connections type. It seems like I  have an old installation and types are recorded in plain languages in the _members table such as 
Code:
Collègues de travail|*|Relations d'affaires
which of course would be awful to compare. 
I'd  like to use _UE_WORKTEAM or something like this for instance, so that it's easier to compare in the metadata of the vector store.

Sorry to insist on those points, but vector database are awful to edit. I use hnswlib and it's easy to add a doc, more difficult to suppress it but pretty impossible to edit points for a doc and its metadata.
That's why I'd prefer to add the privacy metadata as soon as the item is uploaded and avoid changes there after.

So best thing would be to explain to users that they can have different albums with different privacy settings, then upload items in these albums, but ask them to remove and upload in another album if they want to change their privacy

Hope you get what I mean :-)
Last edit: 1 year 6 months ago by activha.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48630
  • Thanks: 8307
  • Karma: 1446
1 year 6 months ago #334217 by krileon
Replied by krileon on topic CB Gallery question

How can I remove the privacy edit settings for items in a cb gallery field and make them only inherit their album privacy rule ?

Make copies of the system actions adding privacy controls to CB Gallery and remove the item trigger.

Say that I want a public privacy for all items and those within albums would inherit their privacy rules on upload ?

Make an auto action with my above example and it'll check folder privacy controls when viewing media if that media has a folder.

Also last point : where are the language strings for connections type. It seems like I  have an old installation and types are recorded in plain languages in the _members table such as 

The connection type is the language string. So if the connection type is "Co-Worker" then you'd just set the language key to "Co-Worker" and override it as needed. Typically it's best to just use a language key though (e.g. CONN_TYPE_COWORKER) and translate those. These are configured in CB > Configuration > Connections.


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

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

  • activha
  • activha
  • OFFLINE
  • Posts: 2336
  • Thanks: 117
  • Karma: 13
1 year 6 months ago - 1 year 6 months ago #334221 by activha
Replied by activha on topic CB Gallery question
Another idea : would it be possible to add the privacy selector to the upload page ? to get the same behavior as the edit file page ?
This way the privacy of the item would be fine at the upload time. I need to send the file to the embedding system and the vector DB with the correct privacy set when it's uploaded, this to avoid suppressing re-adding all data points if the privacy is edited just after uploading.

I also considered acting on Privacy triggers but the issue here is that when an item is uploaded as public there is no privacy rule, so how could I get it ?

in order to better explain : as soon as it’s been uploaded, the file is sent to be splitted and its parts transformed in vectors with metadata. 
It is today pretty impossible to update vector points. I use HNSWlib. The only solution is to mark points as delete and readd new ones. 
As the privacy rule is added in the metadata of all parts (data points) of an uploaded file, that’s a real issue if it has to be changed quickly and often. 
That’s why I try to find a solution to send both the file and the correct privacy setting at the upload time. 
For now, when files are uploaded and the privacy is set to public by default, there is no privacy rules added to the _comprofiler_plugin_privacy table. The rule is only added after edition of the file.
I tried to manually edit the privacy system autoaction for gallery items but could not get it to work to add a record to the table when privacy is set at public for uploads.

Of course it it worked like this, I could try  to use the privacy plugins and get the gallery item value from its privacy asset id.
Sorry to bother you on this post but CB gallery is robust to use and perfect for users file management so that would be great to find a solution. 

Also another question regarding :

The connection type is the language string. So if the connection type is "Co-Worker" then you'd just set the language key to "Co-Worker" and override it as needed. Typically it's best to just use a language key though (e.g. CONN_TYPE_COWORKER) and translate those. These are configured in CB > Configuration > Connections.

Would it be possible for a user to adapt the language key to its own use ? and how ?
Say that I set CONN_TYPE_1, CONN_TYPE_2, CONN_TYPE_3... some users would like to map to co-workers, friends or relatives and others would like to have Sales, Marketing and Operations for instance.
How could I achieve this ?
That would be great to have a default proposal with an ability for each user to map the names according to its needs.
Can we do this with cb fields ?
Last edit: 1 year 6 months ago by activha.

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

Moderators: beatnantkrileon
Powered by Kunena Forum