zenphoto forums » General Zenphoto Discussion

Help - how to use a login for private albums

(46 posts)
  1. gwmbox

    Contributor
    Joined: Apr '07
    Posts: 170

    What is and how does $menuset (the menu tree desired) work? What is the menu tree? The album, a custom menu?

    Also what about printAlbumMenuListAlbum, does this enable me to limit the menu item to a single album (and its sub-items)? Is that what the folder variable is for?

    I am trying to stay away from manually having to create and add to a custom menu, I am trying to use the built in functions as much as possible.

    Thanks

    GW

    Posted 2 years ago #
  2. Zenphoto development team
    acrylian

    Developer
    Joined: Jul '07
    Posts: 13,364

    Be sure not to confuse the menu_manager plugin and the print_album_menu. $menuset refers to the menu set you want to use with the menu manager as you can have multiples. You could for example manually create one that only shows your top level album but not the sub albums you don't want to show. If you name it like the album you could even call it by using hte current album name.

    printAlbummenuListAlbum belongs to the print_album_menu plugin. The menus are quite complicated stuff (sbillard did thankfully rework those parts to be more effective when I did them more straitght forward once) because of the rather complicated html list nesting they need to put out correctly.

    Don't forget to read the Forum rules and usage resources
    Posted 2 years ago #
  3. Zenphoto development team
    sbillard

    Chief Developer
    Joined: May '07
    Posts: 9,768

    As far as album visibility. If you have not given the user View All rights he can see only published albums and albums which are in his managed album list. Seems that is what you are looking for, isn't it?

    If so then the approach would be:

    1. Make the root album published and password protected. (It does not matter what the password is.)

    2. Make the "private" subalbums unpublished and password protected. (Again, the password does not matter.)

    3. Assign Place the albums into the managed albums list of the users that are supposed to be able to see them (and, of course, not in the users who are not supposed to see them.) Set the other priviledges as desired, but DO NOT assign View all rights as that overrides what you desire.

    Then when a visitor not logged in visits the root album he will be required to log in. (Be sure the option is set so that the usercode field is presented in the logon form.) Only the logon form is presented at this time.

    (Alternatively, you can make this album public and use the user login-out plugin to present the login form. In this case any public subalbums in the album will be shown.)

    The user logs in with his credentials. He will be able to see any public subalbums and any subalbums assigned to him.

    Don't forget to read the Forum rules and usage resources
    Posted 2 years ago #
  4. gwmbox

    Contributor
    Joined: Apr '07
    Posts: 170

    sbillard, not sure what your post is about? My solution on p[age 1 of this thread works brilliant for me. The albums are 'unpublished' and my solution allows the 'user' to login and then they are able to view their album, and only heir album.

    acrylian, thanks for the info. Is there a way to call only 1 album using one of the printalbummenu functions? Otherwise I might have to use the menu manager, prefer not to but if that is my only option then well.... that is my only option.

    Thanks

    GW

    Posted 2 years ago #
  5. Zenphoto development team
    sbillard

    Chief Developer
    Joined: May '07
    Posts: 9,768

    Well, the above suggestion accomplishes your initial statement of desire with NO theme changes at all. Your solution seems overly complex and unnecessary.

    Also, from the discussion it did not sound like it was working. (Why the question on the menus then?) But if it does what you want, then fine.

    Don't forget to read the Forum rules and usage resources
    Posted 2 years ago #
  6. gwmbox

    Contributor
    Joined: Apr '07
    Posts: 170

    Sorry I might have misunderstood you.

    My solution that I came up with provides for me the ability to have the user account only see 'their' albums. I did not try your solution as I do not want the root album password protected, only the sub-albums. Again my solution enables me to do that.

    My question on the menus was because at this stage when the user is logged in the sub-album is only shown if they are the correct user, if not then it is not shown. However this does not affect the menu, the menu list still shows all the albums as there is no check to see what menu item should be shown per user.

    Instead of trying to work out a way to check for user etc on the menu, just having a link to the private-album without any sub-albums would be sufficient, BUT I need the drop down lists for all our other albums.... I hope that is clear enough to understand.

    So the result (for the menu) desired is that all albums are listed on the menu with their sub-albums 3 deep BUT the private album shows no sub-albums, only the top album in the menu is shown.

    To accomplish this I might have to use the custom menu, but I was hoping I could just use something like printAlbummenuListAlbum() to create the menu item for each album in the menu, but I have not quite figured out how that works or if that will be the solution.

    The docs say use

    printAlbumMenuListAlbum( array $albums, string $path, string $folder, string $option, string $showcount, int $showsubs, string $css_class, string $css_class_topactive, string $css_class_active, bool $firstimagelink, bool $keeptopactive )

    but I have not been able to get it to work, what should array $albums be?

    Thanks

    GW

    P.S. The reason I don't like the custom menu is that in previous usage I have found it to at times forget or lose the menu order. Maybe I was using it wrong and should just give it another try.

    Posted 2 years ago #
  7. Zenphoto development team
    sbillard

    Chief Developer
    Joined: May '07
    Posts: 9,768

    The $albums parameter would be something like
    array('album1/subalbum1/sub-subalbum', 'album1/subalbum2/sub-subalbum,...)` Basically a list of the albums to show.

    Don't forget to read the Forum rules and usage resources
    Posted 2 years ago #
  8. gwmbox

    Contributor
    Joined: Apr '07
    Posts: 170

    Brilliant, all done and working as I wanted it to - thanks a heap for all your help and assistance sbillard and acylian.

    As I have said before once it is live and we start making sales we will pay you guys 1% of every sale each month as a donation... it might not sound like much but I am sure over time it will add up :). Just imagine if every zenphoto site owner that was commercial did that - the mind boggles :)

    Cheers again

    GW

    Posted 2 years ago #
  9. Zenphoto development team
    acrylian

    Developer
    Joined: Jul '07
    Posts: 13,364

    We are looking forward getting rich...;-)

    Don't forget to read the Forum rules and usage resources
    Posted 2 years ago #
  10. Zenphoto development team
    trisweb

    Project Manager
    Joined: Sep '05
    Posts: 1,833

    Thanks for your support GW - much appreciated. Could help us upgrade the server finally! :)

    Posted 2 years ago #
  11. tanner2272

    Member
    Joined: Jun '11
    Posts: 24

    Hi sbillard said this:

    **********
    As far as album visibility. If you have not given the user View All rights he can see only published albums and albums which are in his managed album list. Seems that is what you are looking for, isn't it?

    If so then the approach would be...
    **********

    sbillard's full post makes a lot of sense, but (for my personal requirements) I'm still a little lost as how to implement it.

    I have manually (within Admin) created a second "test" user, which doesn't have full admin abilities. I have password protected a specific album and now, when being logged out of Admin, I can see that the Album icon has a padlock on it.

    Now, if I visit http://localhost:8888/zenphoto/zp-core/ I get the Admin login window. I can login to the "test" account and be in the Admin area (but unable to actually edit anything).

    I can click the top-right "view gallery" link and be shown the protected album. Yay! That's great :)

    But, obviously I don't really want "test" user to be logging in through the Admin part of the site... SO, what I assume should be simple, how do I get a site front-end login link, so that "test" can login without visiting the zp-core admin area?

    Cheers,
    m.

    Posted 1 year ago #
  12. Zenphoto development team
    acrylian

    Developer
    Joined: Jul '07
    Posts: 13,364

    Use the register_user plugin...see you own topic: http://www.zenphoto.org/support/topic.php?id=9411

    Don't forget to read the Forum rules and usage resources
    Posted 1 year ago #
  13. Robt

    Apprentice
    Joined: Jan '12
    Posts: 2

    Hello,

    I am new to zenphoto and have been reading quite a bit about user management. I tried to follow the above mentioned steps

    2. Make the "private" subalbums unpublished and password protected. (Again, the password does not matter.)

    3. Assign Place the albums into the managed albums list of the users that are supposed to be able to see them (and, of course, not in the users who are not supposed to see them.) Set the other priviledges as desired, but DO NOT assign View all rights as that overrides what you desire.

    to create hidden subalbums but I cannot find the setting, where to "place the albums into the managed albums list" - where can I do that with the hidden subalbums?

    Thanks in advance for your help!

    Rob

    Posted 1 year ago #
  14. Zenphoto development team
    acrylian

    Developer
    Joined: Jul '07
    Posts: 13,364

    You cannot place albums in the managed album list (might be a typo). They are by itself listed in that list but that managed album list only supports top level albums which includes all levels of their own subalbums.

    Zenphoto is filesystem based and making subalbums of several levels directly avaialble via that list would cause too much overhead.

    Don't forget to read the Forum rules and usage resources
    Posted 1 year ago #
  15. Robt

    Apprentice
    Joined: Jan '12
    Posts: 2

    Thank you for your fast response! Too bad, it doesn't work that way though... I could think of several use cases where one would like to restrict access to subalbums to certain users (e.g. a couple that is only supposed to see it's own wedding pictures in the 'weddings' subalbum but not all other picutures/albums).

    Posted 1 year ago #
  16. Zenphoto development team
    acrylian

    Developer
    Joined: Jul '07
    Posts: 13,364

    You can do that but you have to set a password on that album directly.

    Don't forget to read the Forum rules and usage resources
    Posted 1 year ago #

RSS feed for this topic

Reply

You must log in to post.