Member
Member
chrisonline   2013-07-29, 09:27
#1

I have passwords on every subalbum.
In the main view there is only a icon with questionmark instead of a random image from the subalbum.

I think this is because all subalbums are password protected.
But how can I change this behavior to dispaly always a random image from the subalbums?

Member
Member
sbillard   2013-07-29, 17:55
#2

You will have to create your own version of the random image function. The standard one will not show password protected items.

Member
Member
chrisonline   2013-07-29, 21:34
#3

Thanks, can you please write down in which file this function is?

Member
Member
sbillard   2013-07-29, 22:37
#4

I do not understand. I believe I said you would have to create such a function. If you are asking that one of us write it for you, please visit the paid support link on our WEB pages.

Administrator
Member
Member
chrisonline   2013-07-30, 13:46
#6

Thanks for the info, but I don't wanted that you code it for me.
I want to change it on my installation.
But I needed the file with the function who is checking the password on the random images for albums.

I've found it now in class_album.php, function getAlbumThumbImage and changed it.

My next problem is the "latest images".
The same problem only public images are shown, but I want to show also the private as latest images.

But as of now I didn't find the right php/class file to remove the password check.

Where is the "latest images" function located?

Administrator
Administrator
acrylian   2013-07-30, 14:18
#7

latest images is part of the image_album_statistics plugin. In any case you need to create your own custom functions either via custom plugins or your themes functions.php. Otherwise you will have to re-apply your changes with any Zenphoto update.

Member
Member
Papyrus   2013-07-30, 15:02
#8

As just a side note (in case anyone references this thread), the StopDesign theme uses it's own function in the index.php so that the random images / recent images works even without image_album_statistics plugin turned on. It's not advised, but if you are writing your own function anyway you could either use image_album_statistics as a base to go by the plugin architecture or just use the StopDesign function for the base of your new function and modify it as a "quick and dirty" fix.

Member
Member
chrisonline   2013-07-30, 15:14
#9

Thanks for the information.
I will have a look at it.

Administrator
Administrator
acrylian   2013-07-30, 15:30
#10

image_album_statistics has indeed a random option. But all official themes that use random images don't use it but the randomimages functions linked above.

Member
Member
Papyrus   2013-07-30, 16:29
#11

Thanks for the clarification, Acrylian. Much appreciated!

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