Member
Member
danger_mouse494   16-03-2010, 00:16
#1

Theme in use: default/dark

I want to change the way the albums are listed in my gallery. Instead of showing 3 albums per line, I want to show 1 album per line. There should be 3 unique images shown for each album.

How can I make ZenPhoto show 3 unique album thumbnail images instead of only 1?

Also - How do you display the total number of images inside an album?
Thank you for your help.

Code - zenphoto\themes\default\album.php ------------------------

                " title=" ">


                " title=" ">
  • Code -----------------------
Member
Member
sbillard   16-03-2010, 00:48
#2

There is no easy way to get three unique images--you would have to use an MySQL search to get the image names. Then you would have to make use of the Zenphoto object model to get the thumbnails and display them.

If you are in an album context you can use getNumImages() to return you the image count within the album.

I suggest you spend some time looking at the function guides. Generally it is pretty easy to serach for what you want to accomplish.

Administrator
Administrator
acrylian   16-03-2010, 10:03
#3

To clear the terminology a little: A album thumbnail is the thumb that represents the album. I think you probably want to show three thumbs of images within the album. In that case you will have to modify the theme.

Member
Member
danger_mouse494   17-03-2010, 20:43
#4

What I want to do is call this function 3 times:

Each time the function is called it should display a different image.

I am not a programmer and don't know much PHP. Thank you for the help.

Administrator
Administrator
acrylian   17-03-2010, 20:56
#5

A Zenphoto album has only one image. You probably want to use random images.

[i]I am not a programmer and don't know much PHP.[/i]
Then now is the time to learn at least the basics, otherwise you probably won't get far.

Member
Member
danger_mouse494   18-03-2010, 02:37
#6

Sorry about my last post. I was in a rush and did not have time to really think about what needed to be said.

I am not a programmer but I do know the basics and understand the syntax of PHP and a few other languages. It ain't much but I can read and understand some of the code and make simple changes.

I made a little diagram to help show you what I want to do. Hope it makes sense.

|| = page boarders
[] = album/image
A = album tn
I = image tn

Current theme:
| [A] [A] [A] |
| [A] [I] [I] |
| [I] [I] [I] |
| [I] [I] [I] |

New theme:
| [ A A A ] |
| [ A A A ] |
| [ A A A ] |
| [I] [I] [I] |
| [I] [I] [I] |

The new theme displays albums like a banner and shows 3 images per album instead of 1. The album's details would be displays below the images.

@sbillard
Thank you for your post. Would it be possible to do something along these lines:

Albums are set to display a randomly selected thumbnail. Could I alter the function used to select a random image and change it to select 3 images instead of only 1?

I appreciate yall helping me and don't want to waste your time. If it's a matter of rewriting a function or 2 I am not afraid to try. Point me in the right direction.

Administrator
Administrator
acrylian   18-03-2010, 10:37
#7

The display of albums and images per page can be changed on the option > theme tab. But the CSS/HTML of the theme must reflect that. See also the normalizeColumns function on the doc.

You could replace the albumthumb function and use the randomImages function to get three random images of that album instead.

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