print album menu 1.3 released

acrylian Administrator, Developer
New in 1.3:
- requires zenphoto 1.1 or newer
- nearly completly rewritten
- supports now up to 4 subalbum levels
- context sensitive fold out display as valid nested html lists

It's included in the latest svn (as usual in zp-core/plugins) found here:
http://www.zenphoto.org/trac/browser/trunk

Usage as before.

Comments

  • Hi, I'm not very familiar with PHP. So what code do i have to include to my theme file to show the menu?

    Regards,
    Sven
  • You have to add two things to your theme:

    `require_once('zp-core/plugins/print_album_menu.php')'` somewhere up at the beginning

    and

    `printAlbumMenu($option,$option2)'` positioned where you want the menu. See the documentation in the program file for what to pass for the two parameters.
  • I trying to figure out why in my case the counts are not taking in to consideration the `show` flag. The print_album_menu.php seems correct.
    `

    function printAlbumMenu(

    .

    .

    .

    case "count":

    // count images in the main albums $result2 = query("SELECT COUNT(id) FROM ". prefix('images') ." WHERE `show` = 1 AND albumid = $id[$number]");

    $count = mysql_result($result2, 0);

    if($count === "0") {

    $imagecount[$number] = "";

    } else {

    $imagecount[$number] = " (".$count.")"; }

    `
    But the menu on my page shows the full image count instead of visible count. I am not logged in as Admin. I am using garland theme.

    `

    Album Menu

    <?php printAlbumMenu("list","count","album_menu","album_menu_active","album_menu_sub","album_menu_sub_active"); ?>

    `
    What could be going wrong here?
  • acrylian Administrator, Developer
    The garland theme as it can be downloaded contains an older version of the printalbummenu that is located in the theme's customfunctions.php. This one indeed is missing the "show=1" in the count part.

    You need to include the newer one that is included in zenphoto instead. The newest version (1.3.1) that features full password support is included in the nightly build. See the top of the file for instructions.
Sign In or Register to comment.