Multiple galleries

I would like to have multiple galleries containing multiple albums.

I am sure this is a simple feature in the admin I am just missing. Any help would be highly appreciated.

Thanks

Comments

  • For multiple galleries you need to install zenphoto in multiple directories..
  • acrylian Administrator, Developer
    In Zenphoto terminology (see http://www.zenphoto.org/2008/08/zenphoto-glossary/) "gallery" is the entire Zenphoto installation. If you just mean albums within an album (=subalbums) that is a standard feature.
  • I saw this great piece of code in the "Stopdesign" Template:

    `
    <?php
    $anumber = getNumSubalbums();
    $inumber = getNumImages();
    if ($anumber > 0 || $inumber > 0) {
    echo '

    (';
    if ($anumber == 0 && $inumber == 1) {
    printf(gettext('1 photo'));
    } else if ($anumber == 0 && $inumber > 1) {
    printf(gettext('%u photos'), $inumber);
    } else if ($anumber == 1 && $inumber == 1) {
    printf(gettext('1 album, 1 photo'));
    } else if ($anumber > 1 && $inumber == 1) {
    printf(gettext('%u album, 1 photo'), $anumber);
    } else if ($anumber > 1 && $inumber > 1) {
    printf(gettext('%1$u album, %2$u photos'), $anumber, $inumber);
    } else if ($anumber == 1 && $inumber == 0) {
    printf(gettext('1 album'));
    } else if ($anumber > 1 && $inumber == 0) {
    printf(gettext('%u album'),$anumber);
    } else if ($anumber == 1 && $inumber > 1) {
    printf(gettext('1 album, %u photos'), $inumber);
    }
    echo ')
    ';
    }
    $text = getAlbumDesc();
    if(strlen($text) > 50) {
    $text = preg_replace("/[^ ]*$/", '', substr($text, 0, 50))."...";
    }
    echo $text;
    ?>

    <?php
    }
    if (!$first) { echo "\n\n</div>\n"; }
    ?>
    `
    So if you have a structure like this in your "albums" folder:

    - albums
    -- folder with 5 pictures
    -- folder with 2 subfolders
    --- subfolder 1 with 20 pictures
    --- subfolder 2 with 30 pictures
    -- folder with 20 pictures
    -- etc.

    It will display
    something like this under a folder containg pictures

    "Foldername" ( 5 photos)

    and under a folder containing subfolders:

    "Foldername" ( 2 album)

    This is great!

    Only thing.... if a folder contains videos it still print "xx photos"

    Maybe some coder here is able to add something to this code so it will recognise videofiles and print out "video" instead, then it would be perfect.
Sign In or Register to comment.