I have some folders with no images (either no files, or files do not contain images). Is there a way to tell zenphoto to hide these albums (with the need for me to manually mark each album)? Right now, they show a big question mark image.
Thanks...
-- Jeff
Comments
gallery.php (line 39, ../themefolder/):
if(getNumImages() == 0)
{
continue;
}
print_album_menu.php (line 212, ../zp_core/zp_extensions/):
if($topalbum->getNumImages() == 0)
{
continue;
}
This is because I want people to register to see photos, let them have their own album to upload, but NOT have empty albums shown on home/. You need to alter both files, because the sidebar is using the printAlbumMenu() function, while the gallery.php is looping through albums on its own.
Well as I said, not the prettiest solution, but works for my purposes!
Where can i read more on how to change such things with filters? I couldn't find anything in the docs... Well, i found the filter file and a description, but... err, well that didn't explain much imo.
ty
http://www.zenphoto.org/news/category/development
Of course you first should get familiar with Zenphoto and its themes itself.
Thank you so far for the help acrylian.
Because life would be boring without 2 new problems with every solved one:
I didn't know, that unpublished albums are shown to logged in users. Every viewer on my page has to be registerd and logged in (that is, because this gallery will be for a private userbase only). So there is problem 1.
Problem 2 is: I reimplemented the hack (now with proper syntax), which now works for the gallery.php and print_album_menu.php (->sidebar links) file. I don't know however how to change the pagination to stop showing empty sites.
If anybody is interested in the unpublish_album_plugin: its documented and ready to use. let me know
Problem 2: See 1..:-)
We appreciate every 3rd party plugin or else contribution. Please read here:
http://www.zenphoto.org/news/general-contributor-guidelines#themes-and-plugins
We then glady add an entry on the extensions section for it.
There is a change made in tonight's development build which may solve the problem or you. Currently there is a managed album sub-right for viewing unpulished images. That is now extended to include subalbums as well. In addition, the "default" gallery behavior will be that unpublished albums do not display for users without the view all albums right.
Unfortunately, the show_not_logged_in-plugin does not help in my case. As sbillard said, it would only let me see the login screen and thats it (of course that only applies to our zenfoto-site).
About the nightly-build: thats music to my ears, I'll definetly update. I thought it would be bad to to view the gallery as an admin then (because you'd have to switch through hundreds of empty albums), but I'll just make another normal user for viewing/uploading tasks. And that is probably recommended anyway.
We will appreciate your testing this feature and reporting any issues.
The new version (nightly build: zenphotoV1.4.2-DEV) works like a dream, the plugin also performs as expected. Unpublished albums are now only visible to users with the "manage all albums" permission.
The jplayer is also a really great addition