hide galleries

I want to hide galleries that the current user can not view. im pretty sure i have found the place that needs to be altered, and all the pieces, but being very new to php i dont think i could code this as well as trouble shoot it...

<?php while (next_album()): ?>
getNotViewableAlbums
getAlbumID( )

what i want to do is create a separate structure under the while loop that is a if (current album).getAlbumId() is in the list genNotViewableAlbums, then print out all the album stuff, otherwise ... go to the next album

any help would be, well, helpful!

Comments

  • If you set an album to unpublished, then only users who have the correct rights can view the album. Is that what you're trying to do?
  • maybe i dont understand the permissions properly. I want one guest user account that can only view all galleries, several accounts that each have their own gallery, and then i want a few galleries that can be seen by everyone (even people who are not logged in.) I played with permissions and couldn't get functionality like this, even messing with published and unpublished albums... so i moved on towards modifying a theme.

    I found the part where it is building the subalbum links (the while loop i mention above) but not being incredibly familiar with php i was asking for some codeing help.
  • First, you need to review your terminology. Zenphoto deals with galleries and albums. A gallery is a Zenphoto installation. So if you really mean galleries you should have no problem doing what you wish, but you would of course need multiple installations.

    If you mean albums, then you need to set up the following:

    Create one admin user with "view all" rights. This is the "guest" user who can see all albums.

    Un publish and password protect all albums which you don't want viewed by not logged in users.

    For each who should see only his own album set that user's managed albums list to the album.
  • Thank you for the clarification. I will try that right away!
  • I have it set up like that, but it is missing 1 piece of functionality I was aiming for, I want all logged in users to be able to view all albums, but i want certain users to be able to edit certain albums.
    The intention is to have the guest account for people who wont contribute, and an account for each contributer. each contributer will have their own album, but should still be able to see all the albums.

    for not i have it so each contributer can edit all the albums, and sense I guess I trust these people, that will work for now.
  • Users who have `VIEW_ALL_RIGHTS` should be able to see all content (including unpublished). For more info you can read here: http://www.zenphoto.org/2008/07/an-overview-of-zenphoto-users/ (from the User Guide).
Sign In or Register to comment.