Member
Member
Chisa   2010-02-02, 12:26
#1

Almost got this site done! I now have a small issue with password protected albums. I want to have all password protected client albums as subalbums of the 'Client Viewing' album. I have set the general albums to display a large random thumbnail for each subalbum, but for these protected ones I want to show a smaller thumbnail or none at all. Is it possible to do something different for these different cases?

If there's some function that checks whether an album is protected or not that I can use in album.php I can work from there, but I can't seem to find anything...

The page in question can be viewed here: http://teresawatts.com/zenphoto/clientviewing

Administrator
Administrator
acrylian   2010-02-02, 13:31
#2

All you need to do is to check on your theme's album.php if you are in the "Client viewing" album and then use different values for the thumbs. Or assign a special album theme to that "Client viewing" album.

Member
Member
sbillard   2010-02-02, 19:44
#3

There is a plugin which does something similar to this. You could possibly adapt it to your needs. Look at the flag_thumbnail plugin. Currently it overlays a "lock" image on the password protected images, but you could modify it to change the thumbnail size or whatever.

Member
Member
Chisa   2010-02-08, 04:32
#4

Thanks! I now have the gallery index looking if an album is called 'Client Viewing' and replacing the thumbnail with a special one, and want to do something similar with all albums inside this one.

My PHP is a little rusty though, and I'm not sure how to do this. getParentAlbums() gives me an array of the parents which I'm assuming includes the 'Client Viewing' album, but I'm not sure how to go from the array to being able to check the name of the parent album to see if it's 'Client Viewing'.

How do I go from an array from parents to being able to get the parent album's name?

Member
Member
sbillard   2010-02-08, 04:51
#5

The array returned is the list of names of the parents. So you would examine the array items and see if one of them was your "client viewing" album.

Member
Member
Chisa   2010-02-08, 06:17
#6

Hrmm... that's what I'm doing, but I'm getting an error? What I have is:

$parents = getParentAlbums();
echo "parents: " . $parents[0];

Just to test things out, but it seems to be returning an object rather than a string?

Administrator
Administrator
acrylian   2010-02-08, 10:34
#7

Seems that the doc is a little inaccurate, it returns an array but an array of objects. So you need to use the object methodes to get the name ($parent[0]->name)

Also this one might help, too:
http://www.zenphoto.org/documentation/functions/_functions.php.html#functiongetUrAlbum

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.