Search…

X3 Photo Gallery Support Forums

Search…
 
RIIID
Topic Author
Posts: 11
Joined: 08 Jun 2023, 12:23

Cart to be visible after login only

27 Aug 2023, 12:27

Hi,
as the title says: I would like visitors to be able to download selected photos, but only after they have received login data from me.
So, cart and selection of images should be visible only after login.

How would I go about this?

Regards
Richard
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13998
Joined: 30 Sep 2006, 03:37

Re: Cart to be visible after login only

27 Aug 2023, 23:01

Ok, so "login" doesn't generally offer different settings, and although you will be prompted to login on a specific page (as assigned by you), a user will always remain "logged in" or "not logged in". I could assign a "logged-in" CSS class in next release (available in a couple of weeks), that would allow you to show/hide certain page elements via custom CSS. Would that be an option? You could hide the cart until logged in, but keep in mind, the page text/content would otherwise remain the same.

This would be a simple solution to hide the cart feature depending on login status. Let me know.
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13998
Joined: 30 Sep 2006, 03:37

Re: Cart to be visible after login only

28 Aug 2023, 01:09

X3 uses PAGE logins, so users get access to a page only after login. How did you intend show the page to a non-logged in user if the page requires login? What you are asking for, is an abstract login system, that allows access to certain features in X3, unrelated to pages.
 
RIIID
Topic Author
Posts: 11
Joined: 08 Jun 2023, 12:23

Re: Cart to be visible after login only

09 Sep 2023, 01:58

Yes, an abstract login is what I had in mind. But the CSS solution will be enough - all I need is to hide the cart from non-logged in users.
Also, how would I go about renaming the actual word "cart" ?
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13998
Joined: 30 Sep 2006, 03:37

Re: Cart to be visible after login only

09 Sep 2023, 03:57

RIIID wrote: Yes, an abstract login is what I had in mind. But the CSS solution will be enough - all I need is to hide the cart from non-logged in users.
I think you read my first reply, but not my second reply. How will non-logged in users be able to see the page if it's password-protected? If the page is NOT password-protected, then how will users login?
RIIID wrote: Also, how would I go about renaming the actual word "cart" ?
It's done with CSS, similar to interface texts. Please see this document, where the cart is translated into German by example:
https://cart.photo.gallery/interface-texts/
 
RIIID
Topic Author
Posts: 11
Joined: 08 Jun 2023, 12:23

Re: Cart to be visible after login only

09 Sep 2023, 09:03

So, maybe it is easier to describe my aim: 
I would like to allow download of albums / photos (via the cart plugin) only after contacting me (and receiving login data).
The reason is that I would like to know where and how my images are used, which is what I would ask people to tell me ahead of letting them download anything. I am not worried about copyright - but don't want to make it easy for just anyone to download images using the cart plugin.
After my approval, I would create a user with access to one or more albums (gallery and album pages, I guess).
After they log in, the cart plugin would show on these pages, and they would be allowed to download selected albums / images.

Sorry for my assumptions, but so far I have only worked with database drive systems - so this might not be possible they way I think it should ;).
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13998
Joined: 30 Sep 2006, 03:37

Re: Cart to be visible after login only

09 Sep 2023, 09:23

The challenge here, is that you are asking for a login-system that isn't related to pages. Basically you want any users to be able to view the page (it's not login protected), but then you want a login system to control whether the user can view cart or not, independent from pages. This of course would require a dedicated login page, since logins would be independent from the pages.
RIIID wrote:I would like to allow download of albums / photos (via the cart plugin) only after contacting me (and receiving login data).
Where would the user login though, if the page does not have login?

X3's login system is page/url access based, so this simply won't work for the feature you are considering. In your case, you would need a separate LOGIN button, because you want login to control something else (cart visibility) and not page access. The login mechanism would then need to work entirely differently, because we can't check login vs requested page. I understand your plan, but this is an entirely different login feature that does not exist in X3.

As a workaround, you could for example have a public page WITHOUT cart, and on user request, you could provide login access to a private page WITH cart. The private page could load assets from the public page, so effectively it would use the same images. The only difference would be that the private version has login + cart. For example /somegallery/ and /somegallery/cart/.
 
RIIID
Topic Author
Posts: 11
Joined: 08 Jun 2023, 12:23

Re: Cart to be visible after login only

09 Sep 2023, 09:30

mjau-mjau wrote: As a workaround, you could for example have a public page WITHOUT cart, and on user request, you could provide login access to a private page WITH cart. The private page could load assets from the public page, so effectively it would use the same images. The only difference would be that the private version has login + cart. For example /somegallery/ and /somegallery/cart/.
Got it. The workaround makes sense and I'll use it. Thank you.
I am unsure if I want to create a subfolder "cart" inside a given gallery - OR create a top level folder called "cart" and then have the same structure inside that I am building right now.
Any ideas on this?