printAlbumMenu Sort Order

I'm using the following code to print a list of albums on my site:

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

However, the album names are not being sorted alphabetically like the way I set it in "Options > Gallery Configuration > Sort Gallery by: > Title"

I did a refresh of the database, but still no luck. I looked at the docs, but it doesn't mention a sort order option.
http://www.zenphoto.org/documentation-official/zenphoto/_plugins---print_album_menu.php.html

Is it possible to sort this list alphabetically?

--
tim

Comments

  • tim254 Member
    To answer my own question ... I took some code from Stopdesign and created my list which is sorted correctly:

    `

      <?php $counter = 0; while (next_album(true) and $counter < 999): ?>
      " title="<?php echo gettext('View album: '); echo getAlbumTitle();?>"><?php printAlbumTitle(); ?>
      " title="<?php echo gettext('View album: '); echo getAlbumTitle();?>"
      <?php<br />
      $number = getNumsubalbums();
      if ($number > 0) {
      if (!($number == 1)) { $number .= gettext(' albums');} else {$number .=gettext(' album');}
      $counters = $number;
      } else {
      $counters = '';
      }
      $number = getNumImages();
      if ($number > 0) {
      if (!empty($counters)) { $counters .= ", "; }
      if ($number != 1) $number .= gettext(' photos'); else $number .= gettext(' photo');
      $counters .= $number;
      }
      if (!empty($counters)) {
      echo "($counters)";
      }
      ?>
      <?php if ($counter == 2) {echo "</ul>
        ";}; $counter++; endwhile; ?>
      `
  • acrylian Administrator, Developer
    The nightly build contains a newer version of the menu that should do that. The version coming with 1.1.6 uses it's own db query to get the albums while the newer version uses the class object, so that it should sort correctly.
  • hello,

    My zen photo version is 1.2[2213]

    I want to include a menu to access to albums with printAlbumMenuJump. The order of the list is odd.
    I get (name of my top-album is a number)
    2005/
    2006/
    2004/
    2007/
    2008

    thanks.
  • oups, it's my fault, I didn't use the latest printAlbum version. Now everything is fine.
Sign In or Register to comment.