show_latest_albums breaks with Dynamic Folders in 1.1.5

Due to the different thumb URL scheme for dynamic albums, the old show_latest_albums function found in a few themes customfunctions.php breaks.

I was able to fix it with something like this:

if ($dyn=="1") {
echo '<img src="'.WEBPATH.'/'.dirname($thumb).'/image/thumb/'.basename($thumb).'" alt="'.$title.'" />';

The rest is left as an exercise to the reader

Comments

  • acrylian Administrator, Developer
    But you know that we have a function for that in the core?
  • There is no difference in the thumb scheme for dynamic albums than for regular albums.
  • Well, it seems that for non dynamic albums, the thumbs column is filled with a relative URL for the thumb, relative to the album itself. Whereas for Dynamic albums (which I love, thanks sbillard), it's a longer URL that includes the non virtual album which the thumbnail is taken from ?

    I'll look into the function in the core, probably didn't exist when I started writing the first version of my theme.
  • It has always (since 1.1.1) been possible to have a thumb link be absolute. With the dynamic albums, since there are really no images in the album, that is about all that is useful.
  • sbillard, makes sense. However <?php printLatestAlbums(6) ; ?>
    doesn't work with dynamic albums it seems, so it's a moot point :)
  • Please file a ticket so we can investigate and fix any problems.
  • Thanks. I've gotten time to look at the problem and a fix is in tonight's nightly.
  • awesome. Thanks as always.
Sign In or Register to comment.