How to have a public gallery if default for all photos is Logged In Users?


#1

Good morning I am the administrator for of a site that has the default privacy set to “Logged In Users”.

We have created a page that uses rtmedia_gallery uploader=before to allow users to upload their art. We would like this gallery to be visible to the public.

However, because the photos all have privacy settings of 20, when the page is viewed by unregistered viewers, we get an “Oops, no media” message. If we set the rtmedia_gallery to privacy=0, then no photos are visible to anyone because there are no photos of this type in the gallery.

Even if we set the shortcode to privacy=0 and upload new images, they are added to our Media folder, but do not display, because they have been encoded as privacy=20.

So how do we create a front-end uploader gallery that is visible to the public?


#2

Hello @webmaster_sw,

If you want to change rtMedia ‘Default privacy’, then you can set ‘Allow users to set privacy for their content’ option to ON from ‘Privacy’ tab under rtMedia admin settings.

If you have not enabled that setting then once try setting it to ON and check below shortcode.

[rtmedia_gallery uploader=before privacy=0] 
I hope this helps you. Thank you.

#3

Hello Jignesh Thank you for the suggestion. We have considered your strategy but do not feel that it provides an acceptable user experience for our users.

We are looking for an alternate methodology that allows us to make all files uploaded to a public page using a front-end uploader public.

This may require additional php coding.


#4

For example, is there a shortcode that I can add to the rtmedia uploader that will automatically assign a privacy setting of 0 to all photos uploaded to that specific context id?


#5

Hi @webmaster_sw,

What we understood from your reply is, you want to set default rtmedia privacy to ‘Logged-in Users’ that is 20 for all other media uploads except one page where users ( logged-in / non-logged in ) can upload and view media with privacy ‘public’ (0).

As @Jignesh_Nakrani suggested, you can allow non-logged-in users to view gallery where media are uploaded by logged-in users with privacy ‘public’ (0). Uploader cannot be public for non-logged-in users.

Let us know if we have misinterpreted your requirement. Thank you.


#6

Hi everyone. I wanted to explain the solution we are using. It’s is a bit complex:

Here are our rtMedia Privacy settings: Enabled = ON Default = Public Allow Users to Set = Off

This makes our gallery public. Then we had to protect our other rtMedia assets. We did this using a bp_guest_redirect function for bp_is_groups_component, bbp_is_single_forum, bp_is_forums_component() such that for not logged in users, the URL redirects to our Membership Sign-Up page.

We used Lightbox to display media, so this brings up a full Membership Sign-up page in the modal window. To eliminate this, we used two modules for the rtMedia gallery:

Module 1: Logged In Users This content is only visible by Logged In Users rtmedia gallery, uploader before, privacy = 0

Module 2: Guest Users This content is only visible to Guest Users rtmedia gallery, NO uploader, privacy = 0 class = Login modal pop-up on click

This is how we a) made the gallery public, b) blocked all other rtmedia assets from being public, and c) prevented the Lightbox modal window from coming up for Guest users.

Thanks for your interest!


#7

Hello @webmaster_sw,

We are glad that you figured out the solution for yourself but have some doubts. We are still unclear with your exact requirement.

This makes our gallery public. Then we had to protect our other rtMedia assets.

Can you specify which other rtMedia assets you want to prevent from being public?

For Module 2, If you use shortcode with uploader, though gallery is visible to all users but the uploader will be visible to registered users only and not to guest users ( non-logged-in users ).

We would like to understand your concern so that this way we might help you with more optimized and efficient solution if there is any.

Thank you.


#8

Hello @pranalipatel This gallery is intended to display the artwork of users. However, all other photos shared between users is to be kept private. Therefore other photos (personal photos of users) shared in activity streams are the other rtMedia assets that we needed to protect.


#9