Member
Member
hubertus   2006-06-26, 17:35
#1

I'm running Zenphoto 1.0.3 with a custom theme to integrate with my wordpress site.

On album pages, I would like to display a short list of all other albums available. I am using this code

`

[list]

[*]

                    " title="Gehe zum Album ">









[/list]

[list]

[/list]

`

This works fine for the first page of each album. I does not work for any subsequent pages. An example is available at http://www.unihandball.de/fotos/dresden_turnier_2006/ - the list in question is on the right side, labeled "Andere Alben" (site nowhere finished, sorry). Go to the second page of that album, and voila, no list anymore. Could anybody please tell me how to get that working for all pages? Thanks a lot!

Member
Member
RogerUsh   2006-06-27, 02:10
#2

I was having the same problem getting next_image() to work in a while condition for a thumbnail script. The solution that I figured is a little complicated, if someone has a better solution I would love to hear it. Anyway, try this and see if it works...

STEP 1: Create a new function in classes.php:
Copy and paste the function getAlbums() in classes.php
Rename the function getAlbumsAll()
Replace the lines:
$albums_per_page = zp_conf('albums_per_page');
return array_slice($this->albums, $albums_per_page*($page-1), $albums_per_page);
with:
return $this->albums;

STEP 2: Create a new function in template_functions.php:
Copy and paste the function next_album()
Rename the function next_album_all()
Replace the function:
getAlbums($_zp_page)
with:
getAlbumsAll($_zp_page)

STEP 3: Replace next_album() with next_album_all():
In your template pages, replace the function next_album() with next_album_all() in your while conditions.

And that's it! I know there might be a way to streamline the codes, but hopefully this will work for you.

Member
Member
hubertus   2006-06-27, 09:04
#3

Thanks! This works great, problem resolved.

Turns out this is just not what the function is intended for in its original version (display the next set of available albums depending on where you are in the album list and how many albums per page there are). Should have taken a look at the code ....

Thanks again, very helpful!

Member
Member
RogerUsh   2006-06-27, 12:57
#4

Your welcome

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