[SOLVED] Gallery upload not working for each user only

6 years 4 months ago - 6 years 4 months ago #299990 by Spiralmind
Hello, I am having a heck of a time figuring this one out.

What I am trying to do.
1. Gallery Field for photos that each user can upload when logged in and view is public
2. Gallery field for files that each user can upload but is private
3. Joomla menu items for both
4. Tab in profile for both

What's happening.
Not even sure what is going on. I took a video of what is going on. Perhaps you can make some sense of it.

This message contains confidential information


Thank you

Please Log in to join the conversation.

6 years 4 months ago - 6 years 4 months ago #300001 by krileon
Replied by krileon on topic Gallery upload not working for each user only

1. Gallery Field for photos that each user can upload when logged in and view is public

Create a gallery field type then disable all media types other than photos. Leave the rest of the parameters as is.

2. Gallery field for files that each user can upload but is private

Create a gallery field type then disable all media types other fan files. Leave the rest of the parameters as is. Next using CB Privacy under Integrations > Privacy set "Display" to "Forced privacy control" and "Default" to "Private".

That's all you should have to do unless you've altered the global parameters and if you did you'll need to adjust more specifically each fields parameters.

3. Joomla menu items for both

This is a bit trickier. Menu items will not inherit the fields parameters. In fact it will override them given the chance. So what you need to do is create a Joomla menu item with menutype Community Builder > Plugin and select CB Gallery as the Plugin. Now you need to replicate the parameters you set in the field also in the menu item (e.g. disable all types except photos). Now in order for it to output the fields entries the most important parameter is Asset. Asset determines location. The asset, by default, for fields is profile.PROFILE_ID.field.FIELD_ID. So you'll need to use profile.[user_id].FIELD_ID to do this dynamically (replace FIELD_ID with the actual field id).

4. Tab in profile for both

As they're already fields you shouldn't need to do anything specific for this beyond put them on their respective tabs.


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.

6 years 4 months ago #300004 by Spiralmind
Replied by Spiralmind on topic Gallery upload not working for each user only
I'll try this, did you watch the video?

I have this for the documents already [user_id].field.93
This for photos [user_id].field.245

Please Log in to join the conversation.

6 years 4 months ago #300009 by krileon
Replied by krileon on topic Gallery upload not working for each user only

I have this for the documents already [user_id].field.93
This for photos [user_id].field.245

Neither of those are correct. They are as follows to match a fields default asset. See my above reply for further asset usage details as well as the asset parameter description.

profile.USER_ID.field.FIELD_ID

So in your case the assets to those 2 fields would be used as follows.

profile.[user_id].field.93
profile.[user_id].field.245

If you changed the assets of the field or the global CB Gallery parameters there is not much I can do to help you as I can not personalize examples, sorry. You will need to review your own configuration carefully if that is 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 to join the conversation.

6 years 4 months ago #300017 by Spiralmind
Replied by Spiralmind on topic Gallery upload not working for each user only
Something else is going on here. I changed the values like you said but I still get sent to the wrong place when clicking upload in the photo gallery in my profile view. That takes me to the Document Uploads.

Any idea how this could be fixed?

When I click on upload documents from my profile view it takes me to this url and the document menu item which seems correct.
/upload-documents?action=items&func=new&folder=0&gallery=6809a80dbe1f6edbccbafd4eb8965177&return=aHR0cDovL3ZwczM0NDk2LmlubW90aW9uaG9zdGluZy5jb20vfmJpcmRjaXR5d2lvcmcvY2ItcHJvZmlsZT90YWI9Mzk=

When I click on the upload photo from my profile view it takes me to this url but it's still showing the upload documents menu item
/upload-documents?action=items&func=new&folder=0&gallery=3ff79ee18459c585e330f92af6f568e1&return=aHR0cDovL3ZwczM0NDk2LmlubW90aW9uaG9zdGluZy5jb20vfmJpcmRjaXR5d2lvcmcvY2ItcHJvZmlsZT90YWI9NDM=

The rest seems to be working now, I had not set the document menu item to not allow photos. So the field and menu item were not in agreement. This menu thing is strange. Both menu items are set to the values you said should work. They are the correct field IDs.



Attachments:

Please Log in to join the conversation.

6 years 4 months ago #300034 by Spiralmind
Replied by Spiralmind on topic Gallery upload not working for each user only
I am also seeing this in the media plugin list.

Attachments:

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.179 seconds

Facebook Twitter LinkedIn