CB Gallery autoaction to create an item

2 weeks 7 hours ago #337865 by krileon
Replied by krileon on topic CB Gallery autoaction to create an item
There is no solution to fix that. Gallery items are user input content and for security reasons it strips HTML from them. Their profile should already be linked via user_id as it shows the owner in the modal window.


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 to join the conversation.

2 weeks 2 hours ago #337869 by activha
Replied by activha on topic CB Gallery autoaction to create an item
Yes this was my point. The owner is not the uploader.
It’s a connection allowed to upload for the owner (company) and I tried to link its profile so that the company (owner ) could check who uploaded what

Please Log in to join the conversation.

1 week 6 days ago #337873 by krileon
Replied by krileon on topic CB Gallery autoaction to create an item
The owner and profile it was uploaded to can be separate. This is done by using Asset. Example as follows.

asset = profile.COMPANY_USER_ID
user_id = UPLOADER_USER_ID

Sorry, I've no other solution for you. Media isn't designed to reference 2 users like you're needing. I suppose you could just add their username to the description otherwise you'll need to figure out your own solution for this.


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 to join the conversation.

1 week 6 days ago #337874 by activha
Replied by activha on topic CB Gallery autoaction to create an item

I suppose you could just add their username to the description


Yeah that's what I did...
however a space to add a link to their profile would have been perfect ;-)

The owner should still be able to edit/delete the file if any issue with the content so I guess asset and user_id should be the same owner user_id.

Please Log in to join the conversation.

1 week 6 days ago #337878 by krileon
Replied by krileon on topic CB Gallery autoaction to create an item

however a space to add a link to their profile would have been perfect ;-)

HTML support for descriptions is not going to be added, sorry.

Best I can suggest is add to the params of the item then implement custom display of that param. A trigger is how CB Activity adds Likes and Comments to the modal window. You'd basically do the same for your custom display behavior. Specifically the following trigger.
$_PLUGINS->trigger( 'gallery_onDisplayModal', array( &$row, &$title, &$date, &$menu, $gallery ) )

Anything returned by that trigger just inserts below the description. So for example you might store who uploaded using the below.
$item->params()->set( 'uploader', UPLOADER_USER_ID_HERE );

Now you can use that user id in custom display handling in gallery_onDisplayModal to render their linked username.


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 to join the conversation.

1 week 5 days ago - 1 week 3 days ago #337889 by activha
Replied by activha on topic CB Gallery autoaction to create an item
Can this trigger display something under the thumbnail ? for instance left of the file icon or right of the date field ?

That would be perfect for the use

Also as I added 
$item->set('user_id', $user->id);
$item->set('value', '');
$item->set('asset', 'monia.docs.' . $user->id);
$item->params()->set( 'uploader', UPLOADER_USER_ID_HERE )

Would it be possible to use the params uploader to condition the gallery display of the user_id to this ? and How ?
I mean that the gallery field of the user_id is set as private but I am trying to find a way to force display the items loaded by UPLOADER_USER_ID_HERE so that the uploader may view what he has done and maybe comment privately

Is there any trigger that would allow this ?

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.349 seconds

Facebook Twitter LinkedIn